From 69e249ee13407a3cd15707555750fbd279998053 Mon Sep 17 00:00:00 2001 From: Benjamin Vedder Date: Mon, 8 Jul 2024 17:30:04 +0200 Subject: [PATCH] Os for nrf driver --- driver/nrf/nrf_driver.c | 5 +++++ driver/nrf/rf.c | 5 +++++ driver/nrf/rfhelp.c | 5 +++++ 3 files changed, 15 insertions(+) diff --git a/driver/nrf/nrf_driver.c b/driver/nrf/nrf_driver.c index f25d2b6b..d500e5d3 100644 --- a/driver/nrf/nrf_driver.c +++ b/driver/nrf/nrf_driver.c @@ -17,6 +17,9 @@ along with this program. If not, see . */ +#pragma GCC push_options +#pragma GCC optimize ("Os") + #include #include "nrf_driver.h" #include "rf.h" @@ -525,3 +528,5 @@ bool nrf_driver_ext_nrf_running(void) { void nrf_driver_pause(int ms) { driver_paused = ms; } + +#pragma GCC pop_options diff --git a/driver/nrf/rf.c b/driver/nrf/rf.c index 76ce2f45..6933564d 100644 --- a/driver/nrf/rf.c +++ b/driver/nrf/rf.c @@ -18,6 +18,9 @@ along with this program. If not, see . */ +#pragma GCC push_options +#pragma GCC optimize ("Os") + #include "rf.h" #include "spi_sw.h" #include "ch.h" @@ -357,3 +360,5 @@ char rf_read_reg_byte(int reg) { rf_read_reg(reg, &result, 1); return result; } + +#pragma GCC pop_options diff --git a/driver/nrf/rfhelp.c b/driver/nrf/rfhelp.c index 0627ce79..60bf5721 100644 --- a/driver/nrf/rfhelp.c +++ b/driver/nrf/rfhelp.c @@ -17,6 +17,9 @@ along with this program. If not, see . */ +#pragma GCC push_options +#pragma GCC optimize ("Os") + #include "rfhelp.h" #include "rf.h" #include "ch.h" @@ -365,3 +368,5 @@ void rfhelp_power_up(void) { rf_power_up(); chMtxUnlock(&rf_mutex); } + +#pragma GCC pop_options