-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvbatt2.overlay
43 lines (37 loc) · 1.01 KB
/
vbatt2.overlay
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
/*
* Copyright (c) 2023 Achim Kraus CloudCoap.net
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0 or Apache-2.0
*/
/*
* Usage:
*
* west build -d build_feather_nrf9160_ns -b circuitdojo_feather_nrf9160_ns --pristine -- \
* -DOVERLAY_CONFIG="60min0-prj.conf" -DDTC_OVERLAY_FILE="boards/circuitdojo_feather_nrf9160_ns.overlay;vbatt2.overlay" \
* -DCONFIG_EXT_BATTERY_ADC=y
*/
/ {
leds {
button_led: led_1 {
gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
};
};
vbatt2 {
compatible = "voltage-divider";
io-channels = <&adc 1>; /* P0.14/J3.6 */
output-ohms = <100000>;
full-ohms = <(360000 + 100000 + 100000)>;
power-gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
};
aliases {
led1 = &button_led;
led2 = &blue_led;
};
};