Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2023 Gunar Schorcht
3 * SPDX-FileCopyrightText: 2026 Technische Universität Hamburg
4 * SPDX-License-Identifier: LGPL-2.1-only
5 */
6
7#pragma once
8
20
25
34#define BTN0_PIN GPIO0
35
39#define BTN0_MODE GPIO_IN_PU
40
44#ifndef BTN0_INT_FLANK
45# define BTN0_INT_FLANK GPIO_FALLING
46#endif
47
51#define BUTTON0_PIN BTN0_PIN
52
54
63#if MODULE_GC9A01
64# define LCD_DC GPIO8
65# define LCD_CS GPIO9
66# define LCD_RST GPIO14
67# define LCD_BACKLIGHT GPIO2
68
69# define GC9A01_PARAM_CS LCD_CS
70# define GC9A01_PARAM_DCX LCD_DC
71# define GC9A01_PARAM_RST LCD_RST
72# define GC9A01_PARAM_NUM_LINES 240
73# define GC9A01_PARAM_RGB_CHANNELS 240
74# define GC9A01_PARAM_INVERTED 1
75# define GC9A01_PARAM_RGB 0
76# ifndef GC9A01_PARAM_ROTATION
77# define GC9A01_PARAM_ROTATION GC9A01_ROTATION_VERT
78# endif
79# ifndef GC9A01_PARAM_SPI_CLK
80# define GC9A01_PARAM_SPI_CLK SPI_CLK_10MHZ
81# endif
82
83# define BACKLIGHT_ON gpio_set(LCD_BACKLIGHT)
84# define BACKLIGHT_OFF gpio_clear(LCD_BACKLIGHT)
85#endif
87
96#if MODULE_CST816S
97# define CST816S_PARAM_I2C_DEV I2C_DEV(0)
98# define CST816S_PARAM_IRQ GPIO5
99# define CST816S_PARAM_RESET GPIO13
100#endif
102
111#if MODULE_QMI8658
112# define QMI8658_PARAM_I2C I2C_DEV(0)
113#endif
115
116/* include common board definitions as last step */
117#include "board_common.h"
118
119#ifdef __cplusplus
120extern "C" {
121#endif
122
123#ifdef __cplusplus
124}
125#endif
126