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

@ -5,5 +5,6 @@ idf_component_register(
"."
REQUIRES
"SystemK"
"System_Events"
"driver"
)

View file

@ -21,6 +21,7 @@
*/
#include <SystemK.h>
#include <System_Events.h>
#include <IR.h>
#include <driver/gpio.h>
#include <driver/rmt_tx.h>
@ -272,7 +273,7 @@ static void Initialize_Receive_Task(void)
}
}
void Initialize_IR(SemaphoreHandle_t init_complete)
void Initialize_IR()
{
KLOG_INFO(TAG, "Initializing IR...");
@ -375,7 +376,8 @@ void Initialize_IR(SemaphoreHandle_t init_complete)
ESP_ERROR_CHECK(rmt_enable(Right_Rx_Channel));
ESP_ERROR_CHECK(rmt_receive(Right_Rx_Channel, &Right_Rxd_RMT_Data, sizeof(Right_Rxd_RMT_Data.pulsetrain), &Rx_Config));
xSemaphoreGive(init_complete);
xEventGroupSetBits(Get_System_Events(), SYS_IR_READY);
KLOG_INFO(TAG, "Initialization complete.");
}
static inline void PrintPulseTrainToConsole(TimedPulseTrain_T *train)

View file

@ -22,6 +22,6 @@
#include "esp_err.h"
void Initialize_IR(SemaphoreHandle_t init_complete);
void Initialize_IR();
void Enable_IR_Transmit();
void Disable_IR_Transmit();