gpio_params.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2021 Luo Jia (HUST IoT Security Lab)
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
18 #include "board.h"
19 #include "saul/periph.h"
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
29 {
30 #ifndef MODULE_SAUL_PWM
31  {
32  .name = "LED Red",
33  .pin = LED0_PIN,
34  .mode = GPIO_OUT,
36  },
37  {
38  .name = "LED Green",
39  .pin = LED1_PIN,
40  .mode = GPIO_OUT,
42  },
43  {
44  .name = "LED Blue",
45  .pin = LED2_PIN,
46  .mode = GPIO_OUT,
48  },
49 #endif
50  {
51  .name = "Wakeup Key",
52  .pin = BTNWK_PIN,
53  .mode = BTNWK_MODE
54  },
55  {
56  .name = "Key 0",
57  .pin = BTN0_PIN,
58  .mode = BTN0_MODE,
59  .flags = SAUL_GPIO_INVERTED
60  },
61  {
62  .name = "Key 1",
63  .pin = BTN1_PIN,
64  .mode = BTN1_MODE,
65  .flags = SAUL_GPIO_INVERTED
66  },
67  {
68  .name = "Key 2",
69  .pin = BTN2_PIN,
70  .mode = BTN2_MODE,
71  .flags = SAUL_GPIO_INVERTED
72  }
73 };
74 
75 #ifdef __cplusplus
76 }
77 #endif
78 
#define BTN1_MODE
Button B mode.
Definition: board.h:44
#define BTN1_PIN
Button B pin.
Definition: board.h:43
#define LED2_PIN
RX LED yellow.
Definition: board.h:32
#define BTN2_PIN
Button 2 pin
Definition: board.h:57
#define BTNWK_MODE
Wake button mode.
Definition: board.h:49
#define BTN2_MODE
Button 2 mode
Definition: board.h:58
#define BTNWK_PIN
Wake button pin
Definition: board.h:48
static const saul_gpio_params_t saul_gpio_params[]
GPIO pin configuration.
Definition: gpio_params.h:28
@ 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
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.