Wait for idle

This commit is contained in:
Manuel Bl
2021-09-26 20:07:57 +02:00
parent bd728887cf
commit 7df10bd6bc
5 changed files with 66 additions and 1 deletions

View File

@ -615,6 +615,17 @@ class TheThingsNetwork
ttn_prepare_for_deep_sleep();
}
/**
* @brief Waits until the TTN device is idle.
*
* If the TTN device is idle, the ESP32 can go into deep sleep mode
* or be powered off without disrupting an on-going communication.
*/
void waitForIdle()
{
ttn_wait_for_idle();
}
/**
* @brief Returns the minimum duration the TTN device is busy.
*

View File

@ -583,6 +583,14 @@ extern "C"
*/
void ttn_prepare_for_deep_sleep(void);
/**
* @brief Waits until the TTN device is idle.
*
* If the TTN device is idle, the ESP32 can go into deep sleep mode
* or be powered off without disrupting an on-going communication.
*/
void ttn_wait_for_idle(void);
/**
* @brief Returns the minimum duration the TTN device will be busy.
*
@ -599,7 +607,7 @@ extern "C"
*
* @return busy duration (in FreeRTOS ticks)
*/
TickType_t ttn_busy_duration();
TickType_t ttn_busy_duration(void);
/**
* @brief Stops all activies.