board.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2023 Gunar Schorcht
3  * SPDX-License-Identifier: LGPL-2.1-only
4  */
5 
6 #pragma once
7 
23 #include <stdint.h>
24 
38 #define BTN0_PIN GPIO0
39 
43 #define BTN0_MODE GPIO_IN_PU
44 
48 #ifndef BTN0_INT_FLANK
49 #define BTN0_INT_FLANK GPIO_FALLING
50 #endif
51 
55 #define BUTTON0_PIN BTN0_PIN
56 
67 #if MODULE_ILI9341
68 #define LCD_DC GPIO4
69 #define LCD_CS GPIO5
70 #define LCD_RST GPIO48
71 #define LCD_BACKLIGHT GPIO45
72 
73 #define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT)
74 #define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)
75 
76 #define ILI9341_PARAM_SPI SPI_DEV(1)
77 #define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
78 #define ILI9341_PARAM_CS LCD_CS
79 #define ILI9341_PARAM_DCX LCD_DC
80 #define ILI9341_PARAM_RST LCD_RST
81 #define ILI9341_PARAM_RGB 0
82 #define ILI9341_PARAM_INVERTED 0
83 #define ILI9341_PARAM_ROTATION LCD_MADCTL_MX | LCD_MADCTL_MY
84 #define ILI9341_PARAM_NUM_LINES 320U
85 #define ILI9341_PARAM_RGB_CHANNELS 240U
86 #endif
89 /* include common board definitions as last step */
90 #include "board_common.h"
91 
92 #ifdef __cplusplus
93 extern "C" {
94 #endif
95 
96 #ifdef __cplusplus
97 } /* end extern "C" */
98 #endif
99