summaryrefslogtreecommitdiff
path: root/app/boards/arm
diff options
context:
space:
mode:
Diffstat (limited to 'app/boards/arm')
-rw-r--r--app/boards/arm/bluemicro840/bluemicro840_v1.dts8
-rw-r--r--app/boards/arm/bluemicro840/bluemicro840_v1_defconfig4
-rw-r--r--app/boards/arm/nice_nano/nice_nano.dts16
-rw-r--r--app/boards/arm/nice_nano/nice_nano_defconfig4
-rw-r--r--app/boards/arm/nrfmicro/nrfmicro_13.dts16
-rw-r--r--app/boards/arm/nrfmicro/nrfmicro_13_defconfig4
6 files changed, 48 insertions, 4 deletions
diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts
index c693662..ac8ba56 100644
--- a/app/boards/arm/bluemicro840/bluemicro840_v1.dts
+++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts
@@ -29,6 +29,14 @@
};
};
+ vbatt {
+ compatible = "zmk,battery-voltage-divider";
+ label = "VOLTAGE_DIVIDER";
+ io-channels = <&adc 7>;
+ output-ohms = <2000000>;
+ full-ohms = <(2000000 + 806000)>;
+ };
+
};
&gpio0 {
diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig
index 96f03ca..2a79981 100644
--- a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig
+++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig
@@ -10,6 +10,10 @@ CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
+CONFIG_ADC=y
+
+CONFIG_NEWLIB_LIBC=y
+
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
diff --git a/app/boards/arm/nice_nano/nice_nano.dts b/app/boards/arm/nice_nano/nice_nano.dts
index 0538b1d..997d195 100644
--- a/app/boards/arm/nice_nano/nice_nano.dts
+++ b/app/boards/arm/nice_nano/nice_nano.dts
@@ -28,12 +28,24 @@
label = "Blue LED";
};
};
-
- ext-power {
+
+ ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
+
+ vbatt {
+ compatible = "zmk,battery-voltage-divider";
+ label = "VOLTAGE_DIVIDER";
+ io-channels = <&adc 2>;
+ output-ohms = <2000000>;
+ full-ohms = <(2000000 + 806000)>;
+ };
+};
+
+&adc {
+ status = "okay";
};
&gpiote {
diff --git a/app/boards/arm/nice_nano/nice_nano_defconfig b/app/boards/arm/nice_nano/nice_nano_defconfig
index 393d61f..b727fe0 100644
--- a/app/boards/arm/nice_nano/nice_nano_defconfig
+++ b/app/boards/arm/nice_nano/nice_nano_defconfig
@@ -10,6 +10,10 @@ CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
+CONFIG_ADC=y
+
+CONFIG_NEWLIB_LIBC=y
+
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y
diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts
index ef43946..ae6c1af 100644
--- a/app/boards/arm/nrfmicro/nrfmicro_13.dts
+++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts
@@ -25,12 +25,24 @@
label = "Blue LED";
};
};
-
- ext-power {
+
+ ext-power {
compatible = "zmk,ext-power-generic";
label = "EXT_POWER";
control-gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
};
+
+ vbatt {
+ compatible = "zmk,battery-voltage-divider";
+ label = "VOLTAGE_DIVIDER";
+ io-channels = <&adc 2>;
+ output-ohms = <2000000>;
+ full-ohms = <(2000000 + 820000)>;
+ };
+};
+
+&adc {
+ status = "okay";
};
&gpio0 {
diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig
index cac1164..0421653 100644
--- a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig
+++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig
@@ -10,6 +10,10 @@ CONFIG_ARM_MPU=y
# enable GPIO
CONFIG_GPIO=y
+CONFIG_ADC=y
+
+CONFIG_NEWLIB_LIBC=y
+
CONFIG_USE_DT_CODE_PARTITION=y
CONFIG_MPU_ALLOW_FLASH_WRITE=y