Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
board.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2022 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
9
#pragma once
10
28
#include <stdint.h>
29
43
#define BTN0_PIN GPIO0
44
51
#define BTN0_MODE GPIO_IN_PU
52
56
#ifndef BTN0_INT_FLANK
57
#define BTN0_INT_FLANK GPIO_FALLING
58
#endif
59
63
#define BUTTON0_PIN BTN0_PIN
64
73
#if (MODULE_SDCARD_SPI) || DOXYGEN
74
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
75
#define SDCARD_SPI_PARAM_CS SPI1_CS0
76
#define SDCARD_SPI_PARAM_CLK SPI1_SCK
77
#define SDCARD_SPI_PARAM_MOSI SPI1_MOSI
78
#define SDCARD_SPI_PARAM_MISO SPI1_MISO
79
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
80
#endif
89
#if defined(MODULE_ST77XX)
90
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789
91
#define ST77XX_PARAM_SPI SPI_DEV(0)
92
#define ST77XX_PARAM_SPI_CLK SPI_CLK_10MHZ
93
#define ST77XX_PARAM_SPI_MODE SPI_MODE_0
94
#define ST77XX_PARAM_CS GPIO34
95
#define ST77XX_PARAM_DCX GPIO37
96
#define ST77XX_PARAM_RST GPIO38
97
#define ST77XX_PARAM_RGB 1
98
#define ST77XX_PARAM_INVERTED 1
99
#define ST77XX_PARAM_NUM_LINES 240U
100
#define ST77XX_PARAM_RGB_CHANNELS 135U
101
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_270
102
#define ST77XX_PARAM_OFFSET_X 40
103
#define ST77XX_PARAM_OFFSET_Y 52
104
#endif
111
#define BACKLIGHT_PIN GPIO33
112
#define BACKLIGHT_ON gpio_set(BACKLIGHT_PIN)
113
#define BACKLIGHT_OFF gpio_clear(BACKLIGHT_PIN)
116
/* include common board definitions as last step */
117
#include "board_common.h"
118
119
#ifdef __cplusplus
120
extern
"C"
{
121
#endif
122
123
#ifdef __cplusplus
124
}
/* end extern "C" */
125
#endif
126
Generated on Thu Jun 26 2025 14:14:43 by
1.9.1