Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
gpio_params.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2016 Freie Universität Berlin
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
22
#include "board.h"
23
#include "
saul/periph.h
"
24
25
#ifdef __cplusplus
26
extern
"C"
{
27
#endif
28
32
static
const
saul_gpio_params_t
saul_gpio_params
[] =
33
{
34
#ifdef BTN0_PIN
35
{
36
.
name
=
"Button 1"
,
37
.pin = BTN0_PIN,
38
.mode = BTN0_MODE,
39
.flags =
SAUL_GPIO_INVERTED
,
40
},
41
#endif
42
#ifdef BTN1_PIN
43
{
44
.name =
"Button 2"
,
45
.pin =
BTN1_PIN
,
46
.mode =
BTN1_MODE
,
47
.flags =
SAUL_GPIO_INVERTED
,
48
},
49
#endif
50
#ifdef BTN2_PIN
51
{
52
.name =
"Button 3"
,
53
.pin =
BTN2_PIN
,
54
.mode =
BTN2_MODE
,
55
.flags =
SAUL_GPIO_INVERTED
,
56
},
57
#endif
58
#ifdef BTN3_PIN
59
{
60
.name =
"Button 4"
,
61
.pin = BTN3_PIN,
62
.mode = BTN3_MODE,
63
.flags =
SAUL_GPIO_INVERTED
,
64
},
65
#endif
66
};
67
68
#ifdef __cplusplus
69
}
70
#endif
71
BTN1_MODE
#define BTN1_MODE
Button B mode.
Definition:
board.h:47
BTN1_PIN
#define BTN1_PIN
Button B pin.
Definition:
board.h:46
BTN2_PIN
#define BTN2_PIN
Button 2 pin
Definition:
board.h:60
BTN2_MODE
#define BTN2_MODE
Button 2 mode
Definition:
board.h:61
saul_gpio_params
static const saul_gpio_params_t saul_gpio_params[]
Button configuration.
Definition:
gpio_params.h:32
periph.h
Parameter definitions for mapping peripherals directly to SAUL.
SAUL_GPIO_INVERTED
@ SAUL_GPIO_INVERTED
pin is used as inverted
Definition:
periph.h:42
saul_gpio_params_t
Direct mapped GPIO configuration values.
Definition:
periph.h:50
saul_gpio_params_t::name
const char * name
name of the device connected to this pin
Definition:
periph.h:51
Generated on Sat Jun 28 2025 19:41:32 by
1.9.1