tests: drivers: add tlc5971 led strip driver to build_all
add to build_all for build coverage in CI. Signed-off-by: Mikkel Jakobsen <mikkel.aunsbjerg@escolifesciences.com>
This commit is contained in:
parent
959afcc93a
commit
dbbfb86603
5 changed files with 85 additions and 0 deletions
8
tests/drivers/build_all/led_strip/CMakeLists.txt
Normal file
8
tests/drivers/build_all/led_strip/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.20.0)
|
||||
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
|
||||
project(build_all)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
55
tests/drivers/build_all/led_strip/app.overlay
Normal file
55
tests/drivers/build_all/led_strip/app.overlay
Normal file
|
@ -0,0 +1,55 @@
|
|||
/*
|
||||
* Copyright (c) 2020, Linaro Ltd.
|
||||
* Copyright (c) 2022, Esco Medical ApS
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Application overlay for testing driver builds
|
||||
*
|
||||
* Names in this file should be chosen in a way that won't conflict
|
||||
* with real-world devicetree nodes, to allow these tests to run on
|
||||
* (and be extended to test) real hardware.
|
||||
*/
|
||||
|
||||
#include <freq.h>
|
||||
#include <dt-bindings/led/led.h>
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
label = "TEST_GPIO_1";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_spi: spi@33334444 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "vnd,spi";
|
||||
reg = <0x33334444 0x1000>;
|
||||
label = "TEST_SPI_CTLR";
|
||||
status = "okay";
|
||||
clock-frequency = <DT_FREQ_M(2)>;
|
||||
|
||||
cs-gpios = <&test_gpio 0 0>;
|
||||
|
||||
test_spi_tlc5971: tlc5971@0 {
|
||||
status = "okay";
|
||||
compatible = "ti,tlc59711", "ti,tlc5971";
|
||||
label = "TLC5971";
|
||||
spi-max-frequency = <DT_FREQ_M(1)>;
|
||||
reg = <0x0>;
|
||||
chain-length = <8>; // two TLC5971 devices
|
||||
color-mapping = <LED_COLOR_ID_BLUE>,
|
||||
<LED_COLOR_ID_GREEN>,
|
||||
<LED_COLOR_ID_RED>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
7
tests/drivers/build_all/led_strip/prj.conf
Normal file
7
tests/drivers/build_all/led_strip/prj.conf
Normal file
|
@ -0,0 +1,7 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_LED_STRIP=y
|
||||
CONFIG_TLC5971_STRIP=y
|
9
tests/drivers/build_all/led_strip/src/main.c
Normal file
9
tests/drivers/build_all/led_strip/src/main.c
Normal file
|
@ -0,0 +1,9 @@
|
|||
/*
|
||||
* Copyright (c) 2012-2014 Wind River Systems, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
void main(void)
|
||||
{
|
||||
}
|
6
tests/drivers/build_all/led_strip/testcase.yaml
Normal file
6
tests/drivers/build_all/led_strip/testcase.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
tests:
|
||||
drivers.led_strip.build:
|
||||
build_only: true
|
||||
min_ram: 32
|
||||
tags: drivers
|
||||
depends_on: gpio spi
|
Loading…
Add table
Add a link
Reference in a new issue