-
Notifications
You must be signed in to change notification settings - Fork 0
/
nrf52840dk_nrf52840.overlay
102 lines (84 loc) · 2.22 KB
/
nrf52840dk_nrf52840.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
// To get started, press Ctrl+Space (or Option+Esc) to bring up the completion menu and view the available nodes.
// You can also use the buttons in the sidebar to perform actions on nodes.
// Actions currently available include:
// * Enabling / disabling the node
// * Adding the bus to a bus
// * Removing the node
// * Connecting ADC channels
// For more help, browse the DeviceTree documentation at https://docs.zephyrproject.org/latest/guides/dts/index.html
// You can also visit the nRF DeviceTree extension documentation at https://nrfconnect.github.io/vscode-nrf-connect/devicetree/nrfdevicetree.html
/ {
dht22 {
compatible = "aosong,dht";
status = "okay";
dio-gpios = <&gpio0 13 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
dht22;
};
zephyr,user {
io-channels = <&adc 4>;
};
};
&i2c0 {
clock-frequency = <I2C_BITRATE_STANDARD>;
ht16k33_ledmatrix: ht16k33@70 {
compatible = "holtek,ht16k33";
reg = <0x70>;
keyscan {
compatible = "holtek,ht16k33-keyscan";
};
};
};
/ {
aliases {
// sw0 = &pin7_button0;
myserial = &uart1;
};
// buttons {
// pin7_button0: button_0 {
// gpios = <&gpio0 7 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
// };
// };
};
// &uart0 {
// status = "disabled";
// };
arduino_serial: &uart1 {
status = "okay";
compatible = "nordic,nrf-uart";
current-speed = <9600>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
&pinctrl {
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>;
bias-pull-up;
};
group2 {
// psels = <NRF_PSEL(UART_TX, 1, 11)>;
psels = <NRF_PSEL(UART_TX, 1, 8)>;
};
};
uart1_sleep: uart1_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>,
<NRF_PSEL(UART_TX, 1, 11)>;
//psels = <NRF_PSEL(UART_RX, 0, 7)>, <NRF_PSEL(UART_TX,0, 6)>;
low-power-enable;
};
};
};
&adc {
#address-cells = <1>;
#size-cells = <0>;
channel@4 {
reg = <4>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,input-positive = <NRF_SAADC_AIN4>; /* P0.28 */
zephyr,resolution = <10>;
};
};