Changeset 2e85b3c in mainline for uspace/lib/usb/include
- Timestamp:
- 2011-02-16T18:22:43Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f4c87aa9
- Parents:
- 600733e (diff), ec59693 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - Location:
- uspace/lib/usb/include/usb
- Files:
-
- 2 added
- 2 deleted
- 5 edited
-
addrkeep.h (modified) (1 diff, 1 prop)
-
classes/hub.h (modified) (3 diffs)
-
hcd.h (deleted)
-
hcdhubd.h (deleted)
-
hub.h (added)
-
pipes.h (modified) (4 diffs)
-
recognise.h (modified) (1 diff)
-
usb.h (modified) (1 diff)
-
usbdevice.h (added)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/addrkeep.h
-
Property mode
changed from
120000to100644
r600733e r2e85b3c 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
r600733e r2e85b3c 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/include/usb/pipes.h
r600733e r2e85b3c 31 31 */ 32 32 /** @file 33 * Communication between device drivers and host controller driver.33 * USB pipes representation. 34 34 */ 35 35 #ifndef LIBUSB_PIPES_H_ … … 38 38 #include <sys/types.h> 39 39 #include <usb/usb.h> 40 #include <usb/usbdevice.h> 40 41 #include <usb/descriptor.h> 41 42 #include <ipc/devman.h> … … 114 115 } usb_endpoint_mapping_t; 115 116 117 int usb_device_connection_initialize_on_default_address( 118 usb_device_connection_t *, usb_hc_connection_t *); 116 119 int usb_device_connection_initialize_from_device(usb_device_connection_t *, 117 120 device_t *); … … 139 142 void *, size_t); 140 143 141 142 143 int usb_endpoint_pipe_async_read(usb_endpoint_pipe_t *, void *, size_t,144 size_t *, usb_handle_t *);145 int usb_endpoint_pipe_async_write(usb_endpoint_pipe_t *, void *, size_t,146 usb_handle_t *);147 148 int usb_endpoint_pipe_async_control_read(usb_endpoint_pipe_t *, void *, size_t,149 void *, size_t, size_t *, usb_handle_t *);150 int usb_endpoint_pipe_async_control_write(usb_endpoint_pipe_t *, void *, size_t,151 void *, size_t, usb_handle_t *);152 153 int usb_endpoint_pipe_wait_for(usb_endpoint_pipe_t *, usb_handle_t);154 155 144 #endif 156 145 /** -
uspace/lib/usb/include/usb/recognise.h
r600733e r2e85b3c 39 39 #include <usb/usb.h> 40 40 #include <usb/pipes.h> 41 #include <ipc/devman.h> 41 42 42 43 int usb_device_create_match_ids(usb_endpoint_pipe_t *, match_id_list_t *); -
uspace/lib/usb/include/usb/usb.h
r600733e r2e85b3c 83 83 } usb_request_recipient_t; 84 84 85 /** USB transaction outcome. */86 typedef enum {87 USB_OUTCOME_OK,88 USB_OUTCOME_CRCERROR,89 USB_OUTCOME_BABBLE90 } usb_transaction_outcome_t;91 92 const char * usb_str_transaction_outcome(usb_transaction_outcome_t o);93 94 85 /** USB address type. 95 86 * Negative values could be used to indicate error.
Note:
See TracChangeset
for help on using the changeset viewer.
