diff --git a/app/drivers/data_port/socket_inet/wifi.c b/app/drivers/data_port/socket_inet/wifi.c index be298dd..341a27d 100644 --- a/app/drivers/data_port/socket_inet/wifi.c +++ b/app/drivers/data_port/socket_inet/wifi.c @@ -7,7 +7,7 @@ #include "esp_netif_types.h" #include "esp_err.h" -#define CONFIG_SYS_LOG_LEVEL SYS_LOG_LEVEL_INF +#define CONFIG_SYS_LOG_LEVEL SYS_LOG_LEVEL_WRN #define SYS_LOG_DOMAIN "WIFI" #include "sys_log.h" diff --git a/app/drivers/ws2812_spi/ws2812_spi.c b/app/drivers/ws2812_spi/ws2812_spi.c index d396fe0..1adfe2f 100755 --- a/app/drivers/ws2812_spi/ws2812_spi.c +++ b/app/drivers/ws2812_spi/ws2812_spi.c @@ -52,7 +52,7 @@ static struct spi_host_device_t host_id; spi_device_handle_t spi_hdl; os_mutex_t mutex_hdl; - uint16_t spi_pin; + uint8_t spi_pin; int max_transfer_sz; } s_cm; @@ -103,7 +103,7 @@ void ws2812_spi_led_strip_init(uint8_t host_id, uint16_t max_led_num) ESP_ERROR_CHECK(ret); s_cm.host_id = host_id; - s_cm.spi_pin = -1; + s_cm.spi_pin = ~0; } if (!os_mutex_is_valid(&s_cm.mutex_hdl)) @@ -254,12 +254,12 @@ int ws2812_spi_led_strip_refresh(ws2812_spi_led_buf_t *buf, uint32_t leds, uint8 if (s_cm.spi_pin != pin) { - if (s_cm.spi_pin > 0) + if (GPIO_USED(s_cm.spi_pin)) { drv_gpio_pin_configure(s_cm.spi_pin, _GPIO_DIR_OUT, _GPIO_PUD_PULL_UP); } - if (pin > 0) + if (GPIO_USED(pin)) { 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);