Loading...
Searching...
No Matches
openwsn_leds_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 HAW Hamburg
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
19
20#include "board.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
34#ifndef OPENWSN_LEDPIN_ERROR
35#if defined (LED0_PIN) && !defined(MODULE_BOARDS_COMMON_NUCLEO)
36#define OPENWSN_LEDPIN_ERROR LED0_PIN
37#else
38#define OPENWSN_LEDPIN_ERROR GPIO_UNDEF
39#endif
40#endif
41
42#ifndef OPENWSN_LEDPIN_SYNC
43#ifdef LED1_PIN
44#define OPENWSN_LEDPIN_SYNC LED1_PIN
45#else
46#define OPENWSN_LEDPIN_SYNC GPIO_UNDEF
47#endif
48#endif
49
50#ifndef OPENWSN_LEDPIN_RADIO
51#ifdef LED2_PIN
52#define OPENWSN_LEDPIN_RADIO LED2_PIN
53#else
54#define OPENWSN_LEDPIN_RADIO GPIO_UNDEF
55#endif
56#endif
57
58#ifndef OPENWSN_LEDPIN_DEBUG
59#ifdef LED3_PIN
60#define OPENWSN_LEDPIN_DEBUG LED3_PIN
61#else
62#define OPENWSN_LEDPIN_DEBUG GPIO_UNDEF
63#endif
64#endif
65
66#ifndef OPENWSN_LED_ON_STATE
67#define OPENWSN_LED_ON_STATE GPIO_LED_LOW
68#endif
69
70#define OPENWSN_LEDS_DEFAULT { .error = OPENWSN_LEDPIN_ERROR, \
71 .sync = OPENWSN_LEDPIN_SYNC, \
72 .radio = OPENWSN_LEDPIN_RADIO, \
73 .debug = OPENWSN_LEDPIN_DEBUG, \
74 .led_on = OPENWSN_LED_ON_STATE }
76
81{
82#ifdef OPENWSN_LEDS_BOARD
83 OPENWSN_LEDS_BOARD,
84#else
85 OPENWSN_LEDS_DEFAULT,
86#endif
87};
88
89#ifdef __cplusplus
90}
91#endif
struct leds_config leds_config_t
OpenWSN leds pin configuration.
static const leds_config_t openwsn_leds_params[]
OpenWSN leds configuration.