Add basic ADC support
Planning on abstracting this behind hardware setup APIs, but this works for a simple demo until then
This commit is contained in:
parent
9f005b547b
commit
8f0f0a0535
9 changed files with 151 additions and 0 deletions
19
boards/nrf52840dongle_nrf52840.overlay
Normal file
19
boards/nrf52840dongle_nrf52840.overlay
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
/ {
|
||||
zephyr,user {
|
||||
io-channels = <&adc 0>;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
channel@0 {
|
||||
reg = <0>;
|
||||
zephyr,gain = "ADC_GAIN_1_6";
|
||||
zephyr,reference = "ADC_REF_INTERNAL";
|
||||
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||
zephyr,input-positive = <NRF_SAADC_AIN0>; /* P0.02 */
|
||||
zephyr,resolution = <12>;
|
||||
};
|
||||
};
|
||||
Loading…
Reference in a new issue