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: 2022 Gunar Schorcht
3
* SPDX-License-Identifier: LGPL-2.1-only
4
*/
5
6
#pragma once
7
25
#include <stdint.h>
26
40
#define BTN0_PIN GPIO0
41
48
#define BTN0_MODE GPIO_IN_PU
49
53
#ifndef BTN0_INT_FLANK
54
#define BTN0_INT_FLANK GPIO_FALLING
55
#endif
56
60
#define BUTTON0_PIN BTN0_PIN
61
70
#if (MODULE_SDCARD_SPI) || DOXYGEN
71
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
72
#define SDCARD_SPI_PARAM_CS SPI1_CS0
73
#define SDCARD_SPI_PARAM_CLK SPI1_SCK
74
#define SDCARD_SPI_PARAM_MOSI SPI1_MOSI
75
#define SDCARD_SPI_PARAM_MISO SPI1_MISO
76
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
77
#endif
86
#if defined(MODULE_ST77XX)
87
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789
88
#define ST77XX_PARAM_SPI SPI_DEV(0)
89
#define ST77XX_PARAM_SPI_CLK SPI_CLK_10MHZ
90
#define ST77XX_PARAM_SPI_MODE SPI_MODE_0
91
#define ST77XX_PARAM_CS GPIO34
92
#define ST77XX_PARAM_DCX GPIO37
93
#define ST77XX_PARAM_RST GPIO38
94
#define ST77XX_PARAM_RGB 1
95
#define ST77XX_PARAM_INVERTED 1
96
#define ST77XX_PARAM_NUM_LINES 240U
97
#define ST77XX_PARAM_RGB_CHANNELS 135U
98
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_270
99
#define ST77XX_PARAM_OFFSET_X 40
100
#define ST77XX_PARAM_OFFSET_Y 52
101
#endif
108
#define BACKLIGHT_PIN GPIO33
109
#define BACKLIGHT_ON gpio_set(BACKLIGHT_PIN)
110
#define BACKLIGHT_OFF gpio_clear(BACKLIGHT_PIN)
113
/* include common board definitions as last step */
114
#include "board_common.h"
115
116
#ifdef __cplusplus
117
extern
"C"
{
118
#endif
119
120
#ifdef __cplusplus
121
}
/* end extern "C" */
122
#endif
123
Generated on Sat Sep 6 2025 20:14:01 by
1.9.1