Loading...
Searching...
No Matches
board.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Inria
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
19#ifndef BOARD_H
20#define BOARD_H
21
22#include "cpu.h"
23#include "periph_conf.h"
24
25#ifdef __cplusplus
26extern "C" {
27#endif
28
33#define BACKLIGHT_PIN GPIO_PIN(PORT_H, 11)
34#define BACKLIGHT_MASK (1 << 11)
37#define BACKLIGHT_ON (GPIOH->BSRR = BACKLIGHT_MASK)
39#define BACKLIGHT_OFF (GPIOH->BSRR = (BACKLIGHT_MASK << 16))
41#define BACKLIGHT_TOGGLE (GPIOH->ODR ^= BACKLIGHT_MASK)
57#define LCD_SCREEN_WIDTH 240
58#define LCD_SCREEN_HEIGHT 240
60#define LCD_D0 GPIO_PIN(PORT_D, 14)
61#define LCD_D1 GPIO_PIN(PORT_D, 15)
62#define LCD_D2 GPIO_PIN(PORT_D, 0)
63#define LCD_D3 GPIO_PIN(PORT_D, 1)
64#define LCD_D4 GPIO_PIN(PORT_E, 7)
65#define LCD_D5 GPIO_PIN(PORT_E, 8)
66#define LCD_D6 GPIO_PIN(PORT_E, 9)
67#define LCD_D7 GPIO_PIN(PORT_E, 10)
68#define LCD_D8 GPIO_PIN(PORT_E, 11)
69#define LCD_D9 GPIO_PIN(PORT_E, 12)
70#define LCD_D10 GPIO_PIN(PORT_E, 13)
71#define LCD_D11 GPIO_PIN(PORT_E, 14)
72#define LCD_D12 GPIO_PIN(PORT_E, 15)
73#define LCD_D13 GPIO_PIN(PORT_D, 8)
74#define LCD_D14 GPIO_PIN(PORT_D, 9)
75#define LCD_D15 GPIO_PIN(PORT_D, 10)
76#define LCD_TE GPIO_PIN(PORT_C, 8)
77#define LCD_WE GPIO_PIN(PORT_D, 5)
78#define LCD_OE GPIO_PIN(PORT_D, 4)
79#define LCD_RS GPIO_PIN(PORT_F, 0)
80#define LCD_NE GPIO_PIN(PORT_G, 9)
81#define LCD_RST GPIO_PIN(PORT_H, 7)
82#define LCD_BACKLIGHT BACKLIGHT_PIN
84#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789
85#define ST77XX_PARAM_SPI SPI_UNDEF
86#define ST77XX_PARAM_D0 LCD_D0
87#define ST77XX_PARAM_D1 LCD_D1
88#define ST77XX_PARAM_D2 LCD_D2
89#define ST77XX_PARAM_D3 LCD_D3
90#define ST77XX_PARAM_D4 LCD_D4
91#define ST77XX_PARAM_D5 LCD_D5
92#define ST77XX_PARAM_D6 LCD_D6
93#define ST77XX_PARAM_D7 LCD_D7
94#define ST77XX_PARAM_D8 LCD_D8
95#define ST77XX_PARAM_D9 LCD_D9
96#define ST77XX_PARAM_D10 LCD_D10
97#define ST77XX_PARAM_D11 LCD_D11
98#define ST77XX_PARAM_D12 LCD_D12
99#define ST77XX_PARAM_D13 LCD_D13
100#define ST77XX_PARAM_D14 LCD_D14
101#define ST77XX_PARAM_D15 LCD_D15
102#define ST77XX_PARAM_WRX LCD_WE
103#define ST77XX_PARAM_RDX LCD_OE
104#define ST77XX_PARAM_DCX LCD_RS
105#define ST77XX_PARAM_RST LCD_RST
106#define ST77XX_PARAM_CS LCD_NE
107#define ST77XX_PARAM_RGB 1
108#define ST77XX_PARAM_INVERTED 1
109#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_90
110#define ST77XX_PARAM_OFFSET_X 80
111#define ST77XX_PARAM_NUM_LINES LCD_SCREEN_HEIGHT
112#define ST77XX_PARAM_RGB_CHANNELS LCD_SCREEN_WIDTH
119#define LED0_PIN_NUM 5
120#define LED0_PORT GPIO_PORT_A
121#define LED0_PORT_NUM PORT_A
122
123#define LED1_PIN_NUM 7
124#define LED1_PORT GPIO_PORT_A
125#define LED1_PORT_NUM PORT_A
126
127#define LED2_PIN_NUM 1
128#define LED2_PORT GPIO_PORT_B
129#define LED2_PORT_NUM PORT_B
136#define BTN0_PIN GPIO_PIN(PORT_A, 0)
137#define BTN0_MODE GPIO_IN
144#define FT5X06_PARAM_I2C_DEV I2C_DEV(1)
145#define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 9)
146#define FT5X06_PARAM_XMAX (240)
147#define FT5X06_PARAM_YMAX (240)
148#define FT5X06_PARAM_XYCONV FT5X06_NO_CONV
149#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT6X06
152#ifdef __cplusplus
153}
154#endif
155
156#include "stm32_leds.h"
157
158#endif /* BOARD_H */
Native CPU peripheral configuration.
Common LED macros.