Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2023 Gunar Schorcht <gunar@schorcht.net>
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
18
19
#include "board_common.h"
20
#include "
periph/gpio.h
"
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
30
#define BTN0_PIN GPIO_PIN(PORT_A, 8)
31
#define BTN0_MODE GPIO_IN
32
#define BTN0_INT_FLANK GPIO_RISING
34
39
#define LED0_PIN GPIO_PIN(PORT_C, 13)
40
#define LED0_MASK (1 << 13)
41
#define LED0_ON (GPIOC->BC = LED0_MASK)
42
#define LED0_OFF (GPIOC->BOP = LED0_MASK)
43
#define LED0_TOGGLE (GPIOC->OCTL ^= LED0_MASK)
44
45
#define LED1_PIN GPIO_PIN(PORT_A, 1)
46
#define LED1_MASK (1 << 1)
47
#define LED1_ON (GPIOA->BC = LED1_MASK)
48
#define LED1_OFF (GPIOA->BOP = LED1_MASK)
49
#define LED1_TOGGLE (GPIOA->OCTL ^= LED1_MASK)
50
51
#define LED2_PIN GPIO_PIN(PORT_A, 2)
52
#define LED2_MASK (1 << 2)
53
#define LED2_ON (GPIOA->BC = LED2_MASK)
54
#define LED2_OFF (GPIOA->BOP = LED2_MASK)
55
#define LED2_TOGGLE (GPIOA->OCTL ^= LED2_MASK)
56
57
#define LED_RED_PIN LED0_PIN
58
#define LED_GREEN_PIN LED1_PIN
59
#define LED_BLUE_PIN LED2_PIN
61
66
#define MTD_0 mtd_dev_get(0)
68
73
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
74
#define SDCARD_SPI_PARAM_CS GPIO_PIN(PORT_B, 12)
75
#define SDCARD_SPI_PARAM_CLK GPIO_PIN(PORT_B, 13)
76
#define SDCARD_SPI_PARAM_MISO GPIO_PIN(PORT_B, 14)
77
#define SDCARD_SPI_PARAM_MOSI GPIO_PIN(PORT_B, 15)
79
80
#if defined(MODULE_ST77XX) && defined(BOARD_SIPEED_LONGAN_NANO_TFT)
81
#define ST77XX_PARAM_SPI SPI_DEV(1)
82
#define ST77XX_PARAM_SPI_CLK SPI_CLK_5MHZ
83
#define ST77XX_PARAM_SPI_MODE SPI_MODE_0
84
#define ST77XX_PARAM_CS GPIO_PIN(PORT_B, 2)
85
#define ST77XX_PARAM_DCX GPIO_PIN(PORT_B, 0)
86
#define ST77XX_PARAM_RST GPIO_PIN(PORT_B, 1)
87
#define ST77XX_PARAM_RGB 0
88
#define ST77XX_PARAM_INVERTED 1
89
#define ST77XX_PARAM_NUM_LINES 160U
90
#define ST77XX_PARAM_RGB_CHANNELS 80U
91
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_270
92
#define ST77XX_PARAM_OFFSET_Y 25
93
#endif
94
95
#ifdef __cplusplus
96
}
97
#endif
98
gpio.h
Low-level GPIO peripheral driver interface definitions.
Generated on Wed Aug 27 2025 20:40:39 by
1.13.2