Changeset 49f2f29 in mainline
- Timestamp:
- 2013-02-08T20:47:19Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 86a01cc
- Parents:
- c5f4e6a
- Location:
- uspace
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/uhci/uhci_rh.c
rc5f4e6a r49f2f29 30 30 #include <macros.h> 31 31 #include <usb/debug.h> 32 #include <usb/classes/hub.h> 32 33 #include <ddi.h> 33 34 … … 36 37 enum { 37 38 UHCI_RH_PORT_COUNT = 2, 38 /* 1 byte for hub status bit and 2 port status bits */ 39 UHCI_PORT_BYTES = (1 + UHCI_RH_PORT_COUNT + 7) / 8, 39 UHCI_PORT_BYTES = STATUS_BYTES(UHCI_RH_PORT_COUNT), 40 40 }; 41 41 … … 78 78 instance->reset_changed[1] = false; 79 79 return virthub_base_init(&instance->base, name, &ops, instance, 80 NULL, &hub_descriptor.header, HUB_STATUS_CHANGE_PIPE , 2);80 NULL, &hub_descriptor.header, HUB_STATUS_CHANGE_PIPE); 81 81 } 82 82 -
uspace/lib/usbvirt/include/usbvirt/virthub_base.h
rc5f4e6a r49f2f29 59 59 const char *name, usbvirt_device_ops_t *ops, void *data, 60 60 const usb_standard_device_descriptor_t *device_desc, 61 const usb_hub_descriptor_header_t *hub_desc, 62 usb_endpoint_t ep, unsigned port_count); 61 const usb_hub_descriptor_header_t *hub_desc, usb_endpoint_t ep); 63 62 64 63 usb_address_t virthub_base_get_address(virthub_base_t *instance); -
uspace/lib/usbvirt/src/virthub_base.c
rc5f4e6a r49f2f29 37 37 #include <macros.h> 38 38 #include <str.h> 39 #include <usb/classes/hub.h> 39 40 40 41 #include "virthub_base.h" … … 56 57 usbvirt_device_ops_t *ops, void *data, 57 58 const usb_standard_device_descriptor_t *device_desc, 58 const usb_hub_descriptor_header_t *hub_desc, 59 usb_endpoint_t ep, unsigned port_count) 59 const usb_hub_descriptor_header_t *hub_desc, usb_endpoint_t ep) 60 60 { 61 61 assert(instance); 62 62 assert(hub_desc); 63 63 assert(name); 64 64 65 65 if (!usb_endpoint_is_valid(ep) || (ep == USB_ENDPOINT_DEFAULT_CONTROL)) 66 66 return EINVAL; … … 73 73 instance->endpoint_descriptor.endpoint_address = 128 | ep; 74 74 instance->endpoint_descriptor.max_packet_size = 75 (1 + port_count + 7) / 8;75 STATUS_BYTES(hub_desc->port_count); 76 76 77 77 instance->descriptors.device =
Note:
See TracChangeset
for help on using the changeset viewer.