4ce3513dd2
- Introduced DaliRawFrame structure to encapsulate raw frame data. - Enhanced DaliDomainService to manage raw frame sinks and processing. - Implemented raw frame task for asynchronous handling of incoming DALI frames. - Integrated raw frame handling in GatewayBleBridge and GatewayNetworkService. - Added GatewayUsbSetupBridge to facilitate USB Serial/JTAG communication with DALI. - Configured ESP-NOW for wireless communication and setup management. - Updated GatewayRuntime to support clearing wireless credentials on boot button long press. - Enhanced CMakeLists to include new components and dependencies. Co-authored-by: Copilot <copilot@github.com>
403 lines
11 KiB
Plaintext
403 lines
11 KiB
Plaintext
menu "Gateway App"
|
|
|
|
config GATEWAY_CHANNEL_COUNT
|
|
int "Gateway channel count"
|
|
range 1 2
|
|
default 2
|
|
help
|
|
Number of logical DALI gateway channels exposed by the native gateway.
|
|
|
|
menu "Gateway Channel 1"
|
|
|
|
config GATEWAY_CHANNEL1_GW_ID
|
|
int "Gateway id"
|
|
range 0 255
|
|
default 3
|
|
help
|
|
Lua-compatible gateway id for the first DALI channel.
|
|
|
|
choice GATEWAY_CHANNEL1_PHY
|
|
prompt "Channel 1 PHY"
|
|
default GATEWAY_CHANNEL1_PHY_DISABLED
|
|
help
|
|
Select the physical transport used by channel 1.
|
|
|
|
config GATEWAY_CHANNEL1_PHY_DISABLED
|
|
bool "Disabled"
|
|
|
|
config GATEWAY_CHANNEL1_PHY_NATIVE
|
|
bool "Native DALI GPIO"
|
|
|
|
config GATEWAY_CHANNEL1_PHY_UART1
|
|
bool "Serial PHY on UART1"
|
|
|
|
config GATEWAY_CHANNEL1_PHY_UART2
|
|
bool "Serial PHY on UART2"
|
|
|
|
endchoice
|
|
|
|
config GATEWAY_CHANNEL1_NATIVE_BUS_ID
|
|
int "Native DALI bus id"
|
|
depends on GATEWAY_CHANNEL1_PHY_NATIVE
|
|
range 0 15
|
|
default 0
|
|
help
|
|
Logical DALI HAL bus index for channel 1.
|
|
|
|
config GATEWAY_CHANNEL1_NATIVE_TX_PIN
|
|
int "Native DALI TX pin"
|
|
depends on GATEWAY_CHANNEL1_PHY_NATIVE
|
|
range 0 48
|
|
default 18
|
|
help
|
|
ESP32-S3 GPIO used for channel 1 native DALI transmit.
|
|
|
|
config GATEWAY_CHANNEL1_NATIVE_RX_PIN
|
|
int "Native DALI RX pin"
|
|
depends on GATEWAY_CHANNEL1_PHY_NATIVE
|
|
range 0 48
|
|
default 8
|
|
help
|
|
ESP32-S3 GPIO used for channel 1 native DALI receive.
|
|
|
|
config GATEWAY_CHANNEL1_NATIVE_BAUDRATE
|
|
int "Native DALI baudrate"
|
|
depends on GATEWAY_CHANNEL1_PHY_NATIVE
|
|
range 400 2400
|
|
default 1200
|
|
help
|
|
Runtime baudrate used for channel 1 native DALI timing.
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_TX_PIN
|
|
int "Serial PHY TX pin"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 0 48
|
|
default 1
|
|
help
|
|
ESP32-S3 GPIO used by the channel 1 serial PHY transmit pin.
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_RX_PIN
|
|
int "Serial PHY RX pin"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 0 48
|
|
default 2
|
|
help
|
|
ESP32-S3 GPIO used by the channel 1 serial PHY receive pin.
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_BAUDRATE
|
|
int "Serial PHY baudrate"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 1200 921600
|
|
default 9600
|
|
help
|
|
UART baudrate used by the channel 1 serial PHY.
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_RX_BUFFER
|
|
int "Serial PHY RX buffer bytes"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 128 4096
|
|
default 512
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_TX_BUFFER
|
|
int "Serial PHY TX buffer bytes"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 0 4096
|
|
default 512
|
|
|
|
config GATEWAY_CHANNEL1_SERIAL_QUERY_TIMEOUT_MS
|
|
int "Serial PHY query timeout ms"
|
|
depends on GATEWAY_CHANNEL1_PHY_UART1 || GATEWAY_CHANNEL1_PHY_UART2
|
|
range 10 5000
|
|
default 500
|
|
|
|
endmenu
|
|
|
|
menu "Gateway Channel 2"
|
|
|
|
config GATEWAY_CHANNEL2_GW_ID
|
|
int "Gateway id"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2
|
|
range 0 255
|
|
default 4
|
|
help
|
|
Lua-compatible gateway id for the second DALI channel.
|
|
|
|
choice GATEWAY_CHANNEL2_PHY
|
|
prompt "Channel 2 PHY"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2
|
|
default GATEWAY_CHANNEL2_PHY_DISABLED
|
|
help
|
|
Select the physical transport used by channel 2.
|
|
|
|
config GATEWAY_CHANNEL2_PHY_DISABLED
|
|
bool "Disabled"
|
|
|
|
config GATEWAY_CHANNEL2_PHY_NATIVE
|
|
bool "Native DALI GPIO"
|
|
|
|
config GATEWAY_CHANNEL2_PHY_UART1
|
|
bool "Serial PHY on UART1"
|
|
|
|
config GATEWAY_CHANNEL2_PHY_UART2
|
|
bool "Serial PHY on UART2"
|
|
|
|
endchoice
|
|
|
|
config GATEWAY_CHANNEL2_NATIVE_BUS_ID
|
|
int "Native DALI bus id"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
|
|
range 0 15
|
|
default 1
|
|
help
|
|
Logical DALI HAL bus index for channel 2.
|
|
|
|
config GATEWAY_CHANNEL2_NATIVE_TX_PIN
|
|
int "Native DALI TX pin"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
|
|
range 0 48
|
|
default 19
|
|
help
|
|
ESP32-S3 GPIO used for channel 2 native DALI transmit.
|
|
|
|
config GATEWAY_CHANNEL2_NATIVE_RX_PIN
|
|
int "Native DALI RX pin"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
|
|
range 0 48
|
|
default 9
|
|
help
|
|
ESP32-S3 GPIO used for channel 2 native DALI receive.
|
|
|
|
config GATEWAY_CHANNEL2_NATIVE_BAUDRATE
|
|
int "Native DALI baudrate"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && GATEWAY_CHANNEL2_PHY_NATIVE
|
|
range 400 2400
|
|
default 1200
|
|
help
|
|
Runtime baudrate used for channel 2 native DALI timing.
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_TX_PIN
|
|
int "Serial PHY TX pin"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 0 48
|
|
default 6
|
|
help
|
|
ESP32-S3 GPIO used by the channel 2 serial PHY transmit pin.
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_RX_PIN
|
|
int "Serial PHY RX pin"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 0 48
|
|
default 7
|
|
help
|
|
ESP32-S3 GPIO used by the channel 2 serial PHY receive pin.
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_BAUDRATE
|
|
int "Serial PHY baudrate"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 1200 921600
|
|
default 9600
|
|
help
|
|
UART baudrate used by the channel 2 serial PHY.
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_RX_BUFFER
|
|
int "Serial PHY RX buffer bytes"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 128 4096
|
|
default 512
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_TX_BUFFER
|
|
int "Serial PHY TX buffer bytes"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 0 4096
|
|
default 512
|
|
|
|
config GATEWAY_CHANNEL2_SERIAL_QUERY_TIMEOUT_MS
|
|
int "Serial PHY query timeout ms"
|
|
depends on GATEWAY_CHANNEL_COUNT >= 2 && (GATEWAY_CHANNEL2_PHY_UART1 || GATEWAY_CHANNEL2_PHY_UART2)
|
|
range 10 5000
|
|
default 500
|
|
|
|
endmenu
|
|
|
|
config GATEWAY_ENABLE_DALI_BUS
|
|
bool "Legacy single local DALI bus switch"
|
|
default n
|
|
help
|
|
Legacy compatibility option retained for existing sdkconfig files. New code uses the
|
|
per-channel PHY selectors above.
|
|
|
|
config GATEWAY_DALI_BUS_ID
|
|
int "DALI bus id"
|
|
depends on GATEWAY_ENABLE_DALI_BUS
|
|
range 0 15
|
|
default 0
|
|
help
|
|
Logical DALI bus index used by the HAL queue set.
|
|
|
|
config GATEWAY_DALI_TX_PIN
|
|
int "DALI TX pin"
|
|
depends on GATEWAY_ENABLE_DALI_BUS
|
|
range 0 48
|
|
default 18
|
|
help
|
|
ESP32-S3 GPIO used for the DALI transmit pin.
|
|
|
|
config GATEWAY_DALI_RX_PIN
|
|
int "DALI RX pin"
|
|
depends on GATEWAY_ENABLE_DALI_BUS
|
|
range 0 48
|
|
default 8
|
|
help
|
|
ESP32-S3 GPIO used for the DALI receive pin.
|
|
|
|
config GATEWAY_DALI_BAUDRATE
|
|
int "DALI baudrate"
|
|
depends on GATEWAY_ENABLE_DALI_BUS
|
|
range 400 2400
|
|
default 1200
|
|
help
|
|
Runtime baudrate used when initializing the local DALI bus.
|
|
|
|
menu "Gateway Startup Services"
|
|
|
|
config GATEWAY_BLE_SUPPORTED
|
|
bool "BLE gateway transport is supported"
|
|
default y
|
|
help
|
|
Builds and starts the BLE gateway bridge. Runtime BLE enable state is controlled separately.
|
|
|
|
config GATEWAY_START_BLE_ENABLED
|
|
bool "Enable BLE at startup"
|
|
depends on GATEWAY_BLE_SUPPORTED
|
|
default y
|
|
help
|
|
Default runtime BLE state when no persisted BLE setting exists. Lua gateway behavior starts BLE by default.
|
|
|
|
config GATEWAY_WIFI_SUPPORTED
|
|
bool "Wi-Fi gateway transport is supported"
|
|
default y
|
|
help
|
|
Keeps Wi-Fi control, HTTP/UDP networking, setup AP, and ESP-NOW setup paths available.
|
|
|
|
config GATEWAY_START_WIFI_STA_ENABLED
|
|
bool "Start Wi-Fi STA at startup"
|
|
depends on GATEWAY_WIFI_SUPPORTED
|
|
default n
|
|
help
|
|
Connect to persisted Wi-Fi credentials at boot. Disabled by default so wireless stays off until commanded.
|
|
|
|
config GATEWAY_ESPNOW_SETUP_SUPPORTED
|
|
bool "ESP-NOW setup transport is supported"
|
|
depends on GATEWAY_WIFI_SUPPORTED
|
|
default y
|
|
help
|
|
Enables ESP-NOW setup ingress when setup AP mode is entered.
|
|
|
|
config GATEWAY_START_ESPNOW_SETUP_ENABLED
|
|
bool "Enter ESP-NOW setup mode at startup"
|
|
depends on GATEWAY_ESPNOW_SETUP_SUPPORTED
|
|
default n
|
|
help
|
|
Starts the setup AP and ESP-NOW setup ingress immediately at boot. Disabled by default.
|
|
|
|
choice GATEWAY_USB_STARTUP_MODE
|
|
prompt "USB Serial/JTAG startup mode"
|
|
default GATEWAY_USB_STARTUP_DEBUG_JTAG
|
|
help
|
|
Select whether the built-in USB Serial/JTAG interface remains available for debug or is claimed by the setup bridge.
|
|
|
|
config GATEWAY_USB_STARTUP_DEBUG_JTAG
|
|
bool "USB Serial/JTAG debug interface"
|
|
|
|
config GATEWAY_USB_STARTUP_SETUP_SERIAL
|
|
bool "USB Serial/JTAG setup bridge"
|
|
|
|
endchoice
|
|
|
|
config GATEWAY_USB_SETUP_CHANNEL_INDEX
|
|
int "USB setup DALI channel index"
|
|
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
|
|
range 0 1
|
|
default 0
|
|
help
|
|
Native zero-based DALI channel used for short raw USB setup frames on the single USB stream.
|
|
|
|
config GATEWAY_USB_SETUP_RX_BUFFER
|
|
int "USB setup RX buffer bytes"
|
|
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
|
|
range 64 4096
|
|
default 256
|
|
|
|
config GATEWAY_USB_SETUP_TX_BUFFER
|
|
int "USB setup TX buffer bytes"
|
|
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
|
|
range 64 4096
|
|
default 256
|
|
|
|
config GATEWAY_USB_SETUP_READ_TIMEOUT_MS
|
|
int "USB setup read timeout ms"
|
|
depends on GATEWAY_USB_STARTUP_SETUP_SERIAL
|
|
range 1 1000
|
|
default 20
|
|
|
|
endmenu
|
|
|
|
menu "Gateway Network Services"
|
|
|
|
config GATEWAY_NETWORK_HTTP_ENABLED
|
|
bool "Enable HTTP gateway API"
|
|
default y
|
|
help
|
|
Enables Lua-compatible HTTP gateway routes such as /info and /dali/cmd.
|
|
|
|
config GATEWAY_NETWORK_HTTP_PORT
|
|
int "HTTP API port"
|
|
depends on GATEWAY_NETWORK_HTTP_ENABLED
|
|
range 1 65535
|
|
default 80
|
|
|
|
config GATEWAY_NETWORK_UDP_ROUTER_ENABLED
|
|
bool "Enable UDP IP router"
|
|
default y
|
|
help
|
|
Enables raw gateway command ingress and notification replies on UDP port 2020 by default.
|
|
|
|
config GATEWAY_NETWORK_UDP_PORT
|
|
int "UDP IP router port"
|
|
depends on GATEWAY_NETWORK_UDP_ROUTER_ENABLED
|
|
range 1 65535
|
|
default 2020
|
|
|
|
config GATEWAY_STATUS_LED_GPIO
|
|
int "Status LED GPIO"
|
|
range -1 48
|
|
default -1
|
|
help
|
|
GPIO used by the HTTP /led/1 and /led/0 routes. Set to -1 to disable GPIO control.
|
|
|
|
config GATEWAY_STATUS_LED_ACTIVE_HIGH
|
|
bool "Status LED is active high"
|
|
depends on GATEWAY_STATUS_LED_GPIO >= 0
|
|
default y
|
|
|
|
config GATEWAY_BOOT_BUTTON_GPIO
|
|
int "BOOT button GPIO"
|
|
range -1 48
|
|
default 0
|
|
help
|
|
GPIO used for Lua-compatible setup entry and Wi-Fi credential clearing. Set to -1 to disable.
|
|
|
|
config GATEWAY_BOOT_BUTTON_ACTIVE_LOW
|
|
bool "BOOT button is active low"
|
|
depends on GATEWAY_BOOT_BUTTON_GPIO >= 0
|
|
default y
|
|
|
|
config GATEWAY_BOOT_BUTTON_LONG_PRESS_MS
|
|
int "BOOT button long press ms"
|
|
depends on GATEWAY_BOOT_BUTTON_GPIO >= 0
|
|
range 500 10000
|
|
default 3000
|
|
|
|
endmenu
|
|
|
|
endmenu |