Skip to content

Commit

Permalink
Merge branch 'bugfix/expose_baud_rate_in_menu_v5.2' into 'release/v5.2'
Browse files Browse the repository at this point in the history
fix(nimble): Exposed the baud rate for hci uart in menuconfig (v5.2)

See merge request espressif/esp-idf!29488
  • Loading branch information
rahult-github committed Mar 8, 2024
2 parents 909e7fc + d1ee482 commit 259e2ba
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
29 changes: 29 additions & 0 deletions components/bt/host/nimble/Kconfig.in
Original file line number Diff line number Diff line change
Expand Up @@ -941,9 +941,35 @@ menu "Host-controller Transport"
help
Uart port

choice BT_NIMBLE_HCI_USE_UART_BAUDRATE
prompt "Uart Hci Baud Rate"
default UART_BAUDRATE_921600
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART
help
Uart Baud Rate

config UART_BAUDRATE_115200
bool "115200"
config UART_BAUDRATE_230400
bool "230400"
config UART_BAUDRATE_460800
bool "460800"
config UART_BAUDRATE_921600
bool "921600"
endchoice

config BT_NIMBLE_HCI_UART_BAUDRATE
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART
int
default 115200 if UART_BAUDRATE_115200
default 230400 if UART_BAUDRATE_230400
default 460800 if UART_BAUDRATE_460800
default 921600 if UART_BAUDRATE_921600

choice BT_NIMBLE_USE_HCI_UART_PARITY
prompt "Uart PARITY"
default UART_PARITY_NONE
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART
help
Uart Parity

Expand All @@ -959,16 +985,19 @@ menu "Host-controller Transport"
int
default 0 if !UART_PARITY_NONE
default 1 if UART_PARITY_NONE
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART

config BT_NIMBLE_TRANSPORT_UART_PARITY_ODD
int
default 0 if !UART_PARITY_ODD
default 1 if UART_PARITY_ODD
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART

config BT_NIMBLE_TRANSPORT_UART_PARITY_EVEN
int
default 0 if !UART_PARITY_EVEN
default 1 if UART_PARITY_EVEN
depends on BT_CONTROLLER_DISABLED && BT_NIMBLE_TRANSPORT_UART

config BT_NIMBLE_UART_RX_PIN
int "UART Rx pin"
Expand Down
4 changes: 2 additions & 2 deletions components/bt/host/nimble/port/include/esp_nimble_cfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1796,7 +1796,7 @@
#endif
#endif

#if CONFIG_BT_CONTROLLER_DISABLED
#if CONFIG_BT_CONTROLLER_DISABLED && CONFIG_BT_NIMBLE_TRANSPORT_UART
#ifndef MYNEWT_VAL_BLE_TRANSPORT_UART_PORT
#define MYNEWT_VAL_BLE_TRANSPORT_UART_PORT CONFIG_BT_NIMBLE_TRANSPORT_UART_PORT
#endif
Expand All @@ -1818,7 +1818,7 @@
#endif

#ifndef MYNEWT_VAL_BLE_TRANSPORT_UART_BAUDRATE
#define MYNEWT_VAL_BLE_TRANSPORT_UART_BAUDRATE (921600)
#define MYNEWT_VAL_BLE_TRANSPORT_UART_BAUDRATE CONFIG_BT_NIMBLE_HCI_UART_BAUDRATE
#endif

#ifndef MYNEWT_VAL_BLE_TRANSPORT_UART_DATA_BITS
Expand Down

0 comments on commit 259e2ba

Please sign in to comment.