mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'feature/modify_ot_rcp_TX_RX_pin' into 'master'
openthread: add a configuration for selecting RCP UART TX_RX See merge request espressif/esp-idf!19697
This commit is contained in:
commit
dfbebccf91
21
examples/openthread/ot_rcp/main/Kconfig.projbuild
Normal file
21
examples/openthread/ot_rcp/main/Kconfig.projbuild
Normal file
@ -0,0 +1,21 @@
|
||||
menu "OpenThread RCP Example"
|
||||
|
||||
config OPENTHREAD_UART_PIN_MANUAL
|
||||
bool "Configure RCP UART pin manually"
|
||||
default n
|
||||
help
|
||||
Select this to choose UART pin manually
|
||||
|
||||
config OPENTHREAD_UART_RX_PIN
|
||||
int "The number of RX pin"
|
||||
depends on OPENTHREAD_UART_PIN_MANUAL
|
||||
default 4
|
||||
range 0 25
|
||||
|
||||
config OPENTHREAD_UART_TX_PIN
|
||||
int "The number of TX pin"
|
||||
depends on OPENTHREAD_UART_PIN_MANUAL
|
||||
default 5
|
||||
range 0 25
|
||||
|
||||
endmenu
|
@ -20,6 +20,14 @@
|
||||
.radio_mode = RADIO_MODE_NATIVE, \
|
||||
}
|
||||
|
||||
#if CONFIG_OPENTHREAD_UART_PIN_MANUAL
|
||||
#define OPENTHREAD_RCP_UART_RX_PIN CONFIG_OPENTHREAD_UART_RX_PIN
|
||||
#define OPENTHREAD_RCP_UART_TX_PIN CONFIG_OPENTHREAD_UART_TX_PIN
|
||||
#else
|
||||
#define OPENTHREAD_RCP_UART_RX_PIN UART_PIN_NO_CHANGE
|
||||
#define OPENTHREAD_RCP_UART_TX_PIN UART_PIN_NO_CHANGE
|
||||
#endif
|
||||
|
||||
#define ESP_OPENTHREAD_DEFAULT_HOST_CONFIG() \
|
||||
{ \
|
||||
.host_connection_mode = HOST_CONNECTION_MODE_RCP_UART, \
|
||||
@ -35,8 +43,8 @@
|
||||
.rx_flow_ctrl_thresh = 0, \
|
||||
.source_clk = UART_SCLK_DEFAULT, \
|
||||
}, \
|
||||
.rx_pin = UART_PIN_NO_CHANGE, \
|
||||
.tx_pin = UART_PIN_NO_CHANGE, \
|
||||
.rx_pin = OPENTHREAD_RCP_UART_RX_PIN, \
|
||||
.tx_pin = OPENTHREAD_RCP_UART_TX_PIN, \
|
||||
}, \
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user