nRF Connect SDK API 3.3.99
Loading...
Searching...
No Matches
port_state_def.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2018 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5 */
6
7#include <soc.h>
8
9#include "port_state.h"
10
11/* This configuration file is included only once from board module and holds
12 * information about default pin states set while board is on and off.
13 */
14
15/* This structure enforces the header file is included only once in the build.
16 * Violating this requirement triggers a multiple definition error at link time.
17 */
19
20
21static const struct pin_state port0_on[] = {
22};
23
24static const struct pin_state port1_on[] = {
25};
26
27static const struct pin_state port0_off[] = {
28};
29
30static const struct pin_state port1_off[] = {
31};
32
33
34static const struct port_state port_state_on[] = {
35 {
36 .port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),
37 .ps = port0_on,
38 .ps_count = ARRAY_SIZE(port0_on),
39 },
40 {
41 .port = DEVICE_DT_GET(DT_NODELABEL(gpio1)),
42 .ps = port1_on,
43 .ps_count = ARRAY_SIZE(port1_on),
44 }
45};
46
47static const struct port_state port_state_off[] = {
48 {
49 .port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),
50 .ps = port0_off,
51 .ps_count = ARRAY_SIZE(port0_off),
52 },
53 {
54 .port = DEVICE_DT_GET(DT_NODELABEL(gpio1)),
55 .ps = port1_off,
56 .ps_count = ARRAY_SIZE(port1_off),
57 }
58};
static const struct pin_state port0_off[]
Definition port_state_def.h:24
static const struct pin_state port0_on[]
Definition port_state_def.h:21
static const struct port_state port_state_off[]
Definition port_state_def.h:36
static const struct port_state port_state_on[]
Definition port_state_def.h:28
const struct @16 port_state_def_include_once
static const struct pin_state port1_on[]
Definition port_state_def.h:26
static const struct pin_state port1_off[]
Definition port_state_def.h:32
Definition port_state.h:19
Definition port_state.h:24