Converted initialization to use System Events.
This commit is contained in:
parent
0dcbae7ec6
commit
c3362d42af
17 changed files with 243 additions and 58 deletions
|
|
@ -38,4 +38,22 @@ void Initialize_System_Events(void)
|
|||
EventGroupHandle_t Get_System_Events(void)
|
||||
{
|
||||
return The_System_Events;
|
||||
}
|
||||
}
|
||||
|
||||
bool Wait_For_System_Event(EventBits_t event_bit, const char* timeout_message, uint32_t timeout_ms)
|
||||
{
|
||||
EventBits_t bits = xEventGroupWaitBits(
|
||||
The_System_Events,
|
||||
event_bit,
|
||||
pdFALSE,
|
||||
pdTRUE,
|
||||
pdMS_TO_TICKS(timeout_ms));
|
||||
|
||||
if ((bits & event_bit) == 0)
|
||||
{
|
||||
KLOG_ERROR(TAG, "%s", timeout_message);
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue