Changes in / [b53ca1e:54d9058] in mainline
- Location:
- uspace
- Files:
-
- 6 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/adt/usbaddrkeep.c
rb53ca1e r54d9058 29 29 #include <stdio.h> 30 30 #include <stdlib.h> 31 #include <usb/ addrkeep.h>31 #include <usb/hcd.h> 32 32 #include <errno.h> 33 33 #include "../tester.h" -
uspace/app/virtusbkbd/kbdconfig.c
rb53ca1e r54d9058 61 61 .endpoint_count = 1, 62 62 .interface_class = USB_CLASS_HID, 63 .interface_subclass = USB_HID_SUBCLASS_BOOT,63 .interface_subclass = 0, 64 64 .interface_protocol = USB_HID_PROTOCOL_KEYBOARD, 65 65 .str_interface = 0 -
uspace/drv/usbhub/usbhub.c
rb53ca1e r54d9058 84 84 }*/ 85 85 86 result->address = addr; 86 result->usb_device = usb_new(usb_hcd_attached_device_info_t); 87 result->usb_device->address = addr; 87 88 88 89 // get hub descriptor … … 154 155 int opResult; 155 156 usb_target_t target; 156 target.address = hub_info-> address;157 target.address = hub_info->usb_device->address; 157 158 target.endpoint = 0; 158 159 … … 215 216 dprintf(USB_LOG_LEVEL_INFO, "hub dev added"); 216 217 dprintf(USB_LOG_LEVEL_DEBUG, "\taddress %d, has %d ports ", 217 hub_info-> address,218 hub_info->usb_device->address, 218 219 hub_info->port_count); 219 220 dprintf(USB_LOG_LEVEL_DEBUG, "\tused configuration %d",config_descriptor.configuration_number); … … 464 465 465 466 usb_target_t target; 466 target.address = hub_info-> address;467 target.address = hub_info->usb_device->address; 467 468 target.endpoint = 1;/// \TODO get from endpoint descriptor 468 469 dprintf(USB_LOG_LEVEL_INFO, "checking changes for hub at addr %d", … … 506 507 if (interrupt) { 507 508 usb_hub_process_interrupt( 508 hub_info, hc, port, hub_info-> address);509 hub_info, hc, port, hub_info->usb_device->address); 509 510 } 510 511 } -
uspace/drv/usbhub/usbhub.h
rb53ca1e r54d9058 36 36 #define DRV_USBHUB_USBHUB_H 37 37 38 #include <ipc/devman.h> 39 #include <usb/usb.h> 40 #include <driver.h> 38 #define NAME "usbhub" 41 39 42 # define NAME "usbhub"40 #include "usb/hcdhubd.h" 43 41 44 42 /** basic information about device attached to hub */ … … 54 52 /** attached device handles */ 55 53 usb_hub_attached_device_t * attached_devs; 56 /** USB address of the hub. */57 usb_ address_t address;54 /** General usb device info. */ 55 usb_hcd_attached_device_info_t * usb_device; 58 56 /** General device info*/ 59 57 device_t * device; 58 60 59 } usb_hub_info_t; 61 60 -
uspace/drv/vhc/conn.h
rb53ca1e r54d9058 37 37 38 38 #include <usb/usb.h> 39 #include <usb/hcdhubd.h> 39 40 #include <usbhc_iface.h> 40 41 #include "vhcd.h" … … 43 44 void connection_handler_host(sysarg_t); 44 45 46 usb_hcd_transfer_ops_t vhc_transfer_ops; 45 47 usbhc_iface_t vhc_iface; 46 48 -
uspace/drv/vhc/connhost.c
rb53ca1e r54d9058 36 36 #include <errno.h> 37 37 #include <usb/usb.h> 38 #include <usb/ addrkeep.h>38 #include <usb/hcd.h> 39 39 40 40 #include "vhcd.h" -
uspace/lib/usb/Makefile
rb53ca1e r54d9058 39 39 src/drvpsync.c \ 40 40 src/dump.c \ 41 src/hcdhubd.c \ 42 src/hcdrv.c \ 41 43 src/hidparser.c \ 44 src/localdrv.c \ 42 45 src/pipes.c \ 43 46 src/pipesinit.c \ 44 47 src/pipesio.c \ 45 48 src/recognise.c \ 49 src/remotedrv.c \ 46 50 src/request.c \ 47 51 src/usb.c \ -
uspace/lib/usb/include/usb/addrkeep.h
-
Property mode
changed from
100644
to120000
rb53ca1e r54d9058 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 */ 1 hcd.h -
Property mode
changed from
-
uspace/lib/usb/include/usb/classes/hub.h
rb53ca1e r54d9058 37 37 38 38 #include <sys/types.h> 39 #include <usb/hcdhubd.h> 40 39 41 40 42 /** Hub class feature selector. … … 78 80 /** 79 81 D1...D0: Logical Power Switching Mode 80 00: Ganged power switching (all ports power at82 00: Ganged power switching (all ports’ power at 81 83 once) 82 84 01: Individual port power switching … … 89 91 00: Global Over-current Protection. The hub 90 92 reports over-current as a summation of all 91 ports current draw, without a breakdown of93 ports’ current draw, without a breakdown of 92 94 individual port over-current status. 93 95 01: Individual Port Over-current Protection. The -
uspace/lib/usb/src/addrkeep.c
rb53ca1e r54d9058 33 33 * @brief Address keeping. 34 34 */ 35 #include <usb/ addrkeep.h>35 #include <usb/hcd.h> 36 36 #include <errno.h> 37 37 #include <assert.h> -
uspace/lib/usb/src/dump.c
rb53ca1e r54d9058 147 147 PRINTLINE("bDeviceProtocol = 0x%02x", d->device_protocol); 148 148 PRINTLINE("bMaxPacketSize0 = %d", d->max_packet_size); 149 PRINTLINE("idVendor = 0x%04x", d->vendor_id);150 PRINTLINE("idProduct = 0x%04x", d->product_id);149 PRINTLINE("idVendor = %d", d->vendor_id); 150 PRINTLINE("idProduct = %d", 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.