gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2016 Freie Universität Berlin
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
19 #include "board.h"
20 #include "saul/periph.h"
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
30 {
31 #ifdef BTN0_PIN
32  {
33  .name = "Button 1",
34  .pin = BTN0_PIN,
35  .mode = BTN0_MODE,
36  .flags = SAUL_GPIO_INVERTED,
37  },
38 #endif
39 #ifdef BTN1_PIN
40  {
41  .name = "Button 2",
42  .pin = BTN1_PIN,
43  .mode = BTN1_MODE,
44  .flags = SAUL_GPIO_INVERTED,
45  },
46 #endif
47 #ifdef BTN2_PIN
48  {
49  .name = "Button 3",
50  .pin = BTN2_PIN,
51  .mode = BTN2_MODE,
52  .flags = SAUL_GPIO_INVERTED,
53  },
54 #endif
55 #ifdef BTN3_PIN
56  {
57  .name = "Button 4",
58  .pin = BTN3_PIN,
59  .mode = BTN3_MODE,
60  .flags = SAUL_GPIO_INVERTED,
61  },
62 #endif
63 };
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
#define BTN1_MODE
Button B mode.
Definition: board.h:44
#define BTN1_PIN
Button B pin.
Definition: board.h:43
#define BTN2_PIN
Button 2 pin
Definition: board.h:57
#define BTN2_MODE
Button 2 mode
Definition: board.h:58
static const saul_gpio_params_t saul_gpio_params[]
Button configuration.
Definition: gpio_params.h:29
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