Loading...
Searching...
No Matches
gpio_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2018 Eistec AB
3 * SPDX-FileCopyrightText: 2018 HAW Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
19
20#include "board.h"
21#include "saul/periph.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
31{
32 /* There are 2 user controlled LEDs on board. An orange LED (D2) and an
33 * RGB LED (D10). The RGB LED is configured with 3 LEDx macros. */
34#ifdef LED0_PIN
35 {
36 .name = "D2 (Orange)",
37 .pin = LED0_PIN,
38 .mode = GPIO_OUT,
40 },
41#endif /* LED0_PIN */
42#ifdef LED1_PIN
43 {
44 .name = "D10 RGB (Red)",
45 .pin = LED1_PIN,
46 .mode = GPIO_OUT,
48 },
49#endif /* LED1_PIN */
50#ifdef LED2_PIN
51 {
52 .name = "D10 RGB (Green)",
53 .pin = LED2_PIN,
54 .mode = GPIO_OUT,
56 },
57#endif /* LED1_PIN */
58#ifdef LED3_PIN
59 {
60 .name = "D10 RGB (Blue)",
61 .pin = LED3_PIN,
62 .mode = GPIO_OUT,
64 },
65#endif /* LED1_PIN */
66 {
67 .name = "S2 (Button)",
68 .pin = BTN0_PIN,
69 .mode = BTN0_MODE,
70 .flags = (SAUL_GPIO_INVERTED),
71 },
72};
73
74#ifdef __cplusplus
75}
76#endif
77
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition gpio_params.h:29
#define LED2_PIN
RX LED yellow.
Definition board.h:32
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:164
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_GPIO_INIT_CLEAR
set pin inactive after init
Definition periph.h:43
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition periph.h:42
Board specific definitions for the USB-KW41Z.
Direct mapped GPIO configuration values.
Definition periph.h:50