Changes in / [9c0f158:96bfe76] in mainline
- Files:
-
- 17 added
- 15 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/arch/amd64/Makefile.inc
r9c0f158 r96bfe76 49 49 usbflbk \ 50 50 usbhub \ 51 usb kbd \51 usbhid \ 52 52 usbmid \ 53 53 usbmouse \ -
uspace/Makefile
r9c0f158 r96bfe76 122 122 drv/uhci-rhd \ 123 123 drv/usbflbk \ 124 drv/usb kbd \124 drv/usbhid \ 125 125 drv/usbhub \ 126 126 drv/usbmid \ … … 142 142 drv/uhci-rhd \ 143 143 drv/usbflbk \ 144 drv/usb kbd \144 drv/usbhid \ 145 145 drv/usbhub \ 146 146 drv/usbmid \ -
uspace/app/usbinfo/info.c
r9c0f158 r96bfe76 294 294 } 295 295 296 297 void dump_status(usbinfo_device_t *dev)298 {299 int rc;300 uint16_t device_status = 0;301 uint16_t ctrl_pipe_status = 0;302 303 /* Device status first. */304 rc = usb_request_get_status(&dev->ctrl_pipe,305 USB_REQUEST_RECIPIENT_DEVICE, 0,306 &device_status);307 if (rc != EOK) {308 printf("%sFailed to get device status: %s.\n",309 get_indent(0), str_error(rc));310 goto try_ctrl_pipe_status;311 }312 313 printf("%sDevice status 0x%04x: power=%s, remote-wakeup=%s.\n",314 get_indent(0),315 device_status,316 device_status & USB_DEVICE_STATUS_SELF_POWERED ? "self" : "bus",317 device_status & USB_DEVICE_STATUS_REMOTE_WAKEUP ? "yes" : "no");318 319 /* Interface is not interesting, skipping ;-). */320 321 /* Control endpoint zero. */322 try_ctrl_pipe_status:323 rc = usb_request_get_status(&dev->ctrl_pipe,324 USB_REQUEST_RECIPIENT_ENDPOINT, 0,325 &ctrl_pipe_status);326 if (rc != EOK) {327 printf("%sFailed to get control endpoint status: %s.\n",328 get_indent(0), str_error(rc));329 goto leave;330 }331 332 printf("%sControl endpoint zero status %04X: halted=%s.\n",333 get_indent(0),334 ctrl_pipe_status,335 ctrl_pipe_status & USB_ENDPOINT_STATUS_HALTED ? "yes" : "no");336 337 leave:338 return;339 }340 341 296 /** @} 342 297 */ -
uspace/app/usbinfo/main.c
r9c0f158 r96bfe76 136 136 _OPTION("-T --descriptor-tree-full", "Print detailed descriptor tree"); 137 137 _OPTION("-s --strings", "Try to print all string descriptors."); 138 _OPTION("-S --status", "Get status of the device.");139 138 140 139 printf("\n"); … … 153 152 {"descriptor-tree-full", no_argument, NULL, 'T'}, 154 153 {"strings", no_argument, NULL, 's'}, 155 {"status", no_argument, NULL, 'S'},156 154 {0, 0, NULL, 0} 157 155 }; 158 static const char *short_options = "himtTs S";156 static const char *short_options = "himtTs"; 159 157 160 158 static usbinfo_action_t actions[] = { … … 182 180 .opt = 's', 183 181 .action = dump_strings, 184 .active = false185 },186 {187 .opt = 'S',188 .action = dump_status,189 182 .active = false 190 183 }, -
uspace/app/usbinfo/usbinfo.h
r9c0f158 r96bfe76 84 84 void dump_descriptor_tree_full(usbinfo_device_t *); 85 85 void dump_strings(usbinfo_device_t *); 86 void dump_status(usbinfo_device_t *);87 86 88 87 -
uspace/drv/ohci/batch.c
r9c0f158 r96bfe76 118 118 instance->next_step = batch_call_in_and_dispose; 119 119 /* TODO: implement */ 120 usb_log_debug("Batch(%p) CONTROL READinitialized.\n", instance);120 usb_log_debug("Batch(%p) CONTROL WRITE initialized.\n", instance); 121 121 } 122 122 /*----------------------------------------------------------------------------*/ -
uspace/lib/usb/Makefile
r9c0f158 r96bfe76 50 50 src/usb.c \ 51 51 src/usbdevice.c \ 52 src/hidreq.c \53 src/hidreport.c \54 52 src/host/device_keeper.c \ 55 53 src/host/batch.c -
uspace/lib/usb/include/usb/request.h
r9c0f158 r96bfe76 41 41 #include <usb/pipes.h> 42 42 #include <usb/descriptor.h> 43 44 /** USB device status - device is self powered (opposed to bus powered). */45 #define USB_DEVICE_STATUS_SELF_POWERED ((uint16_t)(1 << 0))46 47 /** USB device status - remote wake-up signaling is enabled. */48 #define USB_DEVICE_STATUS_REMOTE_WAKEUP ((uint16_t)(1 << 1))49 50 /** USB endpoint status - endpoint is halted (stalled). */51 #define USB_ENDPOINT_STATUS_HALTED ((uint16_t)(1 << 0))52 43 53 44 /** Standard device request. */
Note:
See TracChangeset
for help on using the changeset viewer.