gpio_params.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Gerson Fernando Budke
3  *
4  * This file is subject to the terms and conditions of the GNU Lesser
5  * General Public License v2.1. See the file LICENSE in the top level
6  * directory for more details.
7  */
8 
9 #pragma once
10 
21 #include "board.h"
22 #include "saul/periph.h"
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
32 {
33  {
34  .name = "SW0",
35  .pin = BTN0_PIN,
36  .mode = BTN0_MODE,
37  .flags = SAUL_GPIO_INVERTED,
38  },
39  {
40  .name = "SW1",
41  .pin = BTN1_PIN,
42  .mode = BTN1_MODE,
43  .flags = SAUL_GPIO_INVERTED,
44  },
45  {
46  .name = "SW2",
47  .pin = BTN2_PIN,
48  .mode = BTN2_MODE,
49  .flags = SAUL_GPIO_INVERTED,
50  },
51  {
52  .name = "SW3",
53  .pin = BTN3_PIN,
54  .mode = BTN3_MODE,
55  .flags = SAUL_GPIO_INVERTED,
56  },
57  {
58  .name = "SW4",
59  .pin = BTN4_PIN,
60  .mode = BTN4_MODE,
61  .flags = SAUL_GPIO_INVERTED,
62  },
63  {
64  .name = "SW5",
65  .pin = BTN5_PIN,
66  .mode = BTN5_MODE,
67  .flags = SAUL_GPIO_INVERTED,
68  },
69  {
70  .name = "SW6",
71  .pin = BTN6_PIN,
72  .mode = BTN6_MODE,
73  .flags = SAUL_GPIO_INVERTED,
74  },
75  {
76  .name = "SW7",
77  .pin = BTN7_PIN,
78  .mode = BTN7_MODE,
79  .flags = SAUL_GPIO_INVERTED,
80  },
81  {
82  .name = "LED0",
83  .pin = LED0_PIN,
84  .mode = LED0_MODE,
85  .flags = SAUL_GPIO_INVERTED,
86  },
87  {
88  .name = "LED1",
89  .pin = LED1_PIN,
90  .mode = LED1_MODE,
91  .flags = SAUL_GPIO_INVERTED,
92  },
93  {
94  .name = "LED2",
95  .pin = LED2_PIN,
96  .mode = LED2_MODE,
97  .flags = SAUL_GPIO_INVERTED,
98  },
99  {
100  .name = "LED3",
101  .pin = LED3_PIN,
102  .mode = LED3_MODE,
103  .flags = SAUL_GPIO_INVERTED,
104  },
105  {
106  .name = "LED4",
107  .pin = LED4_PIN,
108  .mode = LED4_MODE,
109  .flags = SAUL_GPIO_INVERTED,
110  },
111  {
112  .name = "LED5",
113  .pin = LED5_PIN,
114  .mode = LED5_MODE,
115  .flags = SAUL_GPIO_INVERTED,
116  },
117  {
118  .name = "LED6",
119  .pin = LED6_PIN,
120  .mode = LED6_MODE,
121  .flags = SAUL_GPIO_INVERTED,
122  },
123  {
124  .name = "LED7",
125  .pin = LED7_PIN,
126  .mode = LED7_MODE,
127  .flags = SAUL_GPIO_INVERTED,
128  },
129 };
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
#define BTN1_MODE
Button B mode.
Definition: board.h:47
#define BTN1_PIN
Button B pin.
Definition: board.h:46
#define LED2_PIN
RX LED yellow.
Definition: board.h:35
#define BTN2_PIN
Button 2 pin
Definition: board.h:60
#define BTN2_MODE
Button 2 mode
Definition: board.h:61
static const saul_gpio_params_t saul_gpio_params[]
GPIO configuration.
Definition: gpio_params.h:31
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.