-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathhivescale-feather.overlay
135 lines (110 loc) · 2.63 KB
/
hivescale-feather.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
/*
* 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
*/
/*
* Usage:
*
* west build -d build_feather_nrf9160_ns -b circuitdojo_feather_nrf9160_ns --pristine -- \
* -DOVERLAY_CONFIG="60min0-prj.conf;at-cmd-prj.conf;hivescale-prj.conf" \
* -DDTC_OVERLAY_FILE="hivescale-feather.overlay" -DCONFIG_BATTERY_TYPE_ENELOOP_2000_MAH=y
*/
#include "boards/circuitdojo_feather_nrf9160_ns.overlay"
&pinctrl {
i2c2_default: i2c2_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 1)>,
<NRF_PSEL(TWIM_SCL, 0, 2)>;
// This I/Os have no pull-ups on the feather.
// The pull-ups on the ADC/NAU board
// are too weak for longer lines.
bias-pull-up;
};
};
i2c2_sleep: i2c2_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 1)>,
<NRF_PSEL(TWIM_SCL, 0, 2)>;
low-power-enable;
};
};
};
&i2c1 {
clock-frequency = <I2C_BITRATE_STANDARD>;
eeprom_a: eeprom@50 {
/* AT24HC04B (4 kbit eeprom 512x8 bit) */
/* NOTE: the 9th address bit collides with the 0x51 of the feather clock chip. */
compatible = "atmel,at24";
reg = <0x50>;
size = <512>;
pagesize = <16>;
address-width = <8>;
timeout = <5>;
};
scale_a: scale@2a {
compatible = "nau7802-scale";
reg = <0x2a>;
avref_mv = <3000>;
gain = <64>;
calibration_storage = <&eeprom_a>;
};
};
&i2c2 {
compatible = "nordic,nrf-twim";
status = "okay";
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
pinctrl-names = "default", "sleep";
clock-frequency = <I2C_BITRATE_STANDARD>;
eeprom_b: eeprom@50 {
/* AT24HC04B (4 kbit eeprom 512x8 bit) */
compatible = "atmel,at24";
reg = <0x50>;
size = <512>;
pagesize = <16>;
address-width = <8>;
timeout = <5>;
};
scale_b: scale@2a {
compatible = "nau7802-scale";
reg = <0x2a>;
avref_mv = <3000>;
gain = <64>;
calibration_storage = <&eeprom_b>;
};
};
/ {
leds {
red_led_ext: led_1 {
gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
};
green_led_ext: led_2 {
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
};
blue_led_ext: led_3 {
gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
};
};
buttons {
compatible = "gpio-keys";
button1: button_1 {
gpios = <&gpio0 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
};
};
aliases {
led0 = &red_led_ext;
led1 = &green_led_ext;
led2 = &blue_led_ext;
sw0 = &button1;
scale-a = &scale_a;
scale-b = &scale_b;
};
};