/*..........................................................................*/ void QF_onIdle(void) { /* called with interrupts disabled, see NOTE01 */ #ifdef NDEBUG /* Put the CPU and peripherals to the low-power mode. * you might need to customize the clock management for your application, * see the datasheet for your particular Cortex-M MCU. */ QF_CPU_SLEEP(); /* atomically go to sleep and enable interrupts */ #else QF_INT_ENABLE(); /* just enable interrupts */ #endif }
/*..........................................................................*/ void QF_onIdle(void) { /* entered with interrupts DISABLED, see NOTE01 */ /* toggle the User LED on and then off, see NOTE02 */ //GPIOSetValue(LED_PORT, LED_BIT, LED_ON); /* LED on */ //GPIOSetValue(LED_PORT, LED_BIT, LED_OFF); /* LED off */ #ifdef NDEBUG /* put the CPU and peripherals to the low-power mode */ QF_CPU_SLEEP(); /* atomically go to sleep and enable interrupts */ #else QF_INT_ENABLE(); /* just enable interrupts */ #endif }
/* called with app interrupts disabled, so we enable app interrupts first */ void QF_onIdle(void) { QF_INT_ENABLE(); QF_CPU_SLEEP(); }