Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2020 Koen Zandberg <koen@bergzand.net>
3 * 2023 Gunar Schorcht <gunar@schorcht.net>
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef BOARD_H
22#define BOARD_H
23
24#include "board_common.h"
25#include "periph/gpio.h"
26
27#ifdef __cplusplus
28extern "C" {
29#endif
30
35#define BTN0_PIN GPIO_PIN(PORT_A, 0)
36#define BTN0_MODE GPIO_IN
37#define BTN0_INT_FLANK GPIO_RISING
38
39#define BTN1_PIN GPIO_PIN(PORT_C, 13)
40#define BTN1_MODE GPIO_IN
41#define BTN1_INT_FLANK GPIO_RISING
48#define LED0_PIN GPIO_PIN(PORT_B, 5)
49#define LED0_MASK (1 << 5)
50#define LED0_ON (GPIOB->BC = LED0_MASK)
51#define LED0_OFF (GPIOB->BOP = LED0_MASK)
52#define LED0_TOGGLE (GPIOB->OCTL ^= LED0_MASK)
53
54#define LED1_PIN GPIO_PIN(PORT_B, 0)
55#define LED1_MASK (1 << 0)
56#define LED1_ON (GPIOB->BC = LED1_MASK)
57#define LED1_OFF (GPIOB->BOP = LED1_MASK)
58#define LED1_TOGGLE (GPIOB->OCTL ^= LED1_MASK)
59
60#define LED2_PIN GPIO_PIN(PORT_B, 1)
61#define LED2_MASK (1 << 1)
62#define LED2_ON (GPIOB->BC = LED2_MASK)
63#define LED2_OFF (GPIOB->BOP = LED2_MASK)
64#define LED2_TOGGLE (GPIOB->OCTL ^= LED2_MASK)
65
66#define LED_RED_PIN LED0_PIN
67#define LED_GREEN_PIN LED1_PIN
68#define LED_BLUE_PIN LED2_PIN
75#define MTD_0 mtd_dev_get(0)
82#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
83#define SDCARD_SPI_PARAM_CS GPIO_PIN(PORT_B, 12)
84#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PORT_B, 13)
85#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PORT_B, 14)
86#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
89#ifdef __cplusplus
90}
91#endif
92
93#endif /* BOARD_H */
Low-level GPIO peripheral driver interface definitions.