feat(cardputer-adv): add TCA8418 keyboard and WiFi config UI (#1929)

Add full keyboard support and keyboard-based WiFi configuration for
M5Stack Cardputer Adv:

- TCA8418 I2C keyboard driver with 56-key matrix, interrupt-driven
  key events, and debounce handling
- Keyboard WiFi config UI: scan/select/input SSID and password
  directly on the device without needing a phone
- Volume control (up/down arrows) and brightness control (left/right)
  via keyboard with fine-step adjustment near bounds
- Enter key to toggle chat state
- Display offset and backlight fixes for ST7789V2
- README with flash parameters and hardware specs

Co-authored-by: bot <bot@localhost>
This commit is contained in:
tkpdx01
2026-04-14 17:02:00 +08:00
committed by GitHub
parent 97c0e75eec
commit 6074fdeb71
7 changed files with 1654 additions and 15 deletions

View File

@ -43,6 +43,33 @@ M5Stack Cardputer Adv 是一款基于 ESP32-S3FN8 (Stamp-S3A) 的卡片式电脑
1. 按下 BOOT 按钮进入配网模式
2. 连接 WiFi 后即可使用语音助手功能
## 烧录参数
芯片: ESP32-S3, Flash: 8MB, 模式: DIO, 频率: 80MHz
| 地址 | 文件 |
|------|------|
| 0x0 | bootloader/bootloader.bin |
| 0x8000 | partition_table/partition-table.bin |
| 0xd000 | ota_data_initial.bin |
| 0x20000 | xiaozhi.bin |
| 0x600000 | generated_assets.bin |
烧录命令 (build 目录为 `build-cardputer-adv`):
```bash
python -m esptool --chip esp32s3 -b 460800 -p PORT \
--before default_reset --after hard_reset \
write_flash --flash_mode dio --flash_size 8MB --flash_freq 80m \
0x0 build-cardputer-adv/bootloader/bootloader.bin \
0x8000 build-cardputer-adv/partition_table/partition-table.bin \
0xd000 build-cardputer-adv/ota_data_initial.bin \
0x20000 build-cardputer-adv/xiaozhi.bin \
0x600000 build-cardputer-adv/generated_assets.bin
```
`PORT` 替换为实际串口设备路径(如 `/dev/cu.usbmodem21101`)。
## 参考链接
- [M5Stack Cardputer Adv 官方文档](https://docs.m5stack.com/en/core/Cardputer-Adv)