gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2018 Inria
3  * SPDX-FileCopyrightText: 2023 Gunar Schorcht
4  * SPDX-License-Identifier: LGPL-2.1-only
5  */
6 
7 #pragma once
8 
20 #include "board.h"
21 #include "saul/periph.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
31 {
32  {
33  .name = "LD2",
34  .pin = LED0_PIN,
35  .mode = GPIO_OUT,
36  .flags = SAUL_GPIO_INIT_CLEAR,
37  },
38  {
39  .name = "LD3",
40  .pin = LED1_PIN,
41  .mode = GPIO_OUT,
43  },
44  {
45  .name = "Joystick (Center)",
46  .pin = BTN0_PIN,
47  .mode = BTN0_MODE
48  },
49  {
50  .name = "Joystick (Left)",
51  .pin = BTN1_PIN,
52  .mode = BTN1_MODE
53  },
54  {
55  .name = "Joystick (Down)",
56  .pin = BTN2_PIN,
57  .mode = BTN2_MODE
58  },
59  {
60  .name = "Joystick (Right)",
61  .pin = BTN3_PIN,
62  .mode = BTN3_MODE
63  },
64  {
65  .name = "Joystick (Up)",
66  .pin = BTN4_PIN,
67  .mode = BTN4_MODE
68  },
69 };
70 
71 #ifdef __cplusplus
72 }
73 #endif
74 
#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
@ GPIO_OUT
select GPIO MASK as output
Definition: periph_cpu.h:164
Parameter definitions for mapping peripherals directly to SAUL.
@ SAUL_GPIO_INIT_CLEAR
set pin inactive after init
Definition: periph.h:43
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition: periph.h:42
static const saul_gpio_params_t saul_gpio_params[]
GPIO pin configuration.
Definition: gpio_params.h:30
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.