21 lines
518 B
C
21 lines
518 B
C
#include "freertos/idf_additions.h"
|
|
#include "freertos/projdefs.h"
|
|
#include "tasks.h"
|
|
#include <stdbool.h>
|
|
|
|
extern QueueHandle_t blink_rate_q;
|
|
|
|
void app_main(void) {
|
|
TaskHandle_t task_handle_blink;
|
|
blink_rate_q = xQueueCreate(10, sizeof(BlinkCmd_t));
|
|
|
|
xTaskCreate(task_blink, "task_blink", 1024, NULL, 0, &task_handle_blink);
|
|
|
|
BlinkCmd_t br = {
|
|
.variant = BLINK_STATE,
|
|
.state = true,
|
|
};
|
|
|
|
vTaskDelay(pdMS_TO_TICKS(2000));
|
|
xQueueSend(blink_rate_q, &br, pdMS_TO_TICKS(200));
|
|
}
|