diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/bleuart/bleuart.ino b/libraries/Bluefruit52Lib/examples/Peripheral/bleuart/bleuart.ino index 82f31438..af375531 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/bleuart/bleuart.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/bleuart/bleuart.ino @@ -154,22 +154,10 @@ void blink_timer_callback(TimerHandle_t xTimerID) * there is no bluetooth or hw event. This is the ideal place to handle * background data. * - * NOTE: It is recommended to call waitForEvent() to put MCU into low-power mode - * at the end of this callback. You could also turn off other Peripherals such as - * Serial/PWM and turn them back on if wanted - * - * e.g - * - * void rtos_idle_callback(void) - * { - * Serial.stop(); // will lose data when sleeping - * waitForEvent(); - * Serial.begin(115200); - * } - * - * NOTE2: If rtos_idle_callback() is not defined at all. Bluefruit will force - * waitForEvent() to save power. If you don't want MCU to sleep at all, define - * an rtos_idle_callback() with empty body ! + * NOTE: FreeRTOS is configured as tickless idle mode. After this callback + * is executed, if there is time, freeRTOS kernel will go into low power mode. + * Therefore waitForEvent() should not be called in this callback. + * http://www.freertos.org/low-power-tickless-rtos.html * * WARNING: This function MUST NOT call any blocking FreeRTOS API * such as delay(), xSemaphoreTake() etc ... for more information @@ -179,8 +167,5 @@ void rtos_idle_callback(void) { // Don't call any other FreeRTOS blocking API() // Perform background task(s) here - - // Request CPU to enter low-power mode until an event/interrupt occurs - waitForEvent(); } diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino b/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino index f331cf48..f40f0419 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/custom_hrm/custom_hrm.ino @@ -233,22 +233,10 @@ void loop() * there is no bluetooth or hw event. This is the ideal place to handle * background data. * - * NOTE: It is recommended to call waitForEvent() to put MCU into low-power mode - * at the end of this callback. You could also turn off other Peripherals such as - * Serial/PWM and turn them back on if wanted - * - * e.g - * - * void rtos_idle_callback(void) - * { - * Serial.stop(); // will lose data when sleeping - * waitForEvent(); - * Serial.begin(115200); - * } - * - * NOTE2: If rtos_idle_callback() is not defined at all. Bluefruit will force - * waitForEvent() to save power. If you don't want MCU to sleep at all, define - * an rtos_idle_callback() with empty body ! + * NOTE: FreeRTOS is configured as tickless idle mode. After this callback + * is executed, if there is time, freeRTOS kernel will go into low power mode. + * Therefore waitForEvent() should not be called in this callback. + * http://www.freertos.org/low-power-tickless-rtos.html * * WARNING: This function MUST NOT call any blocking FreeRTOS API * such as delay(), xSemaphoreTake() etc ... for more information @@ -258,7 +246,4 @@ void rtos_idle_callback(void) { // Don't call any other FreeRTOS blocking API() // Perform background task(s) here - - // Request CPU to enter low-power mode until an event/interrupt occurs - waitForEvent(); } diff --git a/libraries/Bluefruit52Lib/examples/Peripheral/hid_keyboard/hid_keyboard.ino b/libraries/Bluefruit52Lib/examples/Peripheral/hid_keyboard/hid_keyboard.ino index 95c61809..84504e3c 100644 --- a/libraries/Bluefruit52Lib/examples/Peripheral/hid_keyboard/hid_keyboard.ino +++ b/libraries/Bluefruit52Lib/examples/Peripheral/hid_keyboard/hid_keyboard.ino @@ -127,22 +127,10 @@ void loop() * there is no bluetooth or hw event. This is the ideal place to handle * background data. * - * NOTE: It is recommended to call waitForEvent() to put MCU into low-power mode - * at the end of this callback. You could also turn off other Peripherals such as - * Serial/PWM and turn them back on if wanted - * - * e.g - * - * void rtos_idle_callback(void) - * { - * Serial.stop(); // will lose data when sleeping - * waitForEvent(); - * Serial.begin(115200); - * } - * - * NOTE2: If rtos_idle_callback() is not defined at all. Bluefruit will force - * waitForEvent() to save power. If you don't want MCU to sleep at all, define - * an rtos_idle_callback() with empty body ! + * NOTE: FreeRTOS is configured as tickless idle mode. After this callback + * is executed, if there is time, freeRTOS kernel will go into low power mode. + * Therefore waitForEvent() should not be called in this callback. + * http://www.freertos.org/low-power-tickless-rtos.html * * WARNING: This function MUST NOT call any blocking FreeRTOS API * such as delay(), xSemaphoreTake() etc ... for more information @@ -152,7 +140,4 @@ void rtos_idle_callback(void) { // Don't call any other FreeRTOS blocking API() // Perform background task(s) here - - // Request CPU to enter low-power mode until an event/interrupt occurs - waitForEvent(); }