update description for rtos_idle_callback()

This commit is contained in:
hathach committed 2017-09-01 19:21:22 +07:00
1 parent ebee25d510
commit 5b6adc0d7c
3 files changed
+12 -57

No files matched your search

@@ -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();
}
@@ -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();
}
@@ -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();
}