Implementation:78 Xiaozhi esp32 Board Config Headers
| Knowledge Sources | |
|---|---|
| Domains | Board_Hardware, Build_Configuration |
| Last Updated | 2026-10-17 00:00 GMT |
Overview
Concrete board pin configuration headers (≥300 lines) for XiaoZhi firmware boards, defining GPIO pin assignments, I2S audio parameters, display configurations, I2C addresses, and hardware-specific constants via C preprocessor macros.
Description
Each board's config.h contains #define macros that map hardware pins to the firmware's subsystem expectations. Large config headers (≥300 lines) typically define extensive display configurations, multiple I2S ports, or include detailed LCD panel initialization sequences.
| File | Lines | Board | Notable Contents |
|---|---|---|---|
bread-compact-wifi-s3cam/config.h |
308 | Bread Compact WiFi S3Cam | I2S pins, camera pins, S3 camera configuration |
wk-esp32s3-dev/config.h |
362 | WK ESP32S3 Dev | Dual LCD panel support (ILI9486 + NV3030B), I2S, I2C, touch |
xingzhi-abs-2.0/power_manager.h |
305 | Xingzhi ABS 2.0 | Power management IC configuration, charging thresholds |
xingzhi-metal-1.54-wifi/power_manager.h |
314 | Xingzhi Metal 1.54 WiFi | Power management with PMU, sleep/wake GPIO configuration |
Usage
Reference this implementation when:
- Understanding a board's hardware pinout
- Configuring I2S audio, display, I2C, or camera peripherals
- Reading power management configuration for a specific board
Code Reference
Source Location
- Repository: XiaoZhi ESP32
- Files:
- bread-compact-wifi-s3cam/config.h
- wk-esp32s3-dev/config.h
- [code>main/boards/nologo/xingzhi-abs-2.0/power_manager.h xingzhi-abs-2.0/power_manager.h]
main/boards/nologo/xingzhi-metal-1.54-wifi/power_manager.h
Signature
// Typical config.h pattern (C preprocessor macros)
#define CONFIG_I2S_BCLK GPIO_NUM_4
#define CONFIG_I2S_WS GPIO_NUM_5
#define CONFIG_I2S_DOUT GPIO_NUM_6
#define CONFIG_I2S_DIN GPIO_NUM_7
#define CONFIG_I2S_MCLK GPIO_NUM_3
#define CONFIG_INPUT_SAMPLE_RATE 16000
#define CONFIG_OUTPUT_SAMPLE_RATE 16000
#define CONFIG_INPUT_CHANNELS 1
#define CONFIG_DISPLAY_SPI_HOST SPI2_HOST
#define CONFIG_DISPLAY_DC GPIO_NUM_8
#define CONFIG_DISPLAY_CS GPIO_NUM_9
#define CONFIG_DISPLAY_RST GPIO_NUM_10
#define CONFIG_I2C_SDA GPIO_NUM_11
#define CONFIG_I2C_SCL GPIO_NUM_12
Import
#include "config.h" // Board-specific, included by board .cc and codec drivers
Related Pages
Implements Principle
- Principle:78_Xiaozhi_esp32_Build_System_Configuration
- Principle:78_Xiaozhi_esp32_Board_Abstraction_Layer
- Principle:78_Xiaozhi_esp32_Power_Management
Requires Environment
See Also
- Implementation:78_Xiaozhi_esp32_config_h — Pattern documentation for board config.h files