tests: drivers: build all: sensor: add voltage
Add voltage sensor driver to tests. Signed-off-by: Nick Ward <nix.ward@gmail.com>
This commit is contained in:
parent
71db188091
commit
a55d7eefef
2 changed files with 19 additions and 0 deletions
|
@ -14,6 +14,16 @@ test_adc_mcp9700a: mcp9700a {
|
|||
io-channels = <&test_adc 0>;
|
||||
};
|
||||
|
||||
test_voltage: voltage {
|
||||
status = "okay";
|
||||
compatible = "voltage-divider";
|
||||
io-channels = <&test_adc 1>;
|
||||
io-channel-names = "VOLTAGE";
|
||||
output-ohms = <47000>; /* R1 */
|
||||
full-ohms = <(100000 + 47000)>; /* R2 + R1 */
|
||||
power-gpios = <&test_gpio 0 0>;
|
||||
};
|
||||
|
||||
test_current: current_amp {
|
||||
status = "okay";
|
||||
compatible = "current-sense-amplifier";
|
||||
|
|
|
@ -32,6 +32,15 @@
|
|||
zephyr,resolution = <12>;
|
||||
};
|
||||
|
||||
channel@1 {
|
||||
reg = <1>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <0>;
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
|
||||
channel@2 {
|
||||
reg = <2>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue