rcbench
Servo and ESC test bench: panel, IOmcu and shared C
Toggle main menu visibility
Loading...
Searching...
No Matches
board_pins.h
Go to the documentation of this file.
1
16
17
#pragma once
18
19
#include "driver/gpio.h"
20
21
#ifdef __cplusplus
22
extern
"C"
{
23
#endif
24
25
/* ------------------------------------------------------------------ board */
26
28
#define BOARD_NAME_TEXT "ESP32-P4 7B"
29
#define BOARD_DISPLAY_TEXT "1024x600 DSI"
30
31
/* ------------------------------------------------------------------ panel */
32
34
#define BOARD_LCD_H_RES 1024
35
#define BOARD_LCD_V_RES 600
36
41
#define BOARD_UI_H_RES 1024
43
#define BOARD_UI_V_RES 600
44
62
#define BOARD_LCD_DPI_CLOCK_MHZ 52.0f
63
#define BOARD_LCD_HSYNC_PULSE_WIDTH 10
64
#define BOARD_LCD_HSYNC_BACK_PORCH 160
65
#define BOARD_LCD_HSYNC_FRONT_PORCH 160
66
#define BOARD_LCD_VSYNC_PULSE_WIDTH 1
67
#define BOARD_LCD_VSYNC_BACK_PORCH 23
68
#define BOARD_LCD_VSYNC_FRONT_PORCH 12
69
76
#define BOARD_DSI_LANES 2
77
#define BOARD_DSI_LANE_MBPS 1000
78
83
#define BOARD_DSI_PHY_LDO_CHAN 3
84
#define BOARD_DSI_PHY_LDO_MV 2500
85
90
#define BOARD_LCD_PIN_RST GPIO_NUM_33
91
99
#define BOARD_LCD_ADDRESS_MODE 0x02
100
101
/* ------------------------------------------------------------- backlight */
102
111
#define BOARD_BL_PIN GPIO_NUM_32
112
#define BOARD_BL_LEDC_TIMER 1
113
#define BOARD_BL_LEDC_CHANNEL 1
114
#define BOARD_BL_PWM_HZ 5000
115
#define BOARD_BL_DUTY_BITS 10
116
117
/* -------------------------------------------------------------------- I2C */
118
123
#define BOARD_I2C_PORT 0
124
#define BOARD_I2C_PIN_SDA GPIO_NUM_7
125
#define BOARD_I2C_PIN_SCL GPIO_NUM_8
126
#define BOARD_I2C_FREQ_HZ 400000
127
128
/* ------------------------------------------------------------------ touch */
129
138
#define BOARD_TOUCH_I2C_ADDR 0x5D
139
#define BOARD_TOUCH_I2C_ADDR_ALT 0x14
140
#define BOARD_TOUCH_PIN_RST GPIO_NUM_23
141
149
#define BOARD_TOUCH_MIRROR_X 1
150
#define BOARD_TOUCH_MIRROR_Y 1
151
152
/* -------------------------------------------------------------- SD card --- */
153
159
#define BOARD_SD_SLOT 0
160
#define BOARD_SD_WIDTH 4
161
#define BOARD_SD_PIN_CLK GPIO_NUM_43
162
#define BOARD_SD_PIN_CMD GPIO_NUM_44
163
#define BOARD_SD_PIN_D0 GPIO_NUM_39
164
#define BOARD_SD_PIN_D1 GPIO_NUM_40
165
#define BOARD_SD_PIN_D2 GPIO_NUM_41
166
#define BOARD_SD_PIN_D3 GPIO_NUM_42
167
#define BOARD_SD_LDO_CHAN 4
168
#define BOARD_SD_FREQ_KHZ 20000
169
170
/* ------------------------------------------------------------------ radio */
171
172
/*
173
* The ESP32-C6-MINI-1 that carries Wi-Fi, an SDIO (Secure Digital
174
* input/output) device on SDMMC slot 1, 4-bit, through the GPIO matrix.
175
* C6 IO19 is CLK, IO18 CMD, IO20 to IO23 D0 to D3; each line has a 51kOhm
176
* pull-up. The C6's EN (chip enable) has a 10kOhm pull-up and 1uF and
177
* reaches GPIO54 through 0Ohm: a low holds the C6 in reset. esp_hosted
178
* reads these from sdkconfig.defaults; wifi_radio.c fails the build when
179
* the two differ. Header H4 carries the C6's UART0 (TXD0, RXD0), GND
180
* and its strapping pin IO9.
181
*/
182
#define BOARD_C6_SLOT 1
183
#define BOARD_C6_WIDTH 4
184
#define BOARD_C6_FREQ_KHZ 40000
185
#define BOARD_C6_PIN_CLK GPIO_NUM_18
186
#define BOARD_C6_PIN_CMD GPIO_NUM_19
187
#define BOARD_C6_PIN_D0 GPIO_NUM_14
188
#define BOARD_C6_PIN_D1 GPIO_NUM_15
189
#define BOARD_C6_PIN_D2 GPIO_NUM_16
190
#define BOARD_C6_PIN_D3 GPIO_NUM_17
192
#define BOARD_C6_PIN_EN GPIO_NUM_54
193
194
/* -------------------------------------------------------------------- CAN */
202
#define PANEL_CAN_PIN_TX GPIO_NUM_22
203
#define PANEL_CAN_PIN_RX GPIO_NUM_21
204
210
#define PANEL_CAN_BITRATE 1000000u
211
212
/* ----------------------------------------------------------------- safety */
217
#define PANEL_HEARTBEAT_PIN GPIO_NUM_28
218
219
/* ------------------------------------------------------------------- knob */
224
#define BOARD_KNOB_I2C_PORT 1
226
#define BOARD_KNOB_PIN_SDA GPIO_NUM_30
228
#define BOARD_KNOB_PIN_SCL GPIO_NUM_31
230
#define BOARD_KNOB_I2C_FREQ_HZ 400000
231
232
#ifdef __cplusplus
233
}
234
#endif
firmware
panel
components
board
include
board_pins.h
Generated by
1.18.0