-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmikroe219.overlay
61 lines (56 loc) · 1.42 KB
/
mikroe219.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/*
* 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_nrf9160dk_nrf9160_ns -b nrf9160dk_nrf9160_ns --pristine -- \
* -DOVERLAY_CONFIG="60min0-prj.conf;mikroe-prj.conf" -DDTC_OVERLAY_FILE="mikroe219.overlay"
*
* Note: the INA219 modules may come with different I2C addresses and with different
* SHUNTs. That may require to adapt the DTS description.
*
* A0 A1 I2C
* 0 0 0x40
* 1 0 0x41
* 0 1 0x44
* 1 1 0x45
*
* lsb-microamp = <10>; // max. 300mA => max expected current / 2^15
*
* See dts/bindings/sensor/ti,ina219.yaml
*/
#include "mikroe.overlay"
&i2c2 {
ina219_0: ina219@40 {
// GY-INA219, 100 mOhm
compatible = "ti,ina219";
reg = <0x40>;
brng = <0>;
pg = <0>;
sadc = <13>;
badc = <13>;
shunt-milliohm = <100>;
lsb-microamp = <10>; // max. 300mA
};
ina219_1: ina219@45 {
// Gravity, Wattmeter v2.1.0, , 10 mOhm
compatible = "ti,ina219";
reg = <0x45>;
brng = <0>;
pg = <0>;
sadc = <13>;
badc = <13>;
shunt-milliohm = <010>;
lsb-microamp = <10>; // max. 300mA
};
};