Loading...
Searching...
No Matches
gpio_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2024 Marian Buschsieweke
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
18#ifndef GPIO_PARAMS_H
19#define GPIO_PARAMS_H
20
21#include "board.h"
22#include "saul/periph.h"
23
24#ifdef __cplusplus
25extern "C"
26{
27#endif
28
33 {
34 {
35 .name = "LED Green",
36 .pin = LED_GREEN_PIN,
37 .mode = GPIO_OUT,
38 },
39 {
40 .name = "LED Red",
41 .pin = LED_RED_PIN,
42 .mode = GPIO_OUT,
43 },
44 {
45 .name = "LED Yellow",
46 .pin = LED_YELLOW_PIN,
47 .mode = GPIO_OUT,
48 },
49 {
50 .name = "LED Blue",
51 .pin = LED_BLUE_PIN,
52 .mode = GPIO_OUT,
53 },
54 {
55 .name = "BTN Left",
56 .pin = BTN_LEFT_PIN,
57 .mode = BTN_LEFT_MODE,
58 .flags = SAUL_GPIO_INVERTED,
59 },
60 {
61 .name = "BTN Right",
62 .pin = BTN_RIGHT_PIN,
63 .mode = BTN_RIGHT_MODE,
64 .flags = SAUL_GPIO_INVERTED,
65 },
66 {
67 .name = "BTN Up",
68 .pin = BTN_UP_PIN,
69 .mode = BTN_UP_MODE,
70 .flags = SAUL_GPIO_INVERTED,
71 },
72 {
73 .name = "BTN Down",
74 .pin = BTN_DOWN_PIN,
75 .mode = BTN_DOWN_MODE,
76 .flags = SAUL_GPIO_INVERTED,
77 },
78 {
79 .name = "BTN Select",
80 .pin = BTN_SELECT_PIN,
81 .mode = BTN_DOWN_MODE,
82 .flags = SAUL_GPIO_INVERTED,
83 },
84};
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* GPIO_PARAMS_H */
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition gpio_params.h:33
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:165
#define LED_GREEN_PIN
LED1 is a green LED.
Definition board.h:74
#define LED_RED_PIN
LED0 is a red LED.
Definition board.h:71
#define BTN_RIGHT_PIN
GPIO pin for button "RIGHT".
Definition board.h:88
#define BTN_LEFT_PIN
GPIO pin for button "LEFT".
Definition board.h:83
#define LED_YELLOW_PIN
GPIO pin for yellow LED.
Definition board.h:48
#define BTN_UP_MODE
GPIO mode for button "UP".
Definition board.h:94
#define BTN_LEFT_MODE
GPIO mode for button "LEFT".
Definition board.h:84
#define BTN_DOWN_PIN
GPIO pin for button "DOWN".
Definition board.h:98
#define BTN_UP_PIN
GPIO pin for button "UP".
Definition board.h:93
#define BTN_SELECT_PIN
GPIO pin for button "SELECT".
Definition board.h:103
#define BTN_DOWN_MODE
GPIO mode for button "DOWN".
Definition board.h:99
#define BTN_RIGHT_MODE
GPIO mode for button "RIGHT".
Definition board.h:89
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition periph.h:43
Direct mapped GPIO configuration values.
Definition periph.h:51
const char * name
name of the device connected to this pin
Definition periph.h:52
Board specific definitions for the Zigduino board.