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
71#if MODULE_ILI9341
72#define LCD_DC GPIO4
73#define LCD_CS GPIO5
74#define LCD_RST GPIO48
75#define LCD_BACKLIGHT GPIO45
76
77#define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT)
78#define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)
79
80#define ILI9341_PARAM_SPI SPI_DEV(1)
81#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
82#define ILI9341_PARAM_CS LCD_CS
83#define ILI9341_PARAM_DCX LCD_DC
84#define ILI9341_PARAM_RST LCD_RST
85#define ILI9341_PARAM_RGB 0
86#define ILI9341_PARAM_INVERTED 0
87#define ILI9341_PARAM_ROTATION LCD_MADCTL_MX | LCD_MADCTL_MY
88#define ILI9341_PARAM_NUM_LINES 320U
89#define ILI9341_PARAM_RGB_CHANNELS 240U
90#endif
93/* include common board definitions as last step */
94#include "board_common.h"
95
96#ifdef __cplusplus
97extern "C" {
98#endif
99
100#ifdef __cplusplus
101} /* end extern "C" */
102#endif
103
104#endif /* BOARD_H */