mirror of
https://github.com/liquidraver/ZephCore.git
synced 2026-09-09 21:25:39 +00:00
Single ZephyrUSBCDC module owns the usbd context, 1200-baud DFU detection, and DTR transitions for both roles. The boot banner now blocks on a k_event signalled by the usbd_msg_callback when DTR transitions high — host attached → wakes immediately; no host → bounded timeout (2 s repeater, 1 s companion). Replaces the fixed k_sleep delays in both mains. Deletes the companion's 10 s DTR-polling work — line state changes arrive as events now, same callback handles disconnect (resets V3 parser, flips active_iface) and DFU touch (reboots to bootloader). Side effect: prod companion no longer enumerates a phantom CDC ACM port (CONFIG_LOG=n skips the whole stack instead of auto-initing an unused device).
25 lines
897 B
Plaintext
25 lines
897 B
Plaintext
# Repeater-specific config
|
|
#
|
|
# Build with: -DEXTRA_CONF_FILE="boards/common/repeater.conf"
|
|
#
|
|
# Repeaters use USB serial CLI for configuration — no BLE, no bonding, no NUS.
|
|
# This overrides the BLE settings in zephcore_common.conf.
|
|
|
|
# ========== Role Selection ==========
|
|
CONFIG_ZEPHCORE_ROLE_REPEATER=y
|
|
|
|
# ========== Disable BLE entirely ==========
|
|
# Repeaters have zero BLE functionality — all config via USB serial CLI.
|
|
# Saves ~100KB flash and ~30KB RAM on nRF52.
|
|
CONFIG_BT=n
|
|
|
|
# ========== Entropy (required when BT is disabled) ==========
|
|
# BT normally pulls in the entropy subsystem. Without BT, we need it explicitly
|
|
# for Ed25519 key generation, LoRa random delays, etc.
|
|
CONFIG_ENTROPY_GENERATOR=y
|
|
|
|
# ========== Optional ESP32 repeater uplink ==========
|
|
# Observer-style WiFi+MQTT reporting from repeater role.
|
|
# Runtime-configured and reboot-applied.
|
|
CONFIG_ZEPHCORE_REPEATER_UPLINK=n
|