Files
led-controller/main/Kconfig.projbuild
T
jimmyandClaude Opus 5.5 4ab0c7c6d7 P4-Nano: controller port with the C6 as ESP-NOW radio, and the simulator
The controller now builds for the Waveshare ESP32-P4-Nano only (plus the linux
sim and the desktop); the S3 stays for the USB/network bridge in bridge/.

- radio-c6/: C6 firmware, esp-hosted plus ESP-NOW over peer data. The P4 loads
  it from the slave_fw partition when the C6 runs another version (c6_update.c)
- bridge_hosted.c: the C6 as the always-on "c6" bridge, and the P4 as a network
  bridge on UDP 8766 for the desktop
- Ethernet on the P4's EMAC, ES8311 mic; default address 192.168.50.20. The
  W5500, INMP441 and direct ESP-NOW code is gone
- The simulated rig at /sim/ is built into the board image, with an always-on
  "browser" bridge. Its frames go through a queue so a slow page cannot hold up
  the radio, and frames for simulated bars are not sent over the C6. Receiver
  buffers are on the heap; a bar's flash file is only written when it changes
- HTTP server: more handlers, sockets and stack for the rig
- docs/P4_NANO.md, README and Makefile updated; graphify output

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 21:45:25 +13:00

163 lines
4.5 KiB
Plaintext

menu "Mic config"
config MIC_STREAM_GAIN
int "Digital gain for the audio stream (x)"
range 1 256
default 16
help
The mic is quiet at full scale; x16 (+24 dB) makes speech
audible without clipping at normal distances.
endmenu
menu "Beat detection config"
config BEAT_LED_GPIO
int "Beat LED GPIO, -1 for none (the P4-Nano has no user LED)"
default -1
config BEAT_LED_ACTIVE_LOW
bool "Beat LED lights when the pin is low"
default y
config BEAT_LED_PULSE_MS
int "Beat LED flash length (ms)"
range 10 500
default 60
config BEAT_LED_DOWNBEAT_MS
int "Beat LED flash length on the first beat of a bar (ms)"
range 10 1000
default 200
config BEAT_GATE_DBFS
int "Ignore audio quieter than this (dBFS, before stream gain)"
range -100 -20
default -75
help
An INMP441's self-noise is about -87 dBFS. Background music in a
room can sit around -65 dBFS, so keep this well below that.
config BEAT_LEAD_MS
int "Fire predicted beats this early (ms)"
range 0 200
default 30
help
Beats are predicted from the tempo, so they can be sent early
to cancel the ~30 ms of capture and analysis latency. Raise it
to cover output latency too (e.g. network or lights).
endmenu
menu "AP config"
config AP_BUTTON_GPIO
int "AP button GPIO, -1 for none (the P4-Nano has no user button)"
default -1
help
Active-low push button to ground (internal pull-up). Held while the controller boots, it turns
the Wi-Fi access point on even when the ap_enabled setting is off.
config AP_HOLD_MS
int "Hold time at boot (ms)"
range 100 5000
default 1000
endmenu
menu "ESP-NOW config"
config ESPNOW_CHANNEL
int "Wi-Fi channel shared with the LED drivers"
range 1 13
default 11
config BEAT_TX_COPIES
int "Copies sent of every beat frame"
range 1 4
default 2
help
Each beat is broadcast this many times with the same beat index.
Drivers act on the first copy that arrives and drop the rest.
config BEAT_TX_GAP_US
int "Gap between beat copies (us)"
range 500 10000
default 2000
config BEAT_TEST_GPIO
int "GPIO toggled on every beat sent (-1 = off)"
range -1 54
default -1
help
For latency measurement: a logic analyzer or scope on this pin and on
the driver's beat pin shows the true master-to-LED delay.
config BULK_HOLDOFF_US
int "Hold bulk traffic back after a beat (us)"
range 0 20000
default 3000
endmenu
menu "ESP32-P4-Nano board"
depends on IDF_TARGET_ESP32P4
config P4_DEFAULT_IP_A
int "Address without DHCP: first byte"
range 0 255
default 192
help
The Nano usually sits on a cable straight to a PC (192.168.50.10), with no DHCP server. After a short
DHCP wait it takes this address, /24, no gateway. Settings "static_ips" still come first.
config P4_DEFAULT_IP_B
int "Address without DHCP: second byte"
range 0 255
default 168
config P4_DEFAULT_IP_C
int "Address without DHCP: third byte"
range 0 255
default 50
config P4_DEFAULT_IP_D
int "Address without DHCP: fourth byte"
range 1 254
default 20
config P4_ETH_MDC_GPIO
int "Ethernet MDC GPIO"
default 31
config P4_ETH_MDIO_GPIO
int "Ethernet MDIO GPIO"
default 52
config P4_ETH_PHY_RST_GPIO
int "IP101 PHY reset GPIO (-1: none)"
range -1 54
default 51
config P4_CODEC_I2C_SDA_GPIO
int "ES8311 I2C SDA GPIO"
default 7
config P4_CODEC_I2C_SCL_GPIO
int "ES8311 I2C SCL GPIO"
default 8
config P4_CODEC_I2C_ADDR
hex "ES8311 I2C address (7-bit)"
default 0x18
config P4_I2S_MCLK_GPIO
int "ES8311 MCLK GPIO"
default 13
config P4_I2S_BCLK_GPIO
int "ES8311 BCLK (SCLK) GPIO"
default 12
config P4_I2S_WS_GPIO
int "ES8311 WS (LRCK) GPIO"
default 10
config P4_I2S_DIN_GPIO
int "ES8311 ADC data into the P4 (ASDOUT) GPIO"
default 11
config P4_MIC_PGA_DB
int "ES8311 microphone gain (dB, 0-30 in 3 dB steps)"
range 0 30
default 24
endmenu