Skip to content

Commit ca68c77

Browse files
waihongtamkartben
authored andcommitted
tests: drivers: build_all: led_strip: Add build test for ws2812-uart driver
This commit adds a build test for the new `worldsemi,ws2812-uart` driver. A devicetree node for the driver is added to the app.overlay, instantiated on a `vnd,serial` test UART. Signed-off-by: Wai-Hong Tam <[email protected]>
1 parent eb30d03 commit ca68c77

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

tests/drivers/build_all/led_strip/app.overlay

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,29 @@
8484
spi-zero-frame = <2>;
8585
};
8686
};
87+
88+
test_uart: uart@55556666 {
89+
compatible = "vnd,serial";
90+
reg = <0x55556666 0x100>;
91+
status = "okay";
92+
current-speed = <2500000>;
93+
data-bits = <7>;
94+
tx-invert;
95+
96+
test_ws2812_uart: ws2812-strip {
97+
compatible = "worldsemi,ws2812-uart";
98+
status = "okay";
99+
100+
one-symbol = <6>; /* 0b110 */
101+
zero-symbol = <4>; /* 0b100 */
102+
bits-per-symbol = <3>;
103+
104+
chain-length = <8>;
105+
reset-delay = <50>;
106+
color-mapping = <LED_COLOR_ID_GREEN
107+
LED_COLOR_ID_RED
108+
LED_COLOR_ID_BLUE>;
109+
};
110+
};
87111
};
88112
};

tests/drivers/build_all/led_strip/prj.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@ CONFIG_TEST_USERSPACE=y
33

44
CONFIG_GPIO=y
55
CONFIG_SPI=y
6+
CONFIG_SERIAL=y
67
CONFIG_LED_STRIP=y

0 commit comments

Comments
 (0)