Loading...
Searching...
No Matches
gpio_params.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2024 Marian Buschsieweke
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17#include "board.h"
18#include "saul/periph.h"
19
20#ifdef __cplusplus
21extern "C"
22{
23#endif
24
29 {
30 {
31 .name = "LED Green",
32 .pin = LED_GREEN_PIN,
33 .mode = GPIO_OUT,
34 },
35 {
36 .name = "LED Red",
37 .pin = LED_RED_PIN,
38 .mode = GPIO_OUT,
39 },
40 {
41 .name = "LED Yellow",
42 .pin = LED_YELLOW_PIN,
43 .mode = GPIO_OUT,
44 },
45 {
46 .name = "LED Blue",
47 .pin = LED_BLUE_PIN,
48 .mode = GPIO_OUT,
49 },
50 {
51 .name = "BTN Left",
52 .pin = BTN_LEFT_PIN,
53 .mode = BTN_LEFT_MODE,
54 .flags = SAUL_GPIO_INVERTED,
55 },
56 {
57 .name = "BTN Right",
58 .pin = BTN_RIGHT_PIN,
59 .mode = BTN_RIGHT_MODE,
60 .flags = SAUL_GPIO_INVERTED,
61 },
62 {
63 .name = "BTN Up",
64 .pin = BTN_UP_PIN,
65 .mode = BTN_UP_MODE,
66 .flags = SAUL_GPIO_INVERTED,
67 },
68 {
69 .name = "BTN Down",
70 .pin = BTN_DOWN_PIN,
71 .mode = BTN_DOWN_MODE,
72 .flags = SAUL_GPIO_INVERTED,
73 },
74 {
75 .name = "BTN Select",
76 .pin = BTN_SELECT_PIN,
77 .mode = BTN_DOWN_MODE,
78 .flags = SAUL_GPIO_INVERTED,
79 },
80};
81
82#ifdef __cplusplus
83}
84#endif
85
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition gpio_params.h:29
#define LED_GREEN_PIN
LED1 is a green LED.
Definition board.h:45
#define LED_BLUE_PIN
LED2 is a blue LED.
Definition board.h:49
#define LED_RED_PIN
LED0 is a red LED.
Definition board.h:41
@ GPIO_OUT
select GPIO MASK as output
Definition periph_cpu.h:164
Definitions for the Generic CC2538-CC2592-DK Board.
#define BTN_RIGHT_PIN
GPIO pin for button "RIGHT".
Definition board.h:84
#define BTN_LEFT_PIN
GPIO pin for button "LEFT".
Definition board.h:79
#define LED_YELLOW_PIN
GPIO pin for yellow LED.
Definition board.h:44
#define BTN_UP_MODE
GPIO mode for button "UP".
Definition board.h:90
#define BTN_LEFT_MODE
GPIO mode for button "LEFT".
Definition board.h:80
#define BTN_DOWN_PIN
GPIO pin for button "DOWN".
Definition board.h:94
#define BTN_UP_PIN
GPIO pin for button "UP".
Definition board.h:89
#define BTN_SELECT_PIN
GPIO pin for button "SELECT".
Definition board.h:99
#define BTN_DOWN_MODE
GPIO mode for button "DOWN".
Definition board.h:95
#define BTN_RIGHT_MODE
GPIO mode for button "RIGHT".
Definition board.h:85
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