Lines Matching full:sh

29 static void print_dev_desc(const struct shell *sh,  in print_dev_desc()  argument
32 shell_print(sh, "bLength\t\t\t%u", desc->bLength); in print_dev_desc()
33 shell_print(sh, "bDescriptorType\t\t%u", desc->bDescriptorType); in print_dev_desc()
34 shell_print(sh, "bcdUSB\t\t\t%x", desc->bcdUSB); in print_dev_desc()
35 shell_print(sh, "bDeviceClass\t\t%u", desc->bDeviceClass); in print_dev_desc()
36 shell_print(sh, "bDeviceSubClass\t\t%u", desc->bDeviceSubClass); in print_dev_desc()
37 shell_print(sh, "bDeviceProtocol\t\t%u", desc->bDeviceProtocol); in print_dev_desc()
38 shell_print(sh, "bMaxPacketSize0\t\t%u", desc->bMaxPacketSize0); in print_dev_desc()
39 shell_print(sh, "idVendor\t\t%x", desc->idVendor); in print_dev_desc()
40 shell_print(sh, "idProduct\t\t%x", desc->idProduct); in print_dev_desc()
41 shell_print(sh, "bcdDevice\t\t%x", desc->bcdDevice); in print_dev_desc()
42 shell_print(sh, "iManufacturer\t\t%u", desc->iManufacturer); in print_dev_desc()
43 shell_print(sh, "iProduct\t\t%u", desc->iProduct); in print_dev_desc()
44 shell_print(sh, "iSerial\t\t\t%u", desc->iSerialNumber); in print_dev_desc()
45 shell_print(sh, "bNumConfigurations\t%u", desc->bNumConfigurations); in print_dev_desc()
48 static void print_cfg_desc(const struct shell *sh, in print_cfg_desc() argument
51 shell_print(sh, "bLength\t\t\t%u", desc->bLength); in print_cfg_desc()
52 shell_print(sh, "bDescriptorType\t\t%u", desc->bDescriptorType); in print_cfg_desc()
53 shell_print(sh, "wTotalLength\t\t%x", desc->wTotalLength); in print_cfg_desc()
54 shell_print(sh, "bNumInterfaces\t\t%u", desc->bNumInterfaces); in print_cfg_desc()
55 shell_print(sh, "bConfigurationValue\t%u", desc->bConfigurationValue); in print_cfg_desc()
56 shell_print(sh, "iConfiguration\t\t%u", desc->iConfiguration); in print_cfg_desc()
57 shell_print(sh, "bmAttributes\t\t%02x", desc->bmAttributes); in print_cfg_desc()
58 shell_print(sh, "bMaxPower\t\t%u mA", desc->bMaxPower * 2); in print_cfg_desc()
61 static int cmd_bulk(const struct shell *sh, size_t argc, char **argv) in cmd_bulk() argument
89 static int cmd_vendor_in(const struct shell *sh, in cmd_vendor_in() argument
103 shell_print(sh, "host: Failed to allocate buffer"); in cmd_vendor_in()
117 static int cmd_vendor_out(const struct shell *sh, in cmd_vendor_out() argument
131 shell_print(sh, "host: Failed to allocate buffer"); in cmd_vendor_out()
142 static int cmd_desc_device(const struct shell *sh, in cmd_desc_device() argument
150 shell_print(sh, "host: Failed to request device descriptor"); in cmd_desc_device()
152 print_dev_desc(sh, &desc); in cmd_desc_device()
158 static int cmd_desc_config(const struct shell *sh, in cmd_desc_config() argument
169 shell_print(sh, "host: Failed to request configuration descriptor"); in cmd_desc_config()
171 print_cfg_desc(sh, &desc); in cmd_desc_config()
177 static int cmd_desc_string(const struct shell *sh, in cmd_desc_string() argument
196 shell_print(sh, "host: Failed to request configuration descriptor"); in cmd_desc_string()
206 static int cmd_feature_set_halt(const struct shell *sh, in cmd_feature_set_halt() argument
217 shell_error(sh, "host: Failed to set halt feature"); in cmd_feature_set_halt()
219 shell_print(sh, "host: Device 0x%02x, ep 0x%02x halt feature set", in cmd_feature_set_halt()
226 static int cmd_feature_clear_rwup(const struct shell *sh, in cmd_feature_clear_rwup() argument
233 shell_error(sh, "host: Failed to clear rwup feature"); in cmd_feature_clear_rwup()
235 shell_print(sh, "host: Device 0x%02x, rwup feature cleared", udev->addr); in cmd_feature_clear_rwup()
241 static int cmd_feature_set_rwup(const struct shell *sh, in cmd_feature_set_rwup() argument
248 shell_error(sh, "host: Failed to set rwup feature"); in cmd_feature_set_rwup()
250 shell_print(sh, "host: Device 0x%02x, rwup feature set", udev->addr); in cmd_feature_set_rwup()
256 static int cmd_feature_set_ppwr(const struct shell *sh, in cmd_feature_set_ppwr() argument
266 shell_error(sh, "host: Failed to set ppwr feature"); in cmd_feature_set_ppwr()
268 shell_print(sh, "host: Device 0x%02x, port %d, ppwr feature set", in cmd_feature_set_ppwr()
275 static int cmd_feature_set_prst(const struct shell *sh, in cmd_feature_set_prst() argument
285 shell_error(sh, "host: Failed to set prst feature"); in cmd_feature_set_prst()
287 shell_print(sh, "host: Device 0x%02x, port %d, prst feature set", in cmd_feature_set_prst()
294 static int cmd_config_set(const struct shell *sh, in cmd_config_set() argument
304 shell_error(sh, "host: Failed to set configuration"); in cmd_config_set()
306 shell_print(sh, "host: Device 0x%02x, new configuration %u", in cmd_config_set()
313 static int cmd_config_get(const struct shell *sh, in cmd_config_get() argument
321 shell_error(sh, "host: Failed to set configuration"); in cmd_config_get()
323 shell_print(sh, "host: Device 0x%02x, current configuration %u", in cmd_config_get()
330 static int cmd_device_interface(const struct shell *sh, in cmd_device_interface() argument
342 shell_error(sh, "host: Failed to set interface alternate"); in cmd_device_interface()
344 shell_print(sh, "host: Device 0x%02x, new %u alternate %u", in cmd_device_interface()
351 static int cmd_device_address(const struct shell *sh, in cmd_device_address() argument
361 shell_error(sh, "host: Failed to set address"); in cmd_device_address()
363 shell_print(sh, "host: New device address is 0x%02x", addr); in cmd_device_address()
369 static int cmd_bus_suspend(const struct shell *sh, in cmd_bus_suspend() argument
376 shell_error(sh, "host: Failed to perform bus suspend %d", err); in cmd_bus_suspend()
378 shell_print(sh, "host: USB bus suspended"); in cmd_bus_suspend()
384 static int cmd_bus_resume(const struct shell *sh, in cmd_bus_resume() argument
391 shell_error(sh, "host: Failed to perform bus resume %d", err); in cmd_bus_resume()
393 shell_print(sh, "host: USB bus resumed"); in cmd_bus_resume()
398 shell_error(sh, "host: Failed to start SoF generator %d", err); in cmd_bus_resume()
404 static int cmd_bus_reset(const struct shell *sh, in cmd_bus_reset() argument
411 shell_error(sh, "host: Failed to perform bus reset %d", err); in cmd_bus_reset()
413 shell_print(sh, "host: USB bus reset"); in cmd_bus_reset()
418 shell_error(sh, "host: Failed to start SoF generator %d", err); in cmd_bus_reset()
424 static int cmd_usbh_init(const struct shell *sh, in cmd_usbh_init() argument
429 ctx_shell = sh; in cmd_usbh_init()
434 shell_error(sh, "host: USB host already initialized"); in cmd_usbh_init()
436 shell_error(sh, "host: Failed to initialize %d", err); in cmd_usbh_init()
438 shell_print(sh, "host: USB host initialized"); in cmd_usbh_init()
444 static int cmd_usbh_enable(const struct shell *sh, in cmd_usbh_enable() argument
451 shell_error(sh, "host: Failed to enable USB host support"); in cmd_usbh_enable()
453 shell_print(sh, "host: USB host enabled"); in cmd_usbh_enable()
459 static int cmd_usbh_disable(const struct shell *sh, in cmd_usbh_disable() argument
466 shell_error(sh, "host: Failed to disable USB host support"); in cmd_usbh_disable()
468 shell_print(sh, "host: USB host disabled"); in cmd_usbh_disable()