Remove build directories
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
idf_component_register(SRCS "esp_ot_rcp.c"
|
||||
PRIV_REQUIRES esp_coex esp_event nvs_flash openthread
|
||||
INCLUDE_DIRS ".")
|
||||
INCLUDE_DIRS "."
|
||||
REQUIRES led_strip)
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
#include "esp_ot_config.h"
|
||||
#include "esp_vfs_eventfd.h"
|
||||
#include "driver/uart.h"
|
||||
#include "driver/rmt.h"
|
||||
#include "led_strip.h"
|
||||
#include "esp_err.h"
|
||||
#include "driver/rmt_tx.h"
|
||||
|
||||
#if CONFIG_EXTERNAL_COEX_ENABLE
|
||||
#include "esp_coexist.h"
|
||||
@@ -71,6 +75,33 @@ static void ot_task_worker(void *aContext)
|
||||
vTaskDelete(NULL);
|
||||
}
|
||||
|
||||
#define LED_GPIO 18
|
||||
#define LED_COUNT 1
|
||||
|
||||
static led_strip_handle_t led_strip = NULL;
|
||||
|
||||
void init_led_strip(void)
|
||||
{
|
||||
led_strip_config_t strip_config = {
|
||||
.strip_gpio_num = LED_GPIO,
|
||||
.max_leds = LED_COUNT,
|
||||
};
|
||||
|
||||
led_strip_rmt_config_t rmt_cfg = {
|
||||
.clk_src = RMT_CLK_SRC_DEFAULT,
|
||||
.resolution_hz = 10 * 1000 * 1000, // 10MHz is typical
|
||||
.mem_block_symbols = 0, // 0 to use default
|
||||
.flags.with_dma = false, // DMA optional
|
||||
};
|
||||
|
||||
ESP_ERROR_CHECK(led_strip_new_rmt_device(&strip_config, &rmt_cfg, &led_strip));
|
||||
|
||||
ESP_ERROR_CHECK(led_strip_clear(led_strip));
|
||||
|
||||
ESP_ERROR_CHECK(led_strip_set_pixel(led_strip, 0, 255, 0, 255));
|
||||
ESP_ERROR_CHECK(led_strip_refresh(led_strip));
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
// Used eventfds:
|
||||
|
||||
Reference in New Issue
Block a user