mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
example: support legacy PHY commands in cert_test
This commit is contained in:
parent
22caec278f
commit
2d072ab141
@ -172,6 +172,7 @@
|
|||||||
/examples/openthread/ @esp-idf-codeowners/ieee802154
|
/examples/openthread/ @esp-idf-codeowners/ieee802154
|
||||||
/examples/peripherals/ @esp-idf-codeowners/peripherals
|
/examples/peripherals/ @esp-idf-codeowners/peripherals
|
||||||
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
|
/examples/peripherals/usb/ @esp-idf-codeowners/peripherals @esp-idf-codeowners/peripherals/usb
|
||||||
|
/examples/phy/ @esp-idf-codeowners/bluetooth @esp-idf-codeowners/wifi @esp-idf-codeowners/ieee802154
|
||||||
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
|
/examples/protocols/ @esp-idf-codeowners/network @esp-idf-codeowners/app-utilities
|
||||||
/examples/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
|
/examples/provisioning/ @esp-idf-codeowners/app-utilities/provisioning
|
||||||
/examples/security/ @esp-idf-codeowners/security
|
/examples/security/ @esp-idf-codeowners/security
|
||||||
|
@ -115,7 +115,10 @@ I (191970) phy: BT TX TONE STOP!
|
|||||||
phy>
|
phy>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## PHY Commands Format
|
||||||
|
|
||||||
|
For BLE test, if you want to use `fcc_le_tx` and `rw_le_rx_per` legacy commands for tx/rx test, you need to enable `ESP_PHY_LEGACY_COMMANDS` in menuconfig, otherwise, the new format commands `esp_ble_tx` and `esp_ble_rx` are supported.
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
||||||
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
|
For any technical queries, please open an [issue](https://github.com/espressif/esp-idf/issues) on GitHub. We will get back to you soon.
|
||||||
|
|
14
examples/phy/cert_test/main/Kconfig.projbuild
Normal file
14
examples/phy/cert_test/main/Kconfig.projbuild
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
menu "Example Configuration"
|
||||||
|
|
||||||
|
choice COMMANDS_FORMAT
|
||||||
|
prompt "PHY Commands Format"
|
||||||
|
default ESP_PHY_NEW_COMMANDS
|
||||||
|
config ESP_PHY_LEGACY_COMMANDS
|
||||||
|
bool "Legacy Commands Format"
|
||||||
|
|
||||||
|
config ESP_PHY_NEW_COMMANDS
|
||||||
|
bool "New Commands Format"
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
endmenu
|
@ -29,6 +29,11 @@ static phy_ble_rx_t phy_ble_rx_args;
|
|||||||
static phy_bt_tx_tone_t phy_bt_tx_tone_args;
|
static phy_bt_tx_tone_t phy_bt_tx_tone_args;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if CONFIG_ESP_PHY_LEGACY_COMMANDS
|
||||||
|
#define arg_int0(_a, _b, _c, _d) arg_int0(NULL, NULL, _c, _d)
|
||||||
|
#define arg_int1(_a, _b, _c, _d) arg_int1(NULL, NULL, _c, _d)
|
||||||
|
#endif
|
||||||
|
|
||||||
static int esp_phy_tx_contin_en_func(int argc, char **argv)
|
static int esp_phy_tx_contin_en_func(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int nerrors = arg_parse(argc, argv, (void **) &phy_args);
|
int nerrors = arg_parse(argc, argv, (void **) &phy_args);
|
||||||
@ -487,7 +492,11 @@ void register_phy_cmd(void)
|
|||||||
phy_ble_tx_args.end = arg_end(1);
|
phy_ble_tx_args.end = arg_end(1);
|
||||||
|
|
||||||
const esp_console_cmd_t esp_ble_tx_cmd = {
|
const esp_console_cmd_t esp_ble_tx_cmd = {
|
||||||
|
#if CONFIG_ESP_PHY_NEW_COMMANDS
|
||||||
.command = "esp_ble_tx",
|
.command = "esp_ble_tx",
|
||||||
|
#elif CONFIG_ESP_PHY_LEGACY_COMMANDS
|
||||||
|
.command = "fcc_le_tx",
|
||||||
|
#endif
|
||||||
.help = "BLE TX command",
|
.help = "BLE TX command",
|
||||||
.hint = NULL,
|
.hint = NULL,
|
||||||
.func = &esp_phy_ble_tx_func,
|
.func = &esp_phy_ble_tx_func,
|
||||||
@ -501,7 +510,11 @@ void register_phy_cmd(void)
|
|||||||
phy_ble_rx_args.end = arg_end(1);
|
phy_ble_rx_args.end = arg_end(1);
|
||||||
|
|
||||||
const esp_console_cmd_t esp_ble_rx_cmd = {
|
const esp_console_cmd_t esp_ble_rx_cmd = {
|
||||||
|
#if CONFIG_ESP_PHY_NEW_COMMANDS
|
||||||
.command = "esp_ble_rx",
|
.command = "esp_ble_rx",
|
||||||
|
#elif CONFIG_ESP_PHY_LEGACY_COMMANDS
|
||||||
|
.command = "rw_le_rx_per",
|
||||||
|
#endif
|
||||||
.help = "BLE RX command",
|
.help = "BLE RX command",
|
||||||
.hint = NULL,
|
.hint = NULL,
|
||||||
.func = &esp_phy_ble_rx_func,
|
.func = &esp_phy_ble_rx_func,
|
||||||
|
Loading…
Reference in New Issue
Block a user