feat(gateway): add support for KNX TP UART 9-bit mode and enhance UART pin configuration
Signed-off-by: Tony <tonylu@tony-cloud.com>
This commit is contained in:
@@ -772,6 +772,16 @@ config GATEWAY_KNX_TP_BAUDRATE
|
||||
range 1200 921600
|
||||
default 19200
|
||||
|
||||
config GATEWAY_KNX_TP_UART_9BIT_MODE
|
||||
bool "KNX TP UART 9-bit mode"
|
||||
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
|
||||
default y
|
||||
help
|
||||
Enable the NCN5120/OpenKNX-style 9-bit UART frame on the wire. ESP-IDF
|
||||
exposes this as 8 data bits plus even parity, matching the TP-UART host
|
||||
mode commonly described as 19200 baud 9-bit UART. Disable only for
|
||||
hardware wired for 8N1 host UART mode.
|
||||
|
||||
config GATEWAY_BRIDGE_KNX_TASK_STACK_SIZE
|
||||
int "KNX/IP bridge task stack bytes"
|
||||
depends on GATEWAY_KNX_BRIDGE_SUPPORTED
|
||||
|
||||
@@ -886,6 +886,11 @@ extern "C" void app_main(void) {
|
||||
default_knx.tp_uart.tx_pin = CONFIG_GATEWAY_KNX_TP_TX_PIN;
|
||||
default_knx.tp_uart.rx_pin = CONFIG_GATEWAY_KNX_TP_RX_PIN;
|
||||
default_knx.tp_uart.baudrate = static_cast<uint32_t>(CONFIG_GATEWAY_KNX_TP_BAUDRATE);
|
||||
#ifdef CONFIG_GATEWAY_KNX_TP_UART_9BIT_MODE
|
||||
default_knx.tp_uart.nine_bit_mode = true;
|
||||
#else
|
||||
default_knx.tp_uart.nine_bit_mode = false;
|
||||
#endif
|
||||
bridge_config.default_knx_config = default_knx;
|
||||
}
|
||||
bridge_config.knx_task_stack_size =
|
||||
|
||||
Reference in New Issue
Block a user