Changes in / [54d9058:b53ca1e] in mainline
- Location:
- uspace
- Files:
-
- 6 deleted
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/adt/usbaddrkeep.c
r54d9058 rb53ca1e 29 29 #include <stdio.h> 30 30 #include <stdlib.h> 31 #include <usb/ hcd.h>31 #include <usb/addrkeep.h> 32 32 #include <errno.h> 33 33 #include "../tester.h" -
uspace/app/virtusbkbd/kbdconfig.c
r54d9058 rb53ca1e 61 61 .endpoint_count = 1, 62 62 .interface_class = USB_CLASS_HID, 63 .interface_subclass = 0,63 .interface_subclass = USB_HID_SUBCLASS_BOOT, 64 64 .interface_protocol = USB_HID_PROTOCOL_KEYBOARD, 65 65 .str_interface = 0 -
uspace/drv/usbhub/usbhub.c
r54d9058 rb53ca1e 84 84 }*/ 85 85 86 result->usb_device = usb_new(usb_hcd_attached_device_info_t); 87 result->usb_device->address = addr; 86 result->address = addr; 88 87 89 88 // get hub descriptor … … 155 154 int opResult; 156 155 usb_target_t target; 157 target.address = hub_info-> usb_device->address;156 target.address = hub_info->address; 158 157 target.endpoint = 0; 159 158 … … 216 215 dprintf(USB_LOG_LEVEL_INFO, "hub dev added"); 217 216 dprintf(USB_LOG_LEVEL_DEBUG, "\taddress %d, has %d ports ", 218 hub_info-> usb_device->address,217 hub_info->address, 219 218 hub_info->port_count); 220 219 dprintf(USB_LOG_LEVEL_DEBUG, "\tused configuration %d",config_descriptor.configuration_number); … … 465 464 466 465 usb_target_t target; 467 target.address = hub_info-> usb_device->address;466 target.address = hub_info->address; 468 467 target.endpoint = 1;/// \TODO get from endpoint descriptor 469 468 dprintf(USB_LOG_LEVEL_INFO, "checking changes for hub at addr %d", … … 507 506 if (interrupt) { 508 507 usb_hub_process_interrupt( 509 hub_info, hc, port, hub_info-> usb_device->address);508 hub_info, hc, port, hub_info->address); 510 509 } 511 510 } -
uspace/drv/usbhub/usbhub.h
r54d9058 rb53ca1e 36 36 #define DRV_USBHUB_USBHUB_H 37 37 38 #include <ipc/devman.h> 39 #include <usb/usb.h> 40 #include <driver.h> 41 38 42 #define NAME "usbhub" 39 40 #include "usb/hcdhubd.h"41 43 42 44 /** basic information about device attached to hub */ … … 52 54 /** attached device handles */ 53 55 usb_hub_attached_device_t * attached_devs; 54 /** General usb device info. */55 usb_ hcd_attached_device_info_t * usb_device;56 /** USB address of the hub. */ 57 usb_address_t address; 56 58 /** General device info*/ 57 59 device_t * device; 58 59 60 } usb_hub_info_t; 60 61 -
uspace/drv/vhc/conn.h
r54d9058 rb53ca1e 37 37 38 38 #include <usb/usb.h> 39 #include <usb/hcdhubd.h>40 39 #include <usbhc_iface.h> 41 40 #include "vhcd.h" … … 44 43 void connection_handler_host(sysarg_t); 45 44 46 usb_hcd_transfer_ops_t vhc_transfer_ops;47 45 usbhc_iface_t vhc_iface; 48 46 -
uspace/drv/vhc/connhost.c
r54d9058 rb53ca1e 36 36 #include <errno.h> 37 37 #include <usb/usb.h> 38 #include <usb/ hcd.h>38 #include <usb/addrkeep.h> 39 39 40 40 #include "vhcd.h" -
uspace/lib/usb/Makefile
r54d9058 rb53ca1e 39 39 src/drvpsync.c \ 40 40 src/dump.c \ 41 src/hcdhubd.c \42 src/hcdrv.c \43 41 src/hidparser.c \ 44 src/localdrv.c \45 42 src/pipes.c \ 46 43 src/pipesinit.c \ 47 44 src/pipesio.c \ 48 45 src/recognise.c \ 49 src/remotedrv.c \50 46 src/request.c \ 51 47 src/usb.c \ -
uspace/lib/usb/include/usb/addrkeep.h
-
Property mode
changed from
120000
to100644
r54d9058 rb53ca1e 1 hcd.h 1 /* 2 * Copyright (c) 2010 Vojtech Horky 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 9 * - Redistributions of source code must retain the above copyright 10 * notice, this list of conditions and the following disclaimer. 11 * - Redistributions in binary form must reproduce the above copyright 12 * notice, this list of conditions and the following disclaimer in the 13 * documentation and/or other materials provided with the distribution. 14 * - The name of the author may not be used to endorse or promote products 15 * derived from this software without specific prior written permission. 16 * 17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 27 */ 28 29 /** @addtogroup libusb 30 * @{ 31 */ 32 /** @file 33 * USB address keeping for host controller drivers. 34 */ 35 #ifndef LIBUSB_ADDRKEEP_H_ 36 #define LIBUSB_ADDRKEEP_H_ 37 38 #include <usb/usb.h> 39 #include <fibril_synch.h> 40 #include <devman.h> 41 42 /** Info about used address. */ 43 typedef struct { 44 /** Linked list member. */ 45 link_t link; 46 /** Address. */ 47 usb_address_t address; 48 /** Corresponding devman handle. */ 49 devman_handle_t devman_handle; 50 } usb_address_keeping_used_t; 51 52 /** Structure for keeping track of free and used USB addresses. */ 53 typedef struct { 54 /** Head of list of used addresses. */ 55 link_t used_addresses; 56 /** Upper bound for USB addresses. */ 57 usb_address_t max_address; 58 /** Mutex protecting used address. */ 59 fibril_mutex_t used_addresses_guard; 60 /** Condition variable for used addresses. */ 61 fibril_condvar_t used_addresses_condvar; 62 63 /** Condition variable mutex for default address. */ 64 fibril_mutex_t default_condvar_guard; 65 /** Condition variable for default address. */ 66 fibril_condvar_t default_condvar; 67 /** Whether is default address available. */ 68 bool default_available; 69 } usb_address_keeping_t; 70 71 void usb_address_keeping_init(usb_address_keeping_t *, usb_address_t); 72 73 void usb_address_keeping_reserve_default(usb_address_keeping_t *); 74 void usb_address_keeping_release_default(usb_address_keeping_t *); 75 76 usb_address_t usb_address_keeping_request(usb_address_keeping_t *); 77 int usb_address_keeping_release(usb_address_keeping_t *, usb_address_t); 78 void usb_address_keeping_devman_bind(usb_address_keeping_t *, usb_address_t, 79 devman_handle_t); 80 usb_address_t usb_address_keeping_find(usb_address_keeping_t *, 81 devman_handle_t); 82 83 #endif 84 /** 85 * @} 86 */ -
Property mode
changed from
-
uspace/lib/usb/include/usb/classes/hub.h
r54d9058 rb53ca1e 37 37 38 38 #include <sys/types.h> 39 #include <usb/hcdhubd.h>40 41 39 42 40 /** Hub class feature selector. … … 80 78 /** 81 79 D1...D0: Logical Power Switching Mode 82 00: Ganged power switching (all ports ’power at80 00: Ganged power switching (all ports power at 83 81 once) 84 82 01: Individual port power switching … … 91 89 00: Global Over-current Protection. The hub 92 90 reports over-current as a summation of all 93 ports ’current draw, without a breakdown of91 ports current draw, without a breakdown of 94 92 individual port over-current status. 95 93 01: Individual Port Over-current Protection. The -
uspace/lib/usb/src/addrkeep.c
r54d9058 rb53ca1e 33 33 * @brief Address keeping. 34 34 */ 35 #include <usb/ hcd.h>35 #include <usb/addrkeep.h> 36 36 #include <errno.h> 37 37 #include <assert.h> -
uspace/lib/usb/src/dump.c
r54d9058 rb53ca1e 147 147 PRINTLINE("bDeviceProtocol = 0x%02x", d->device_protocol); 148 148 PRINTLINE("bMaxPacketSize0 = %d", d->max_packet_size); 149 PRINTLINE("idVendor = %d", d->vendor_id);150 PRINTLINE("idProduct = %d", d->product_id);149 PRINTLINE("idVendor = 0x%04x", d->vendor_id); 150 PRINTLINE("idProduct = 0x%04x", d->product_id); 151 151 PRINTLINE("bcdDevice = %d", d->device_version); 152 152 PRINTLINE("iManufacturer = %d", d->str_manufacturer);
Note:
See TracChangeset
for help on using the changeset viewer.