重构项目配置并添加对 SBDEMO 的支持
更新多个 ESP32 芯片(C2、C3、S3) 的版本配置为 SBDEMO 产品添加新的配置文件实现板卡和应用程序配置模块添加 CRC 实用函数修改系统日志以支持动态日志控制更新 Kconfig 和 sdkconfig 的默认设置以适应新产品
This commit is contained in:
@@ -21,9 +21,9 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "soc/spi_periph.h"
|
||||
#include "soc/gpio_periph.h"
|
||||
#include "config/board_config.h"
|
||||
|
||||
#include "ws2812_spi.h"
|
||||
#include "drivers/pin_io/pin_io.h"
|
||||
|
||||
#include "os/os.h"
|
||||
|
||||
@@ -145,7 +145,7 @@ ws2812_spi_led_buf_t *ws2812_spi_led_new_buf(uint16_t leds)
|
||||
led_strip->pow_tbl[0] = 0;
|
||||
|
||||
/* 使所有数据合法化 */
|
||||
ws2812_spi_led_strip_clear(led_strip);
|
||||
ws2812_spi_led_strip_clear((ws2812_spi_led_buf_t *)led_strip);
|
||||
|
||||
return (ws2812_spi_led_buf_t *)led_strip;
|
||||
}
|
||||
@@ -167,7 +167,7 @@ void ws2812_spi_led_strip_clear(ws2812_spi_led_buf_t *buf)
|
||||
memset(led_strip->dma_buffer, WS_RESET, led_strip->buffer_size);
|
||||
for (int i = 0; i < led_strip->max_led_num; i++)
|
||||
{
|
||||
ws2812_spi_led_strip_set_pixel(led_strip, i, 0, 0, 0);
|
||||
ws2812_spi_led_strip_set_pixel((ws2812_spi_led_buf_t *)led_strip, i, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,16 +256,12 @@ int ws2812_spi_led_strip_refresh(ws2812_spi_led_buf_t *buf, uint32_t leds, uint8
|
||||
{
|
||||
if (s_cm.spi_pin > 0)
|
||||
{
|
||||
cfg_board_pin_io_t cfg_pin = {.pin = s_cm.spi_pin, .en_lev = 1};
|
||||
pin_cfg_output(&cfg_pin);
|
||||
pin_set_valid(&cfg_pin, true);
|
||||
drv_gpio_pin_configure(s_cm.spi_pin, _GPIO_DIR_OUT, _GPIO_PUD_PULL_UP);
|
||||
}
|
||||
|
||||
if (pin > 0)
|
||||
{
|
||||
cfg_board_pin_io_t cfg_pin = {.pin = pin, .en_lev = 1};
|
||||
pin_cfg_output(&cfg_pin);
|
||||
gpio_set_direction(pin, GPIO_MODE_INPUT_OUTPUT);
|
||||
drv_gpio_pin_configure(pin, _GPIO_DIR_OUT, _GPIO_PUD_PULL_UP);
|
||||
esp_rom_gpio_connect_out_signal(pin, spi_periph_signal[s_cm.host_id].spid_out, true, false);
|
||||
}
|
||||
s_cm.spi_pin = pin;
|
||||
|
||||
Reference in New Issue
Block a user