gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
20 #include "board.h"
21 #include "saul/periph.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 {
32  {
33  .name = "LED(blue)",
34  .pin = LED0_PIN,
35  .mode = GPIO_OUT
36  },
37  {
38  .name = "LED(green)",
39  .pin = LED1_PIN,
40  .mode = GPIO_OUT
41  },
42  {
43  .name = "LED(red)",
44  .pin = LED2_PIN,
45  .mode = GPIO_OUT
46  },
47  {
48  .name = "Button(B1 User)",
49  .pin = BTN0_PIN,
50  .mode = BTN0_MODE,
51  .flags = SAUL_GPIO_INVERTED,
52  },
53  {
54  .name = "Button(B2 User)",
55  .pin = BTN1_PIN,
56  .mode = BTN1_MODE,
57  .flags = SAUL_GPIO_INVERTED,
58  },
59  {
60  .name = "Button(B3 User)",
61  .pin = BTN2_PIN,
62  .mode = BTN2_MODE,
63  .flags = SAUL_GPIO_INVERTED,
64  },
65 };
66 
67 #ifdef __cplusplus
68 }
69 #endif
70 
#define BTN1_MODE
Button B mode.
Definition: board.h:44
#define BTN1_PIN
Button B pin.
Definition: board.h:43
#define LED2_PIN
RX LED yellow.
Definition: board.h:32
#define BTN2_PIN
Button 2 pin
Definition: board.h:57
#define BTN2_MODE
Button 2 mode
Definition: board.h:58
@ GPIO_OUT
select GPIO MASK as output
Definition: periph_cpu.h:164
static const saul_gpio_params_t saul_gpio_params[]
GPIO pin configuration.
Definition: gpio_params.h:30
Parameter definitions for mapping peripherals directly to SAUL.
@ 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.