|
21 | 21 |
|
22 | 22 | // mbed Includes |
23 | 23 | #include "mbed_assert.h" |
24 | | -#include "rtos/source/rtos_idle.h" |
25 | 24 | #include "platform/mbed_power_mgmt.h" |
26 | 25 | #include "mbed_critical.h" |
27 | 26 |
|
@@ -183,30 +182,6 @@ const LlRtCfg_t NRFCordioHCIDriver::_ll_cfg = { |
183 | 182 |
|
184 | 183 | extern "C" void TIMER0_IRQHandler(void); |
185 | 184 |
|
186 | | -static void idle_hook(void) |
187 | | -{ |
188 | | - wsfTimerTicks_t nextExpiration; |
189 | | - bool_t timerRunning; |
190 | | - |
191 | | - nextExpiration = WsfTimerNextExpiration(&timerRunning); |
192 | | - if(timerRunning && nextExpiration > 0) |
193 | | - { |
194 | | - // Make sure we hae enough time to go to sleep |
195 | | - if( nextExpiration < 1 /* 10 ms per tick which is long enough to got to sleep */ ) |
196 | | - { |
197 | | - // Bail |
198 | | - return; |
199 | | - } |
200 | | - } |
201 | | - |
202 | | - // critical section to complete sleep with locked deepsleep |
203 | | - core_util_critical_section_enter(); |
204 | | - sleep_manager_lock_deep_sleep(); |
205 | | - sleep(); |
206 | | - sleep_manager_unlock_deep_sleep(); |
207 | | - core_util_critical_section_exit(); |
208 | | -} |
209 | | - |
210 | 185 | NRFCordioHCIDriver::NRFCordioHCIDriver(CordioHCITransportDriver& transport_driver) : cordio::CordioHCIDriver(transport_driver), _is_init(false), _stack_buffer(NULL) |
211 | 186 | { |
212 | 187 | _stack_buffer = (uint8_t*)malloc(CORDIO_LL_MEMORY_FOOTPRINT); |
@@ -234,9 +209,6 @@ NRFCordioHCIDriver::~NRFCordioHCIDriver() |
234 | 209 | free(_stack_buffer); |
235 | 210 | _stack_buffer = NULL; |
236 | 211 |
|
237 | | - // Restore RTOS idle thread |
238 | | - rtos_attach_idle_hook(NULL); |
239 | | - |
240 | 212 | MBED_ASSERT(_stack_buffer == NULL); |
241 | 213 | } |
242 | 214 |
|
@@ -281,9 +253,6 @@ void NRFCordioHCIDriver::do_initialize() |
281 | 253 | .freeMemAvail = CORDIO_LL_MEMORY_FOOTPRINT |
282 | 254 | }; |
283 | 255 |
|
284 | | - // Override RTOS idle thread |
285 | | - rtos_attach_idle_hook(idle_hook); |
286 | | - |
287 | 256 | /* switch to more accurate 16 MHz crystal oscillator (system starts up using 16MHz RC oscillator) */ |
288 | 257 | NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; |
289 | 258 | NRF_CLOCK->TASKS_HFCLKSTART = 1; |
|
0 commit comments