Skip to content

Commit a774cbc

Browse files
rriveramcruscarlescufi
authored andcommitted
tests: build_all: Adds Haptics build test
Adds Haptics build test Signed-off-by: Ricardo Rivera-Matos <[email protected]>
1 parent b5a5bdd commit a774cbc

File tree

6 files changed

+67
-0
lines changed

6 files changed

+67
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Cirrus Logic, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
cmake_minimum_required(VERSION 3.20.0)
5+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
6+
project(build_all)
7+
8+
target_sources(app PRIVATE src/main.c)
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2024 Cirrus Logic, Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/i2c/i2c.h>
7+
8+
/ {
9+
test {
10+
#address-cells = <1>;
11+
#size-cells = <1>;
12+
13+
test_i2c: i2c@11112222 {
14+
#address-cells = <1>;
15+
#size-cells = <0>;
16+
compatible = "vnd,i2c";
17+
reg = <0x11112222 0x1000>;
18+
status = "okay";
19+
clock-frequency = <I2C_BITRATE_STANDARD>;
20+
21+
#include "i2c.dtsi"
22+
};
23+
};
24+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2024 Cirrus Logic, Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/****************************************
7+
* PLEASE KEEP REG ADDRESSES SEQUENTIAL *
8+
***************************************/
9+
10+
drv2605@0 {
11+
compatible = "ti,drv2605";
12+
reg = <0x0>;
13+
status = "okay";
14+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_HAPTICS=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/*
2+
* Copyright (c) 2024 Cirrus Logic, Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
int main(void)
7+
{
8+
return 0;
9+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2024 Cirrus Logic, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
tests:
5+
drivers.haptics.build:
6+
tags:
7+
- drivers
8+
- haptics
9+
build_only: true
10+
platform_allow:
11+
- native_sim

0 commit comments

Comments
 (0)