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
* 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
26
#ifndef BOARD_H
27
#define BOARD_H
28
29
#include <stdint.h>
30
44
#define BTN0_PIN GPIO0
45
52
#define BTN0_MODE GPIO_IN_PU
53
57
#ifndef BTN0_INT_FLANK
58
#define BTN0_INT_FLANK GPIO_FALLING
59
#endif
60
64
#define BUTTON0_PIN BTN0_PIN
65
74
#if (MODULE_SDCARD_SPI) || DOXYGEN
75
#define SDCARD_SPI_PARAM_SPI SPI_DEV(1)
76
#define SDCARD_SPI_PARAM_CS SPI1_CS0
77
#define SDCARD_SPI_PARAM_CLK SPI1_SCK
78
#define SDCARD_SPI_PARAM_MOSI SPI1_MOSI
79
#define SDCARD_SPI_PARAM_MISO SPI1_MISO
80
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
81
#endif
90
#if defined(MODULE_ST77XX)
91
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789
92
#define ST77XX_PARAM_SPI SPI_DEV(0)
93
#define ST77XX_PARAM_SPI_CLK SPI_CLK_10MHZ
94
#define ST77XX_PARAM_SPI_MODE SPI_MODE_0
95
#define ST77XX_PARAM_CS GPIO34
96
#define ST77XX_PARAM_DCX GPIO37
97
#define ST77XX_PARAM_RST GPIO38
98
#define ST77XX_PARAM_RGB 1
99
#define ST77XX_PARAM_INVERTED 1
100
#define ST77XX_PARAM_NUM_LINES 240U
101
#define ST77XX_PARAM_RGB_CHANNELS 135U
102
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_270
103
#define ST77XX_PARAM_OFFSET_X 40
104
#define ST77XX_PARAM_OFFSET_Y 52
105
#endif
112
#define BACKLIGHT_PIN GPIO33
113
#define BACKLIGHT_ON gpio_set(BACKLIGHT_PIN)
114
#define BACKLIGHT_OFF gpio_clear(BACKLIGHT_PIN)
117
/* include common board definitions as last step */
118
#include "board_common.h"
119
120
#ifdef __cplusplus
121
extern
"C"
{
122
#endif
123
124
#ifdef __cplusplus
125
}
/* end extern "C" */
126
#endif
127
128
#endif
/* BOARD_H */
Generated on Mon Dec 23 2024 22:27:45 by
1.9.8