gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2020 Benjamin Valentin
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 #ifndef MODULE_SAUL_PWM
31  {
32  .name = "LED Red",
33  .pin = LED0_PIN,
34  .mode = GPIO_OUT,
36  },
37  {
38  .name = "LED Green",
39  .pin = LED1_PIN,
40  .mode = GPIO_OUT,
42  },
43  {
44  .name = "LED Blue",
45  .pin = LED2_PIN,
46  .mode = GPIO_OUT,
48  },
49 #endif
50  {
51  .name = "Reset",
52  .pin = BTN0_PIN,
53  .mode = GPIO_IN_PU,
54  .flags = SAUL_GPIO_INVERTED,
55  },
56 };
57 
58 #ifdef __cplusplus
59 }
60 #endif
61 
#define LED2_PIN
RX LED yellow.
Definition: board.h:32
@ GPIO_OUT
select GPIO MASK as output
Definition: periph_cpu.h:161
@ GPIO_IN_PU
configure as input with pull-up resistor
Definition: gpio.h:121
static const saul_gpio_params_t saul_gpio_params[]
LED and button configuration for SAUL.
Definition: gpio_params.h:28
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
Board specific definitions for the Zigduino board.