Neopixelbus redo method definitions (#2616)

This commit is contained in:
Otto Winter
2021-11-11 07:35:31 +13:00
committed by GitHub
parent d8e33c5a69
commit 8aa72f4c1e
6 changed files with 585 additions and 112 deletions
File diff suppressed because it is too large Load Diff
+42
View File
@@ -0,0 +1,42 @@
CHIP_DOTSTAR = "dotstar"
CHIP_WS2801 = "ws2801"
CHIP_WS2811 = "ws2811"
CHIP_WS2812 = "ws2812"
CHIP_WS2812X = "ws2812x"
CHIP_WS2813 = "ws2813"
CHIP_SK6812 = "sk6812"
CHIP_TM1814 = "tm1814"
CHIP_TM1829 = "tm1829"
CHIP_TM1914 = "tm1914"
CHIP_800KBPS = "800kbps"
CHIP_400KBPS = "400kbps"
CHIP_APA106 = "apa106"
CHIP_LC8812 = "lc8812"
CHIP_LPD8806 = "lpd8806"
CHIP_LPD6803 = "lpd6803"
CHIP_P9813 = "p9813"
ONE_WIRE_CHIPS = [
CHIP_WS2811,
CHIP_WS2812,
CHIP_WS2812X,
CHIP_WS2813,
CHIP_SK6812,
CHIP_TM1814,
CHIP_TM1829,
CHIP_TM1914,
CHIP_800KBPS,
CHIP_400KBPS,
CHIP_APA106,
CHIP_LC8812,
]
TWO_WIRE_CHIPS = [
CHIP_DOTSTAR,
CHIP_WS2801,
CHIP_LPD6803,
CHIP_LPD8806,
CHIP_P9813,
]
CHIP_TYPES = [*ONE_WIRE_CHIPS, *TWO_WIRE_CHIPS]
CONF_ASYNC = "async"
CONF_BUS = "bus"
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1399,7 +1399,7 @@ def typed_schema(schemas, **kwargs):
if schema_option is None:
raise Invalid(f"{key} not specified!")
key_v = key_validator(schema_option)
value = schemas[key_v](value)
value = Schema(schemas[key_v])(value)
value[key] = key_v
return value
+1 -1
View File
@@ -27,7 +27,7 @@ build_flags =
[common]
lib_deps =
esphome/noise-c@0.1.4 ; api
makuna/NeoPixelBus@2.6.7 ; neopixelbus
makuna/NeoPixelBus@2.6.9 ; neopixelbus
build_flags =
-DESPHOME_LOG_LEVEL=ESPHOME_LOG_LEVEL_VERY_VERBOSE
src_filter =
+1
View File
@@ -32,6 +32,7 @@ def clang_options(idedata):
'-D_PGMSPACE_H_',
'-Dpgm_read_byte(s)=(*(const uint8_t *)(s))',
'-Dpgm_read_byte_near(s)=(*(const uint8_t *)(s))',
'-Dpgm_read_word(s)=(*(const uint16_t *)(s))',
'-Dpgm_read_dword(s)=(*(const uint32_t *)(s))',
'-DPROGMEM=',
'-DPGM_P=const char *',