-
Notifications
You must be signed in to change notification settings - Fork 1
/
one-wire-uart1.overlay
56 lines (51 loc) · 1.38 KB
/
one-wire-uart1.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
/*
* 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
*
* Based on
* https://github.com/zephyrproject-rtos/zephyr/blob/main/samples/sensor/ds18b20/boards/nrf52840dk_nrf52840.overlay
*
* 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="one-wire-prj.conf" -DDTC_OVERLAY_FILE="boards/nrf9160dk_nrf9160_ns.overlay;one-wire-uart1.overlay"
*/
one_wire_serial: &uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart1_default>;
pinctrl-1 = <&uart1_sleep>;
pinctrl-names = "default", "sleep";
};
#include "serial_overlay.dtsi"
&pinctrl {
uart1_default: uart1_default {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 0)>;
bias-pull-up;
};
group2 {
psels = <NRF_PSEL(UART_TX, 0, 1)>;
/* max. 5mA drive strength: */
nordic,drive-mode = <NRF_DRIVE_H0D1>;
};
};
};
/ {
/*
* Map the devices to the aliases of the application.
*/
aliases {
/* alias for sensor with SENSOR_CHAN_AMBIENT_TEMP channel */
temperature-sensor = &ds18b20;
};
};