Toggle navigation
Documentation
The friendly Operating System for the Internet of Things
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
9
#pragma once
10
21
#include "cpu.h"
22
#include "
periph_conf.h
"
23
24
#ifdef __cplusplus
25
extern
"C"
{
26
#endif
27
32
#define BACKLIGHT_PIN GPIO_PIN(PORT_H, 11)
33
#define BACKLIGHT_MASK (1 << 11)
36
#define BACKLIGHT_ON (GPIOH->BSRR = BACKLIGHT_MASK)
38
#define BACKLIGHT_OFF (GPIOH->BSRR = (BACKLIGHT_MASK << 16))
40
#define BACKLIGHT_TOGGLE (GPIOH->ODR ^= BACKLIGHT_MASK)
56
#define LCD_SCREEN_WIDTH 240
57
#define LCD_SCREEN_HEIGHT 240
59
#define LCD_D0 GPIO_PIN(PORT_D, 14)
60
#define LCD_D1 GPIO_PIN(PORT_D, 15)
61
#define LCD_D2 GPIO_PIN(PORT_D, 0)
62
#define LCD_D3 GPIO_PIN(PORT_D, 1)
63
#define LCD_D4 GPIO_PIN(PORT_E, 7)
64
#define LCD_D5 GPIO_PIN(PORT_E, 8)
65
#define LCD_D6 GPIO_PIN(PORT_E, 9)
66
#define LCD_D7 GPIO_PIN(PORT_E, 10)
67
#define LCD_D8 GPIO_PIN(PORT_E, 11)
68
#define LCD_D9 GPIO_PIN(PORT_E, 12)
69
#define LCD_D10 GPIO_PIN(PORT_E, 13)
70
#define LCD_D11 GPIO_PIN(PORT_E, 14)
71
#define LCD_D12 GPIO_PIN(PORT_E, 15)
72
#define LCD_D13 GPIO_PIN(PORT_D, 8)
73
#define LCD_D14 GPIO_PIN(PORT_D, 9)
74
#define LCD_D15 GPIO_PIN(PORT_D, 10)
75
#define LCD_TE GPIO_PIN(PORT_C, 8)
76
#define LCD_WE GPIO_PIN(PORT_D, 5)
77
#define LCD_OE GPIO_PIN(PORT_D, 4)
78
#define LCD_RS GPIO_PIN(PORT_F, 0)
79
#define LCD_NE GPIO_PIN(PORT_G, 9)
80
#define LCD_RST GPIO_PIN(PORT_H, 7)
81
#define LCD_BACKLIGHT BACKLIGHT_PIN
83
#define ST77XX_PARAM_CNTRL ST77XX_CNTRL_ST7789
84
#define ST77XX_PARAM_SPI SPI_UNDEF
85
#define ST77XX_PARAM_D0 LCD_D0
86
#define ST77XX_PARAM_D1 LCD_D1
87
#define ST77XX_PARAM_D2 LCD_D2
88
#define ST77XX_PARAM_D3 LCD_D3
89
#define ST77XX_PARAM_D4 LCD_D4
90
#define ST77XX_PARAM_D5 LCD_D5
91
#define ST77XX_PARAM_D6 LCD_D6
92
#define ST77XX_PARAM_D7 LCD_D7
93
#define ST77XX_PARAM_D8 LCD_D8
94
#define ST77XX_PARAM_D9 LCD_D9
95
#define ST77XX_PARAM_D10 LCD_D10
96
#define ST77XX_PARAM_D11 LCD_D11
97
#define ST77XX_PARAM_D12 LCD_D12
98
#define ST77XX_PARAM_D13 LCD_D13
99
#define ST77XX_PARAM_D14 LCD_D14
100
#define ST77XX_PARAM_D15 LCD_D15
101
#define ST77XX_PARAM_WRX LCD_WE
102
#define ST77XX_PARAM_RDX LCD_OE
103
#define ST77XX_PARAM_DCX LCD_RS
104
#define ST77XX_PARAM_RST LCD_RST
105
#define ST77XX_PARAM_CS LCD_NE
106
#define ST77XX_PARAM_RGB 1
107
#define ST77XX_PARAM_INVERTED 1
108
#define ST77XX_PARAM_ROTATION ST77XX_ROTATION_90
109
#define ST77XX_PARAM_OFFSET_X 80
110
#define ST77XX_PARAM_NUM_LINES LCD_SCREEN_HEIGHT
111
#define ST77XX_PARAM_RGB_CHANNELS LCD_SCREEN_WIDTH
118
#define LED0_PIN_NUM 5
119
#define LED0_PORT GPIO_PORT_A
120
#define LED0_PORT_NUM PORT_A
121
122
#define LED1_PIN_NUM 7
123
#define LED1_PORT GPIO_PORT_A
124
#define LED1_PORT_NUM PORT_A
125
126
#define LED2_PIN_NUM 1
127
#define LED2_PORT GPIO_PORT_B
128
#define LED2_PORT_NUM PORT_B
135
#define BTN0_PIN GPIO_PIN(PORT_A, 0)
136
#define BTN0_MODE GPIO_IN
143
#define FT5X06_PARAM_I2C_DEV I2C_DEV(1)
144
#define FT5X06_PARAM_INT_PIN GPIO_PIN(PORT_I, 9)
145
#define FT5X06_PARAM_XMAX (240)
146
#define FT5X06_PARAM_YMAX (240)
147
#define FT5X06_PARAM_XYCONV FT5X06_NO_CONV
148
#define FT5X06_PARAM_TYPE FT5X06_TYPE_FT6X06
151
#ifdef __cplusplus
152
}
153
#endif
154
155
#include "
stm32_leds.h
"
156
periph_conf.h
Peripheral MCU configuration for the Zigduino board.
stm32_leds.h
Common LED macros.
Generated on Fri Jun 20 2025 21:02:35 by
1.9.1