Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 Gunar Schorcht
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
19#ifndef BOARD_H
20#define BOARD_H
21
22#include "cpu.h"
23#include "periph/gpio.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
34#define LED0_PIN GPIO_PIN(PB, 1)
35#define LED1_PIN GPIO_PIN(PC, 30)
36#define LED2_PIN GPIO_PIN(PC, 31)
38#define LED0_PORT PORT->Group[PB]
39#define LED0_MASK (1 << 1)
40#define LED1_PORT PORT->Group[PC]
41#define LED1_MASK (1 << 30)
42#define LED2_PORT PORT->Group[PC]
43#define LED2_MASK (1 << 31)
45#define LED0_ON (LED0_PORT.OUTSET.reg = LED0_MASK)
46#define LED0_OFF (LED0_PORT.OUTCLR.reg = LED0_MASK)
47#define LED0_TOGGLE (LED0_PORT.OUTTGL.reg = LED0_MASK)
49#define LED1_ON (LED1_PORT.OUTCLR.reg = LED1_MASK)
50#define LED1_OFF (LED1_PORT.OUTSET.reg = LED1_MASK)
51#define LED1_TOGGLE (LED1_PORT.OUTTGL.reg = LED1_MASK)
53#define LED2_ON (LED2_PORT.OUTCLR.reg = LED2_MASK)
54#define LED2_OFF (LED2_PORT.OUTSET.reg = LED2_MASK)
55#define LED2_TOGGLE (LED2_PORT.OUTTGL.reg = LED2_MASK)
57#ifndef WS281X_PARAM_PIN
58#define WS281X_PARAM_PIN GPIO_PIN(PC, 24)
59#endif
60#ifndef WS281X_PARAM_NUMOF
61#define WS281X_PARAM_NUMOF (1U)
62#endif
69#define MTD_0 mtd_dev_get(0)
70#define MTD_1 mtd_dev_get(1)
72#define CONFIG_SDCARD_GENERIC_MTD_OFFSET 1
82#if MODULE_SDCARD_SPI || DOXYGEN
83#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
84#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PB, 27)
85#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PB, 26)
86#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PB, 29)
87#define SDCARD_SPI_PARAM_CS GPIO_PIN(PB, 28)
88#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
89#endif
92#ifdef __cplusplus
93}
94#endif
95
96#endif /* BOARD_H */
Low-level GPIO peripheral driver interface definitions.