tests: drivers: build_all: Add auxdisplay drivers test
Add build_all test for auxdisplay drivers. Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
This commit is contained in:
parent
923f47dd80
commit
42020f202f
7 changed files with 171 additions and 0 deletions
8
tests/drivers/build_all/auxdisplay/CMakeLists.txt
Normal file
8
tests/drivers/build_all/auxdisplay/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_auxdisplay)
|
||||
|
||||
FILE(GLOB app_sources src/*.c)
|
||||
target_sources(app PRIVATE ${app_sources})
|
46
tests/drivers/build_all/auxdisplay/i2c_devices.overlay
Normal file
46
tests/drivers/build_all/auxdisplay/i2c_devices.overlay
Normal file
|
@ -0,0 +1,46 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_i2c: i2c@11112222 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "vnd,i2c";
|
||||
reg = <0x11112222 0x1000>;
|
||||
status = "okay";
|
||||
clock-frequency = <100000>;
|
||||
|
||||
test_serlcd: serlcd@0 {
|
||||
compatible = "sparkfun,serlcd";
|
||||
reg = <0x0>;
|
||||
status = "okay";
|
||||
columns = <16>;
|
||||
rows = <2>;
|
||||
command-delay-ms = <10>;
|
||||
special-command-delay-ms = <50>;
|
||||
};
|
||||
|
||||
test_jhd1313: jhd1313@0 {
|
||||
compatible = "jhd,jhd1313";
|
||||
reg = <0x1>;
|
||||
status = "okay";
|
||||
columns = <16>;
|
||||
rows = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
4
tests/drivers/build_all/auxdisplay/prj.conf
Normal file
4
tests/drivers/build_all/auxdisplay/prj.conf
Normal file
|
@ -0,0 +1,4 @@
|
|||
CONFIG_TEST=y
|
||||
CONFIG_TEST_USERSPACE=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_AUXDISPLAY=y
|
44
tests/drivers/build_all/auxdisplay/spi_devices.overlay
Normal file
44
tests/drivers/build_all/auxdisplay/spi_devices.overlay
Normal file
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_spi: spi@33334444 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
compatible = "vnd,spi";
|
||||
reg = <0x33334444 0x1000>;
|
||||
status = "okay";
|
||||
clock-frequency = <2000000>;
|
||||
|
||||
/* one entry for every devices at spi.dtsi */
|
||||
cs-gpios = <&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>,
|
||||
<&test_gpio 0 0>;
|
||||
|
||||
test_spi_pt6314: pt6314@0 {
|
||||
compatible = "ptc,pt6314";
|
||||
reg = <0>;
|
||||
status = "okay";
|
||||
spi-max-frequency = <1000000>;
|
||||
columns = <20>;
|
||||
rows = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
10
tests/drivers/build_all/auxdisplay/src/main.c
Normal file
10
tests/drivers/build_all/auxdisplay/src/main.c
Normal file
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
27
tests/drivers/build_all/auxdisplay/testcase.yaml
Normal file
27
tests/drivers/build_all/auxdisplay/testcase.yaml
Normal file
|
@ -0,0 +1,27 @@
|
|||
common:
|
||||
build_only: true
|
||||
tags:
|
||||
- drivers
|
||||
- rtc
|
||||
tests:
|
||||
drivers.auxdisplay.build.i2c:
|
||||
extra_args: DTC_OVERLAY_FILE="i2c_devices.overlay"
|
||||
extra_configs:
|
||||
- CONFIG_I2C=y
|
||||
platform_allow:
|
||||
- native_sim
|
||||
- native_sim/native/64
|
||||
drivers.auxdisplay.build.spi:
|
||||
extra_args: DTC_OVERLAY_FILE="spi_devices.overlay"
|
||||
extra_configs:
|
||||
- CONFIG_SPI=y
|
||||
platform_allow:
|
||||
- native_sim
|
||||
- native_sim/native/64
|
||||
drivers.auxdisplay.build.uart:
|
||||
extra_args: DTC_OVERLAY_FILE="uart_devices.overlay"
|
||||
extra_configs:
|
||||
- CONFIG_SERIAL=y
|
||||
platform_allow:
|
||||
- native_sim
|
||||
- native_sim/native/64
|
32
tests/drivers/build_all/auxdisplay/uart_devices.overlay
Normal file
32
tests/drivers/build_all/auxdisplay/uart_devices.overlay
Normal file
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Copyright (c) 2024 TOKITA Hiroshi
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
reg = <0xdeadbeef 0x1000>;
|
||||
#gpio-cells = <0x2>;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
test_uart: uart@55556666 {
|
||||
compatible = "vnd,serial";
|
||||
reg = <0x55556666 0x1000>;
|
||||
status = "okay";
|
||||
|
||||
test_uart_itron: itron {
|
||||
compatible = "noritake,itron";
|
||||
status = "okay";
|
||||
columns = <20>;
|
||||
rows = <2>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue