gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Eistec AB
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "board.h"
19 #include "saul/periph.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
29 {
30  /* There are three LEDs on board, but only two are software controllable,
31  * and one is driven by the debugger interface unless hardware mods have
32  * been applied. See boards/usb-kw41z/include/board.h */
33 #ifdef LED0_PIN
34  {
35  .name = "D2",
36  .pin = LED0_PIN,
37  .mode = GPIO_OUT,
39  },
40 #endif /* LED0_PIN */
41 #ifdef LED1_PIN
42  {
43  .name = "D3",
44  .pin = LED1_PIN,
45  .mode = GPIO_OUT,
47  },
48 #endif /* LED1_PIN */
49  {
50  .name = "SW1",
51  .pin = BTN0_PIN,
52  .mode = BTN0_MODE,
53  .flags = (SAUL_GPIO_INVERTED),
54  },
55 };
56 
57 #ifdef __cplusplus
58 }
59 #endif
60 
@ GPIO_OUT
select GPIO MASK as output
Definition: periph_cpu.h:161
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
Direct mapped GPIO configuration values.
Definition: periph.h:50
const char * name
name of the device connected to this pin
Definition: periph.h:51
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition: gpio_params.h:28
Board specific definitions for the Zigduino board.