1 #include <stdio.h> 2 #include <platform_usb.h> 3 #include <hal_log.h> 4 #include <hal_cmd.h> 5 #include <usb/hal_hci.h> 6 7 cmd_test_hci(int argc,const char ** argv)8static int cmd_test_hci(int argc, const char **argv) 9 { 10 hal_usb_core_init(); 11 12 for (int hci_num = 0; hci_num < USB_MAX_CONTROLLER_COUNT; hci_num++) 13 { 14 /*usb0 need hcd neet to choose */ 15 hal_usb_hcd_init(hci_num); 16 } 17 18 return 0; 19 } 20 FINSH_FUNCTION_EXPORT_CMD(cmd_test_hci,hal_hci,hci hal APIs tests)21FINSH_FUNCTION_EXPORT_CMD(cmd_test_hci, hal_hci, hci hal APIs tests) 22 23 static int cmd_test_hci_rm(int argc, const char **argv) 24 { 25 for (int hci_num = 0; hci_num < USB_MAX_CONTROLLER_COUNT; hci_num++) 26 { 27 hal_usb_hcd_deinit(hci_num); 28 } 29 hal_usb_core_exit(); 30 31 return 0; 32 } 33 34 FINSH_FUNCTION_EXPORT_CMD(cmd_test_hci_rm, hal_hci_rm, hci hal APIs tests) 35