tests: drivers: build_all: sensor: add MCP90X
Add MCP90X temperature sensor to build all test Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
51597cbc82
commit
734993d3bb
3 changed files with 37 additions and 0 deletions
14
tests/drivers/build_all/sensor/adc.dtsi
Normal file
14
tests/drivers/build_all/sensor/adc.dtsi
Normal file
|
@ -0,0 +1,14 @@
|
|||
/*
|
||||
* Copyright (c) 2023 FTP Technologies
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Application overlay for ADC devices
|
||||
*/
|
||||
|
||||
test_adc_mcp9700a: mcp9700a {
|
||||
status = "okay";
|
||||
compatible = "microchip,mcp970x";
|
||||
family = "MCP9700/9700A";
|
||||
io-channels = <&test_adc 0>;
|
||||
};
|
|
@ -10,11 +10,33 @@
|
|||
* (and be extended to test) real hardware.
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
|
||||
/ {
|
||||
test {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
test_adc: adc@adc0adc0 {
|
||||
compatible = "vnd,adc";
|
||||
reg = <0xadc0adc0 0x1000>;
|
||||
#io-channel-cells = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
status = "okay";
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1";
|
||||
zephyr,reference = "ADC_REF_VDD_1";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <0>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
|
||||
#include "adc.dtsi"
|
||||
};
|
||||
|
||||
test_gpio: gpio@deadbeef {
|
||||
compatible = "vnd,gpio";
|
||||
gpio-controller;
|
||||
|
|
|
@ -3,6 +3,7 @@ CONFIG_TEST_USERSPACE=y
|
|||
CONFIG_LOG=y
|
||||
CONFIG_SENSOR_LOG_LEVEL_DBG=y
|
||||
CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000
|
||||
CONFIG_ADC=y
|
||||
CONFIG_GPIO=y
|
||||
CONFIG_I2C=y
|
||||
CONFIG_SERIAL=y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue