Changeset 243cb86 in mainline for uspace/lib/usb/include
- Timestamp:
- 2010-12-12T10:50:19Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 8365533
- Parents:
- 101ef25c (diff), ebb98c5 (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:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usb/include/usb/classes/hid.h
r101ef25c r243cb86 38 38 #include <usb/usb.h> 39 39 #include <driver.h> 40 #include <usb/classes/hidparser.h> 40 41 41 42 /** USB/HID device requests. */ … … 66 67 usb_address_t address; 67 68 usb_endpoint_t default_ep; 69 usb_hid_report_parser_t *parser; 68 70 } usb_hid_dev_kbd_t; 69 71 -
uspace/lib/usb/include/usb/devreq.h
r101ef25c r243cb86 38 38 #include <ipc/ipc.h> 39 39 #include <async.h> 40 #include <usb/usb.h> 41 #include <usb/descriptor.h> 40 42 41 43 /** Standard device request. */ … … 83 85 } __attribute__ ((packed)) usb_device_request_setup_packet_t; 84 86 87 int usb_drv_req_set_address(int, usb_address_t, usb_address_t); 88 int usb_drv_req_get_device_descriptor(int, usb_address_t, 89 usb_standard_device_descriptor_t *); 90 int usb_drv_req_get_bare_configuration_descriptor(int, usb_address_t, int, 91 usb_standard_configuration_descriptor_t *); 92 int usb_drv_req_get_full_configuration_descriptor(int, usb_address_t, int, 93 void *, size_t, size_t *); 94 95 85 96 #endif 86 97 /** -
uspace/lib/usb/include/usb/hcdhubd.h
r101ef25c r243cb86 116 116 } usb_hcd_transfer_ops_t; 117 117 118 /** 119 * @brief structure holding information about free and used addresses 120 * 121 * This structure should not be used outside usb hcd driver. 122 * You better consider it to be 'private'. 123 */ 124 typedef struct { 125 /** lower bound included in the interval */ 126 usb_address_t lower_bound; 127 128 /** upper bound, excluded from the interval */ 129 usb_address_t upper_bound; 130 131 /** */ 132 link_t link; 133 }usb_address_list_t; 134 118 135 struct usb_hc_device { 119 136 /** Transfer operations. */ … … 131 148 /** List of hubs operating from this HC. */ 132 149 link_t hubs; 150 151 /** Structure with free and used addresses */ 152 link_t addresses; 133 153 134 154 /** Link to other driven HCs. */ … … 146 166 147 167 int usb_hcd_main(usb_hc_driver_t *); 148 int usb_hcd_add_root_hub(usb_hc_device_t *dev); 168 int usb_hcd_add_root_hub(device_t *dev); 169 170 /** 171 * find first not yet used address on this host controller and use it 172 * @param this_hcd 173 * @return number in the range of allowed usb addresses or 174 * a negative number if not succesful 175 */ 176 usb_address_t usb_use_free_address(usb_hc_device_t * this_hcd); 177 178 /** 179 * @brief free the address in the address space of this hcd. 180 * 181 * if address is not used, nothing happens 182 * @param this_hcd 183 * @param addr 184 */ 185 void usb_free_used_address(usb_hc_device_t * this_hcd, usb_address_t addr ); 149 186 150 187 … … 154 191 */ 155 192 193 device_t *usb_hc_connect(device_t *); 156 194 157 195 int usb_hc_async_interrupt_out(usb_hc_device_t *, usb_target_t, -
uspace/lib/usb/include/usb/usb.h
r101ef25c r243cb86 69 69 typedef int usb_address_t; 70 70 71 /** Default USB address. */ 72 #define USB_ADDRESS_DEFAULT 0 73 /** Maximum address number in USB 1.1. */ 74 #define USB11_ADDRESS_MAX 128 75 71 76 /** USB endpoint number type. 72 77 * Negative values could be used to indicate error. -
uspace/lib/usb/include/usb/usbdrv.h
r101ef25c r243cb86 36 36 #define LIBUSB_USBDRV_H_ 37 37 38 #include "usb.h"38 #include <usb/usb.h> 39 39 #include <driver.h> 40 #include <usb/devreq.h> 41 #include <usb/descriptor.h> 40 42 41 43 int usb_drv_hc_connect(device_t *, unsigned int); 44 45 int usb_drv_reserve_default_address(int); 46 int usb_drv_release_default_address(int); 47 usb_address_t usb_drv_request_address(int); 48 int usb_drv_bind_address(int, usb_address_t, devman_handle_t); 49 int usb_drv_release_address(int, usb_address_t); 42 50 43 51 usb_address_t usb_drv_get_my_address(int, device_t *); … … 48 56 void *, size_t, size_t *, usb_handle_t *); 49 57 58 int usb_drv_psync_interrupt_out(int, usb_target_t, void *, size_t); 59 int usb_drv_psync_interrupt_in(int, usb_target_t, void *, size_t, size_t *); 60 61 62 50 63 int usb_drv_async_control_write_setup(int, usb_target_t, 51 64 void *, size_t, usb_handle_t *); … … 54 67 int usb_drv_async_control_write_status(int, usb_target_t, 55 68 usb_handle_t *); 69 70 int usb_drv_psync_control_write_setup(int, usb_target_t, void *, size_t); 71 int usb_drv_psync_control_write_data(int, usb_target_t, void *, size_t); 72 int usb_drv_psync_control_write_status(int, usb_target_t); 73 74 int usb_drv_psync_control_write(int, usb_target_t, 75 void *, size_t, void *, size_t); 76 56 77 57 78 int usb_drv_async_control_read_setup(int, usb_target_t, … … 62 83 usb_handle_t *); 63 84 85 int usb_drv_psync_control_read_setup(int, usb_target_t, void *, size_t); 86 int usb_drv_psync_control_read_data(int, usb_target_t, void *, size_t, size_t *); 87 int usb_drv_psync_control_read_status(int, usb_target_t); 88 89 int usb_drv_psync_control_read(int, usb_target_t, 90 void *, size_t, void *, size_t, size_t *); 91 92 93 64 94 int usb_drv_async_wait_for(usb_handle_t); 95 65 96 66 97 #endif
Note:
See TracChangeset
for help on using the changeset viewer.