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
9#pragma once
10
25
26#include <stdint.h>
27
32
41#define BTN0_PIN GPIO0
42
46#define BTN0_MODE GPIO_IN_PU
47
51#ifndef BTN0_INT_FLANK
52#define BTN0_INT_FLANK GPIO_FALLING
53#endif
54
58#define BUTTON0_PIN BTN0_PIN
59
61
70#if MODULE_ILI9341
71#define LCD_DC GPIO4
72#define LCD_CS GPIO5
73#define LCD_RST GPIO48
74#define LCD_BACKLIGHT GPIO45
75
76#define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT)
77#define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)
78
79#define ILI9341_PARAM_SPI SPI_DEV(1)
80#define ILI9341_PARAM_SPI_CLK SPI_CLK_10MHZ
81#define ILI9341_PARAM_CS LCD_CS
82#define ILI9341_PARAM_DCX LCD_DC
83#define ILI9341_PARAM_RST LCD_RST
84#define ILI9341_PARAM_RGB 0
85#define ILI9341_PARAM_INVERTED 0
86#define ILI9341_PARAM_ROTATION LCD_MADCTL_MX | LCD_MADCTL_MY
87#define ILI9341_PARAM_NUM_LINES 320U
88#define ILI9341_PARAM_RGB_CHANNELS 240U
89#endif
91
92/* include common board definitions as last step */
93#include "board_common.h"
94
95#ifdef __cplusplus
96extern "C" {
97#endif
98
99#ifdef __cplusplus
100} /* end extern "C" */
101#endif
102