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) 2023 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
24
#ifndef BOARD_H
25
#define BOARD_H
26
27
#include <stdint.h>
28
42
#define BTN0_PIN GPIO0
43
47
#define BTN0_MODE GPIO_IN_PU
48
52
#ifndef BTN0_INT_FLANK
53
#define BTN0_INT_FLANK GPIO_FALLING
54
#endif
55
59
#define BUTTON0_PIN BTN0_PIN
60
72
#define LCD_SCREEN_WIDTH 480
73
#define LCD_SCREEN_HEIGHT 320
75
#ifdef MODULE_ST77XX
76
#define LCD_DB0 GPIO9
77
#define LCD_DB1 GPIO46
78
#define LCD_DB2 GPIO3
79
#define LCD_DB3 GPIO8
80
#define LCD_DB4 GPIO18
81
#define LCD_DB5 GPIO17
82
#define LCD_DB6 GPIO16
83
#define LCD_DB7 GPIO15
84
#define LCD_TE GPIO48
85
#define LCD_WR GPIO47
86
#define LCD_RS GPIO0
87
#define LCD_RESET GPIO4
88
#define LCD_BACKLIGHT GPIO45
89
90
#define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT)
91
#define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)
92
93
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7796
94
#define ST77XX_PARAM_SPI SPI_UNDEF
/* parallel interface is used */
95
#define ST77XX_PARAM_D0 LCD_DB0
96
#define ST77XX_PARAM_D1 LCD_DB1
97
#define ST77XX_PARAM_D2 LCD_DB2
98
#define ST77XX_PARAM_D3 LCD_DB3
99
#define ST77XX_PARAM_D4 LCD_DB4
100
#define ST77XX_PARAM_D5 LCD_DB5
101
#define ST77XX_PARAM_D6 LCD_DB6
102
#define ST77XX_PARAM_D7 LCD_DB7
103
#define ST77XX_PARAM_WRX LCD_WR
104
#define ST77XX_PARAM_RDX GPIO_UNDEF
105
#define ST77XX_PARAM_DCX LCD_RS
106
#define ST77XX_PARAM_RST LCD_RESET
107
#define ST77XX_PARAM_CS GPIO_UNDEF
108
#define ST77XX_PARAM_RGB 0
109
#define ST77XX_PARAM_INVERTED 1
110
#define ST77XX_PARAM_ROTATION LCD_MADCTL_MV
111
#define ST77XX_PARAM_NUM_LINES LCD_SCREEN_WIDTH
112
#define ST77XX_PARAM_RGB_CHANNELS LCD_SCREEN_HEIGHT
113
#endif
120
#define FT5X06_PARAM_I2C_DEV I2C_DEV(0)
121
#define FT5X06_PARAM_INT_PIN GPIO7
122
#define FT5X06_PARAM_RST_PIN GPIO4
123
#define FT5X06_PARAM_XMAX LCD_SCREEN_WIDTH
124
#define FT5X06_PARAM_YMAX LCD_SCREEN_HEIGHT
125
#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT6X36
126
#define FT5X06_PARAM_XYCONV (FT5X06_SWAP_XY | FT5X06_MIRROR_Y)
135
#define SDCARD_SPI_PARAM_SPI SPI_DEV(0)
136
#define SDCARD_SPI_PARAM_CS SPI0_CS0
137
#define SDCARD_SPI_PARAM_CLK SPI0_SCK
138
#define SDCARD_SPI_PARAM_MOSI SPI0_MOSI
139
#define SDCARD_SPI_PARAM_MISO SPI0_MISO
140
#define SDCARD_SPI_PARAM_POWER GPIO_UNDEF
143
/* include common board definitions as last step */
144
#include "board_common.h"
145
146
#ifdef __cplusplus
147
extern
"C"
{
148
#endif
149
150
#ifdef __cplusplus
151
}
/* end extern "C" */
152
#endif
153
154
#endif
/* BOARD_H */
Generated on Sat Nov 23 2024 01:58:05 by
1.9.8