Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2020 Koen Zandberg <koen@bergzand.net>
3
* SPDX-FileCopyrightText: 2023 Gunar Schorcht <gunar@schorcht.net>
4
* SPDX-License-Identifier: LGPL-2.1-only
5
*/
6
7
#pragma once
8
20
#include "board_common.h"
21
#include "
periph/gpio.h
"
22
23
#ifdef __cplusplus
24
extern
"C"
{
25
#endif
26
31
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
32
#define BTN0_MODE GPIO_IN
33
#define BTN0_INT_FLANK GPIO_RISING
34
35
#define BTN1_PIN GPIO_PIN(PORT_C, 13)
36
#define BTN1_MODE GPIO_IN
37
#define BTN1_INT_FLANK GPIO_RISING
44
#define LED0_PIN GPIO_PIN(PORT_B, 5)
45
#define LED0_MASK (1 << 5)
46
#define LED0_ON (GPIOB->BC = LED0_MASK)
47
#define LED0_OFF (GPIOB->BOP = LED0_MASK)
48
#define LED0_TOGGLE (GPIOB->OCTL ^= LED0_MASK)
49
50
#define LED1_PIN GPIO_PIN(PORT_B, 0)
51
#define LED1_MASK (1 << 0)
52
#define LED1_ON (GPIOB->BC = LED1_MASK)
53
#define LED1_OFF (GPIOB->BOP = LED1_MASK)
54
#define LED1_TOGGLE (GPIOB->OCTL ^= LED1_MASK)
55
56
#define LED2_PIN GPIO_PIN(PORT_B, 1)
57
#define LED2_MASK (1 << 1)
58
#define LED2_ON (GPIOB->BC = LED2_MASK)
59
#define LED2_OFF (GPIOB->BOP = LED2_MASK)
60
#define LED2_TOGGLE (GPIOB->OCTL ^= LED2_MASK)
61
62
#define LED_RED_PIN LED0_PIN
63
#define LED_GREEN_PIN LED1_PIN
64
#define LED_BLUE_PIN LED2_PIN
71
#define MTD_0 mtd_dev_get(0)
78
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
79
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PORT_B, 12)
80
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PORT_B, 13)
81
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PORT_B, 14)
82
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
85
#ifdef __cplusplus
86
}
87
#endif
88
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Sat Sep 6 2025 20:14:01 by
1.9.1