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: 2023 Gunar Schorcht
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
#include "cpu.h"
19
#include "
periph/gpio.h
"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
30
#define LED0_PIN GPIO_PIN(PB, 1)
31
#define LED1_PIN GPIO_PIN(PC, 30)
32
#define LED2_PIN GPIO_PIN(PC, 31)
34
#define LED0_PORT PORT->Group[PB]
35
#define LED0_MASK (1 << 1)
36
#define LED1_PORT PORT->Group[PC]
37
#define LED1_MASK (1 << 30)
38
#define LED2_PORT PORT->Group[PC]
39
#define LED2_MASK (1 << 31)
41
#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
42
#define LED0_OFF (LED0_PORT.OUTCLR.reg = LED0_MASK)
43
#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
45
#define LED1_ON (LED1_PORT.OUTCLR.reg = LED1_MASK)
46
#define LED1_OFF (LED1_PORT.OUTSET.reg = LED1_MASK)
47
#define LED1_TOGGLE (LED1_PORT.OUTTGL.reg = LED1_MASK)
49
#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
50
#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
51
#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
53
#ifndef WS281X_PARAM_PIN
54
#define WS281X_PARAM_PIN GPIO_PIN(PC, 24)
55
#endif
56
#ifndef WS281X_PARAM_NUMOF
57
#define WS281X_PARAM_NUMOF (1U)
58
#endif
65
#define MTD_0 mtd_dev_get(0)
66
#define MTD_1 mtd_dev_get(1)
68
#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
78
#if MODULE_SDCARD_SPI || DOXYGEN
79
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
80
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PB, 27)
81
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PB, 26)
82
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PB, 29)
83
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PB, 28)
84
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
85
#endif
88
#ifdef __cplusplus
89
}
90
#endif
91
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Thu Jul 24 2025 16:03:56 by
1.9.1