@@ -72,7 +72,6 @@ static struct radio_test_config test_config;
7272/* If true, RX sweep, TX sweep or duty cycle test is performed. */
7373static bool test_in_progress ;
7474
75- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
7675static void ieee_channel_check (const struct shell * shell , uint8_t channel )
7776{
7877 if (config .mode == NRF_RADIO_MODE_IEEE802154_250KBIT ) {
@@ -90,7 +89,6 @@ static void ieee_channel_check(const struct shell *shell, uint8_t channel)
9089
9190 }
9291}
93- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
9492
9593static int cmd_start_channel_set (const struct shell * shell , size_t argc ,
9694 char * * argv )
@@ -211,9 +209,7 @@ static int cmd_tx_carrier_start(const struct shell *shell, size_t argc,
211209 test_in_progress = false;
212210 }
213211
214- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
215212 ieee_channel_check (shell , config .channel_start );
216- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
217213
218214 memset (& test_config , 0 , sizeof (test_config ));
219215 test_config .type = UNMODULATED_TX ;
@@ -263,9 +259,7 @@ static int cmd_tx_modulated_carrier_start(const struct shell *shell,
263259 test_in_progress = false;
264260 }
265261
266- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
267262 ieee_channel_check (shell , config .channel_start );
268- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
269263
270264 if (argc > 2 ) {
271265 shell_error (shell , "%s: bad parameters count." , argv [0 ]);
@@ -314,9 +308,7 @@ static int cmd_duty_cycle_set(const struct shell *shell, size_t argc,
314308
315309 config .duty_cycle = duty_cycle ;
316310
317- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
318311 ieee_channel_check (shell , config .channel_start );
319- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
320312
321313 memset (& test_config , 0 , sizeof (test_config ));
322314 test_config .type = MODULATED_TX_DUTY_CYCLE ;
@@ -488,7 +480,6 @@ static int cmd_print(const struct shell *shell, size_t argc, char **argv)
488480 STRINGIFY (NRF_RADIO_MODE_BLE_2MBIT ));
489481 break ;
490482
491- #if CONFIG_HAS_HW_NRF_RADIO_BLE_CODED
492483 case NRF_RADIO_MODE_BLE_LR125KBIT :
493484 shell_print (shell ,
494485 "Data rate: %s" ,
@@ -500,15 +491,12 @@ static int cmd_print(const struct shell *shell, size_t argc, char **argv)
500491 "Data rate: %s" ,
501492 STRINGIFY (NRF_RADIO_MODE_BLE_LR500KBIT ));
502493 break ;
503- #endif /* CONFIG_HAS_HW_NRF_RADIO_BLE_CODED */
504494
505- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
506495 case NRF_RADIO_MODE_IEEE802154_250KBIT :
507496 shell_print (shell ,
508497 "Data rate: %s" ,
509498 STRINGIFY (NRF_RADIO_MODE_IEEE802154_250KBIT ));
510499 break ;
511- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
512500
513501 default :
514502 shell_print (shell ,
@@ -607,9 +595,7 @@ static int cmd_rx_start(const struct shell *shell, size_t argc, char **argv)
607595 return - EINVAL ;
608596 }
609597
610- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
611598 ieee_channel_check (shell , config .channel_start );
612- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
613599
614600 memset (& test_config , 0 , sizeof (test_config ));
615601 test_config .type = RX ;
@@ -980,7 +966,6 @@ static int cmd_ble_2mbit(const struct shell *shell, size_t argc, char **argv)
980966 return 0 ;
981967}
982968
983- #if CONFIG_HAS_HW_NRF_RADIO_BLE_CODED
984969static int cmd_ble_lr125kbit (const struct shell * shell , size_t argc ,
985970 char * * argv )
986971{
@@ -1000,9 +985,7 @@ static int cmd_ble_lr500kbit(const struct shell *shell, size_t argc,
1000985
1001986 return 0 ;
1002987}
1003- #endif /* CONFIG_HAS_HW_NRF_RADIO_BLE_CODED */
1004988
1005- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
1006989static int cmd_ble_ieee (const struct shell * shell , size_t argc , char * * argv )
1007990{
1008991 config .mode = NRF_RADIO_MODE_IEEE802154_250KBIT ;
@@ -1011,7 +994,6 @@ static int cmd_ble_ieee(const struct shell *shell, size_t argc, char **argv)
1011994
1012995 return 0 ;
1013996}
1014- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
1015997
1016998static int cmd_pattern_random (const struct shell * shell , size_t argc ,
1017999 char * * argv )
@@ -1087,20 +1069,16 @@ SHELL_STATIC_SUBCMD_SET_CREATE(sub_data_rate,
10871069 SHELL_CMD (ble_2Mbit , NULL , "2 Mbit/s Bluetooth Low Energy" ,
10881070 cmd_ble_2mbit ),
10891071
1090- #if CONFIG_HAS_HW_NRF_RADIO_BLE_CODED
10911072 SHELL_CMD (ble_lr125Kbit , NULL ,
10921073 "Long range 125 kbit/s TX, 125 kbit/s and 500 kbit/s RX" ,
10931074 cmd_ble_lr125kbit ),
10941075
10951076 SHELL_CMD (ble_lr500Kbit , NULL ,
10961077 "Long range 500 kbit/s TX, 125 kbit/s and 500 kbit/s RX" ,
10971078 cmd_ble_lr500kbit ),
1098- #endif /* CONFIG_HAS_HW_NRF_RADIO_BLE_CODED */
10991079
1100- #if CONFIG_HAS_HW_NRF_RADIO_IEEE802154
11011080 SHELL_CMD (ieee802154_250Kbit , NULL , "IEEE 802.15.4-2006 250 kbit/s" ,
11021081 cmd_ble_ieee ),
1103- #endif /* CONFIG_HAS_HW_NRF_RADIO_IEEE802154 */
11041082
11051083 SHELL_SUBCMD_SET_END
11061084);
0 commit comments