preparation for switch to C6 MCU (but also compatible with S3)
Some checks failed
ESP-IDF Build / build (esp32c6, release-v5.4) (push) Failing after 2m23s
ESP-IDF Build / build (esp32c6, release-v5.5) (push) Failing after 6m1s
ESP-IDF Build / build (esp32s3, release-v5.4) (push) Failing after 2m17s
ESP-IDF Build / build (esp32s3, release-v5.5) (push) Failing after 5m57s

Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
2026-02-06 22:30:48 +01:00
parent 684ce36270
commit fe4bd11a21
10 changed files with 180 additions and 166 deletions

View File

@@ -97,22 +97,21 @@ esp_err_t led_status_init(int gpio_num)
.max_leds = STATUS_LED_COUNT,
.led_model = LED_MODEL_WS2812,
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRBW,
.flags =
{
.invert_out = false,
},
.flags = {.invert_out = 0},
};
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT,
.resolution_hz = 10 * 1000 * 1000, // 10MHz
.mem_block_symbols = 0,
.flags =
{
.with_dma = false,
},
.flags = {.with_dma = 0},
};
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
ESP_LOGI(TAG, "LED strip initialized.");
esp_err_t ret = led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip);
if (ret != ESP_OK)
{
ESP_LOGE(TAG, "Failed to init status LED: %s", esp_err_to_name(ret));
return ret;
}
ESP_LOGI(TAG, "Status LED initialized.");
// Create mutex
mutex = xSemaphoreCreateMutex();

View File

@@ -72,17 +72,21 @@ esp_err_t led_strip_init(void)
.max_leds = MAX_LEDS,
.led_model = LED_MODEL_WS2812,
.color_component_format = LED_STRIP_COLOR_COMPONENT_FMT_GRB,
.flags = {.invert_out = false},
.flags = {.invert_out = 0},
};
led_strip_rmt_config_t rmt_config = {
.clk_src = RMT_CLK_SRC_DEFAULT,
.resolution_hz = 0,
.mem_block_symbols = 0,
.flags = {.with_dma = true},
.flags = {.with_dma = 0},
};
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip));
esp_err_t ret = led_strip_new_rmt_device(&strip_config, &rmt_config, &led_strip);
if (ret != ESP_OK)
{
ESP_LOGE(TAG, "Failed to init main LED strip: %s", esp_err_to_name(ret));
return ret;
}
led_command_queue = xQueueCreate(5, sizeof(led_command_t));
if (led_command_queue == NULL)