Adds board revisions for nRF52833 variant

This commit is contained in:
rbaron 2022-12-03 11:03:55 +01:00
parent dc88916823
commit f476e69229
9 changed files with 60 additions and 2 deletions

View file

@ -0,0 +1,30 @@
/ {
// Light dependant resistor.
ldr: ldr {
compatible = "voltage-divider";
output-ohms = <10000>;
io-channels = <&adc 1>;
};
ctrl {
compatible = "gpio-keys";
ldr_enable: ldr_enable {
// P0.29.
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
label = "Fast discharge circuitry";
};
};
};
&adc {
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1_6";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
// P0.02.
zephyr,input-positive = <NRF_SAADC_AIN0>;
zephyr,resolution = <10>;
};
};

View file

@ -0,0 +1,29 @@
/ {
photo_transistor: photo_transistor {
compatible = "voltage-divider";
output-ohms = <470>;
io-channels = <&adc 1>;
};
ctrl {
compatible = "gpio-keys";
photo_transistor_enable: photo_transistor_enable {
// P0.29.
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
label = "Fast discharge circuitry";
};
};
};
&adc {
channel@1 {
reg = <1>;
zephyr,gain = "ADC_GAIN_1_6";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
// P0.02.
zephyr,input-positive = <NRF_SAADC_AIN0>;
zephyr,resolution = <10>;
};
};

View file

@ -0,0 +1 @@
board_check_revision(FORMAT MAJOR.MINOR.PATCH)