13
13
14
14
#define TAG "cmd_phy"
15
15
16
+ #define CERT_TASK_PRIO 2
17
+
16
18
#if CONFIG_ESP_PHY_ENABLE_CERT_TEST
17
19
18
20
static phy_args_t phy_args ;
@@ -67,7 +69,7 @@ static int esp_phy_get_rx_result_func(int argc, char **argv)
67
69
68
70
esp_phy_get_rx_result (& rx_result );
69
71
70
- ESP_LOGI (TAG , "Total : %lu, Correct: %lu, RSSI: %d, flag: %lu" , rx_result .phy_rx_total_count ,
72
+ ESP_LOGI (TAG , "Desired : %lu, Correct: %lu, RSSI: %d, flag: %lu" , rx_result .phy_rx_total_count ,
71
73
rx_result .phy_rx_correct_count , rx_result .phy_rx_rssi , rx_result .phy_rx_result_flag );
72
74
73
75
return 0 ;
@@ -111,7 +113,7 @@ static int esp_phy_cbw40m_en_func(int argc, char **argv)
111
113
112
114
static int esp_phy_wifi_tx_func (int argc , char * * argv )
113
115
{
114
- phy_wifi_tx_s cmd ;
116
+ static phy_wifi_tx_s cmd ;
115
117
int nerrors = arg_parse (argc , argv , (void * * ) & phy_wifi_tx_args );
116
118
if (nerrors != 0 ) {
117
119
arg_print_errors (stderr , phy_wifi_tx_args .end , argv [0 ]);
@@ -160,14 +162,14 @@ static int esp_phy_wifi_tx_func(int argc, char **argv)
160
162
ESP_LOGW (TAG , "Default packet_num is 0" );
161
163
}
162
164
163
- xTaskCreate (cert_wifi_tx , "cert_wifi_tx" , 1024 * 10 , (void * )& cmd , 10 , NULL );
165
+ xTaskCreate (cert_wifi_tx , "cert_wifi_tx" , 1024 * 10 , (void * )& cmd , CERT_TASK_PRIO , NULL );
164
166
165
167
return 0 ;
166
168
}
167
169
168
170
static int esp_phy_wifi_rx_func (int argc , char * * argv )
169
171
{
170
- phy_wifi_tx_s cmd ;
172
+ static phy_wifi_rx_s cmd ;
171
173
int nerrors = arg_parse (argc , argv , (void * * ) & phy_wifi_rx_args );
172
174
if (nerrors != 0 ) {
173
175
arg_print_errors (stderr , phy_wifi_rx_args .end , argv [0 ]);
@@ -188,7 +190,7 @@ static int esp_phy_wifi_rx_func(int argc, char **argv)
188
190
ESP_LOGW (TAG , "Default rate is PHY_RATE_1M" );
189
191
}
190
192
191
- xTaskCreate (cert_wifi_rx , "cert_wifi_rx" , 1024 * 20 , (void * )& cmd , 10 , NULL );
193
+ xTaskCreate (cert_wifi_rx , "cert_wifi_rx" , 1024 * 20 , (void * )& cmd , CERT_TASK_PRIO , NULL );
192
194
return 0 ;
193
195
}
194
196
@@ -253,7 +255,7 @@ void cert_ble_rx(void *arg)
253
255
254
256
static int esp_phy_ble_tx_func (int argc , char * * argv )
255
257
{
256
- phy_ble_tx_s cmd ;
258
+ static phy_ble_tx_s cmd ;
257
259
int nerrors = arg_parse (argc , argv , (void * * ) & phy_ble_tx_args );
258
260
if (nerrors != 0 ) {
259
261
arg_print_errors (stderr , phy_ble_tx_args .end , argv [0 ]);
@@ -309,22 +311,22 @@ static int esp_phy_ble_tx_func(int argc, char **argv)
309
311
ESP_LOGW (TAG , "Default tx_num_in is 0" );
310
312
}
311
313
312
- xTaskCreate (cert_ble_tx , "cert_ble_tx" , 4096 , (void * )& cmd , 10 , NULL );
314
+ xTaskCreate (cert_ble_tx , "cert_ble_tx" , 4096 , (void * )& cmd , CERT_TASK_PRIO , NULL );
313
315
314
316
return 0 ;
315
317
}
316
318
317
319
static int esp_phy_ble_rx_func (int argc , char * * argv )
318
320
{
319
- phy_ble_rx_s cmd ;
321
+ static phy_ble_rx_s cmd ;
320
322
int nerrors = arg_parse (argc , argv , (void * * ) & phy_ble_rx_args );
321
323
if (nerrors != 0 ) {
322
324
arg_print_errors (stderr , phy_ble_rx_args .end , argv [0 ]);
323
325
return 1 ;
324
326
}
325
327
326
328
if (phy_ble_rx_args .channel -> count == 1 ) {
327
- cmd .channel = phy_ble_tx_args .channel -> ival [0 ];
329
+ cmd .channel = phy_ble_rx_args .channel -> ival [0 ];
328
330
} else {
329
331
cmd .channel = 1 ;
330
332
ESP_LOGW (TAG , "Default channel is 1" );
@@ -344,7 +346,7 @@ static int esp_phy_ble_rx_func(int argc, char **argv)
344
346
ESP_LOGW (TAG , "Default rate is PHY_BLE_RATE_1M" );
345
347
}
346
348
347
- xTaskCreate (cert_ble_rx , "cert_ble_rx" , 4096 , (void * )& cmd , 10 , NULL );
349
+ xTaskCreate (cert_ble_rx , "cert_ble_rx" , 4096 , (void * )& cmd , CERT_TASK_PRIO , NULL );
348
350
349
351
return 0 ;
350
352
}
0 commit comments