Loading...
Searching...
No Matches
gpio_params.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2021 Inria
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
20
21#include "board.h"
22#include "saul/periph.h"
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32{
33 {
34 .name = "Button A",
35 .pin = BTN0_PIN,
36 .mode = BTN0_MODE,
37 .flags = SAUL_GPIO_INVERTED,
38 },
39 {
40 .name = "Button B",
41 .pin = BTN1_PIN,
42 .mode = BTN1_MODE,
43 .flags = SAUL_GPIO_INVERTED,
44 },
45 {
46 .name = "Touch Logo",
47 .pin = BTN2_PIN,
48 .mode = BTN2_MODE,
49 .flags = SAUL_GPIO_INVERTED,
50 },
51 {
52 .name = "Ring 0",
53 .pin = BTN3_PIN,
54 .mode = BTN3_MODE,
55 .flags = SAUL_GPIO_INVERTED,
56 },
57 {
58 .name = "Ring 1",
59 .pin = BTN4_PIN,
60 .mode = BTN4_MODE,
61 .flags = SAUL_GPIO_INVERTED,
62 },
63 {
64 .name = "Ring 2",
65 .pin = BTN5_PIN,
66 .mode = BTN5_MODE,
67 .flags = SAUL_GPIO_INVERTED,
68 },
69};
70
71#ifdef __cplusplus
72}
73#endif
74
static const saul_gpio_params_t saul_gpio_params[]
LED configuration.
Definition gpio_params.h:32
#define BTN1_MODE
Button B mode.
Definition board.h:47
#define BTN1_PIN
Button B pin.
Definition board.h:46
#define BTN2_PIN
Button 2 pin.
Definition board.h:60
#define BTN2_MODE
Button 2 mode.
Definition board.h:61
Board specific configuration for the BBC micro:bit v2.
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