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) 2019 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#if !defined(CONFIG_CAF_LEDS)
23 {30, 0}, /* LED red */
24 {29, 0}, /* LED green */
25 {28, 0}, /* LED blue */
26#endif
27};
28
29static const struct pin_state port0_off[] = {
30#if !defined(CONFIG_CAF_LEDS)
31 {30, 1}, /* LED red */
32 {29, 1}, /* LED green */
33 {28, 1}, /* LED blue */
34#endif
35};
36
37
38static const struct port_state port_state_on[] = {
39 {
40 .port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),
41 .ps = port0_on,
42 .ps_count = ARRAY_SIZE(port0_on),
43 }
44};
45
46static const struct port_state port_state_off[] = {
47 {
48 .port = DEVICE_DT_GET(DT_NODELABEL(gpio0)),
49 .ps = port0_off,
50 .ps_count = ARRAY_SIZE(port0_off),
51 }
52};
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
Definition port_state.h:19
Definition port_state.h:24