Converted initialization to use System Events.

This commit is contained in:
Joe Kearney 2025-11-23 16:01:02 -06:00
parent 0dcbae7ec6
commit c3362d42af
17 changed files with 243 additions and 58 deletions

View file

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