Changeset a372663 in mainline
- Timestamp:
- 2011-03-21T13:53:11Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3954a63b
- Parents:
- 8a951ca
- Location:
- uspace
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/usbinfo/usbinfo.h
r8a951ca ra372663 44 44 45 45 typedef struct { 46 usb_ endpoint_pipe_t ctrl_pipe;46 usb_pipe_t ctrl_pipe; 47 47 usb_device_connection_t wire; 48 48 usb_standard_device_descriptor_t device_descriptor; -
uspace/drv/usbhid/hiddev.h
r8a951ca ra372663 68 68 usb_device_connection_t wire; 69 69 /** USB pipe corresponding to the default Control endpoint. */ 70 usb_ endpoint_pipe_t ctrl_pipe;70 usb_pipe_t ctrl_pipe; 71 71 /** USB pipe corresponding to the Interrupt In (polling) pipe. */ 72 usb_ endpoint_pipe_t poll_pipe;72 usb_pipe_t poll_pipe; 73 73 74 74 /** Polling interval retreived from the Interface descriptor. */ -
uspace/drv/usbhub/usbhub.c
r8a951ca ra372663 354 354 } 355 355 //create connection to device 356 usb_ endpoint_pipe_t new_device_pipe;356 usb_pipe_t new_device_pipe; 357 357 usb_device_connection_t new_device_connection; 358 358 usb_device_connection_initialize_on_default_address( … … 488 488 usb_log_debug("interrupt at port %d\n", port); 489 489 //determine type of change 490 usb_ endpoint_pipe_t *pipe = hub->control_pipe;490 usb_pipe_t *pipe = hub->control_pipe; 491 491 492 492 int opResult; -
uspace/drv/usbhub/usbhub.h
r8a951ca ra372663 58 58 /* Hub endpoints. */ 59 59 /*typedef struct { 60 usb_ endpoint_pipe_t control;61 usb_ endpoint_pipe_t status_change;60 usb_pipe_t control; 61 usb_pipe_t status_change; 62 62 } usb_hub_endpoints_t; 63 63 */ … … 88 88 * searched again and again for the 'right pipe'. 89 89 */ 90 usb_ endpoint_pipe_t * status_change_pipe;90 usb_pipe_t * status_change_pipe; 91 91 92 92 /** convenience pointer to control pipe … … 96 96 * searched again and again for the 'right pipe'. 97 97 */ 98 usb_ endpoint_pipe_t * control_pipe;98 usb_pipe_t * control_pipe; 99 99 100 100 /** generic usb device data*/ -
uspace/drv/usbhub/usbhub_private.h
r8a951ca ra372663 95 95 * @return Operation result 96 96 */ 97 static inline int usb_hub_clear_port_feature(usb_ endpoint_pipe_t *pipe,97 static inline int usb_hub_clear_port_feature(usb_pipe_t *pipe, 98 98 int port_index, 99 99 usb_hub_class_feature_t feature) { -
uspace/drv/usbmid/usbmid.h
r8a951ca ra372663 52 52 usb_device_connection_t wire; 53 53 /** Default control pipe. */ 54 usb_ endpoint_pipe_t ctrl_pipe;54 usb_pipe_t ctrl_pipe; 55 55 } usbmid_device_t; 56 56 -
uspace/lib/usb/include/usb/devdrv.h
r8a951ca ra372663 41 41 typedef struct { 42 42 /** The default control pipe. */ 43 usb_ endpoint_pipe_t ctrl_pipe;43 usb_pipe_t ctrl_pipe; 44 44 /** Other endpoint pipes. 45 45 * This is an array of other endpoint pipes in the same order as -
uspace/lib/usb/include/usb/pipes.h
r8a951ca ra372663 80 80 */ 81 81 int hc_phone; 82 } usb_ endpoint_pipe_t;82 } usb_pipe_t; 83 83 84 84 … … 102 102 typedef struct { 103 103 /** Endpoint pipe. */ 104 usb_ endpoint_pipe_t *pipe;104 usb_pipe_t *pipe; 105 105 /** Endpoint description. */ 106 106 const usb_endpoint_description_t *description; … … 125 125 usb_address_t usb_device_get_assigned_address(devman_handle_t); 126 126 127 int usb_endpoint_pipe_initialize(usb_ endpoint_pipe_t *,127 int usb_endpoint_pipe_initialize(usb_pipe_t *, 128 128 usb_device_connection_t *, 129 129 usb_endpoint_t, usb_transfer_type_t, size_t, usb_direction_t); 130 int usb_endpoint_pipe_initialize_default_control(usb_ endpoint_pipe_t *,130 int usb_endpoint_pipe_initialize_default_control(usb_pipe_t *, 131 131 usb_device_connection_t *); 132 int usb_endpoint_pipe_probe_default_control(usb_ endpoint_pipe_t *);132 int usb_endpoint_pipe_probe_default_control(usb_pipe_t *); 133 133 int usb_endpoint_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 134 134 size_t, uint8_t *, size_t, usb_device_connection_t *); 135 int usb_endpoint_pipe_register(usb_ endpoint_pipe_t *, unsigned int,135 int usb_endpoint_pipe_register(usb_pipe_t *, unsigned int, 136 136 usb_hc_connection_t *); 137 int usb_endpoint_pipe_unregister(usb_ endpoint_pipe_t *, usb_hc_connection_t *);137 int usb_endpoint_pipe_unregister(usb_pipe_t *, usb_hc_connection_t *); 138 138 139 int usb_endpoint_pipe_start_session(usb_ endpoint_pipe_t *);140 int usb_endpoint_pipe_end_session(usb_ endpoint_pipe_t *);141 bool usb_endpoint_pipe_is_session_started(usb_ endpoint_pipe_t *);139 int usb_endpoint_pipe_start_session(usb_pipe_t *); 140 int usb_endpoint_pipe_end_session(usb_pipe_t *); 141 bool usb_endpoint_pipe_is_session_started(usb_pipe_t *); 142 142 143 int usb_endpoint_pipe_read(usb_ endpoint_pipe_t *, void *, size_t, size_t *);144 int usb_endpoint_pipe_write(usb_ endpoint_pipe_t *, void *, size_t);143 int usb_endpoint_pipe_read(usb_pipe_t *, void *, size_t, size_t *); 144 int usb_endpoint_pipe_write(usb_pipe_t *, void *, size_t); 145 145 146 int usb_endpoint_pipe_control_read(usb_ endpoint_pipe_t *, void *, size_t,146 int usb_endpoint_pipe_control_read(usb_pipe_t *, void *, size_t, 147 147 void *, size_t, size_t *); 148 int usb_endpoint_pipe_control_write(usb_ endpoint_pipe_t *, void *, size_t,148 int usb_endpoint_pipe_control_write(usb_pipe_t *, void *, size_t, 149 149 void *, size_t); 150 150 -
uspace/lib/usb/include/usb/recognise.h
r8a951ca ra372663 48 48 const usb_standard_interface_descriptor_t *, match_id_list_t *); 49 49 50 int usb_device_create_match_ids(usb_ endpoint_pipe_t *, match_id_list_t *);50 int usb_device_create_match_ids(usb_pipe_t *, match_id_list_t *); 51 51 52 52 int usb_device_register_child_in_devman(usb_address_t, devman_handle_t, -
uspace/lib/usb/include/usb/request.h
r8a951ca ra372663 86 86 } __attribute__ ((packed)) usb_device_request_setup_packet_t; 87 87 88 int usb_control_request_set(usb_ endpoint_pipe_t *,88 int usb_control_request_set(usb_pipe_t *, 89 89 usb_request_type_t, usb_request_recipient_t, uint8_t, 90 90 uint16_t, uint16_t, void *, size_t); 91 91 92 int usb_control_request_get(usb_ endpoint_pipe_t *,92 int usb_control_request_get(usb_pipe_t *, 93 93 usb_request_type_t, usb_request_recipient_t, uint8_t, 94 94 uint16_t, uint16_t, void *, size_t, size_t *); 95 95 96 int usb_request_get_status(usb_ endpoint_pipe_t *, usb_request_recipient_t,96 int usb_request_get_status(usb_pipe_t *, usb_request_recipient_t, 97 97 uint16_t, uint16_t *); 98 int usb_request_clear_feature(usb_ endpoint_pipe_t *, usb_request_type_t,98 int usb_request_clear_feature(usb_pipe_t *, usb_request_type_t, 99 99 usb_request_recipient_t, uint16_t, uint16_t); 100 int usb_request_set_feature(usb_ endpoint_pipe_t *, usb_request_type_t,100 int usb_request_set_feature(usb_pipe_t *, usb_request_type_t, 101 101 usb_request_recipient_t, uint16_t, uint16_t); 102 int usb_request_set_address(usb_ endpoint_pipe_t *, usb_address_t);103 int usb_request_get_descriptor(usb_ endpoint_pipe_t *, usb_request_type_t,102 int usb_request_set_address(usb_pipe_t *, usb_address_t); 103 int usb_request_get_descriptor(usb_pipe_t *, usb_request_type_t, 104 104 usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void *, size_t, 105 105 size_t *); 106 int usb_request_get_descriptor_alloc(usb_ endpoint_pipe_t *, usb_request_type_t,106 int usb_request_get_descriptor_alloc(usb_pipe_t *, usb_request_type_t, 107 107 usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void **, size_t *); 108 int usb_request_get_device_descriptor(usb_ endpoint_pipe_t *,108 int usb_request_get_device_descriptor(usb_pipe_t *, 109 109 usb_standard_device_descriptor_t *); 110 int usb_request_get_bare_configuration_descriptor(usb_ endpoint_pipe_t *, int,110 int usb_request_get_bare_configuration_descriptor(usb_pipe_t *, int, 111 111 usb_standard_configuration_descriptor_t *); 112 int usb_request_get_full_configuration_descriptor(usb_ endpoint_pipe_t *, int,112 int usb_request_get_full_configuration_descriptor(usb_pipe_t *, int, 113 113 void *, size_t, size_t *); 114 int usb_request_get_full_configuration_descriptor_alloc(usb_ endpoint_pipe_t *,114 int usb_request_get_full_configuration_descriptor_alloc(usb_pipe_t *, 115 115 int, void **, size_t *); 116 int usb_request_set_descriptor(usb_ endpoint_pipe_t *, usb_request_type_t,116 int usb_request_set_descriptor(usb_pipe_t *, usb_request_type_t, 117 117 usb_request_recipient_t, uint8_t, uint8_t, uint16_t, void *, size_t); 118 int usb_request_get_configuration(usb_ endpoint_pipe_t *, uint8_t *);119 int usb_request_set_configuration(usb_ endpoint_pipe_t *, uint8_t);120 int usb_request_get_interface(usb_ endpoint_pipe_t *, uint8_t, uint8_t *);121 int usb_request_set_interface(usb_ endpoint_pipe_t *, uint8_t, uint8_t);118 int usb_request_get_configuration(usb_pipe_t *, uint8_t *); 119 int usb_request_set_configuration(usb_pipe_t *, uint8_t); 120 int usb_request_get_interface(usb_pipe_t *, uint8_t, uint8_t *); 121 int usb_request_set_interface(usb_pipe_t *, uint8_t, uint8_t); 122 122 123 int usb_request_get_supported_languages(usb_ endpoint_pipe_t *,123 int usb_request_get_supported_languages(usb_pipe_t *, 124 124 l18_win_locales_t **, size_t *); 125 int usb_request_get_string(usb_ endpoint_pipe_t *, size_t, l18_win_locales_t,125 int usb_request_get_string(usb_pipe_t *, size_t, l18_win_locales_t, 126 126 char **); 127 127 -
uspace/lib/usb/src/devdrv.c
r8a951ca ra372663 126 126 127 127 for (i = 0; i < pipe_count; i++) { 128 dev->pipes[i].pipe = malloc(sizeof(usb_ endpoint_pipe_t));128 dev->pipes[i].pipe = malloc(sizeof(usb_pipe_t)); 129 129 if (dev->pipes[i].pipe == NULL) { 130 130 usb_log_oom(dev->ddf_dev); -
uspace/lib/usb/src/devpoll.c
r8a951ca ra372663 64 64 assert(polling_data); 65 65 66 usb_ endpoint_pipe_t *pipe66 usb_pipe_t *pipe 67 67 = polling_data->dev->pipes[polling_data->pipe_index].pipe; 68 68 -
uspace/lib/usb/src/hub.c
r8a951ca ra372663 228 228 } 229 229 230 usb_ endpoint_pipe_t ctrl_pipe;230 usb_pipe_t ctrl_pipe; 231 231 rc = usb_endpoint_pipe_initialize_default_control(&ctrl_pipe, 232 232 &dev_conn); -
uspace/lib/usb/src/pipes.c
r8a951ca ra372663 244 244 * @return Error code. 245 245 */ 246 int usb_endpoint_pipe_start_session(usb_ endpoint_pipe_t *pipe)246 int usb_endpoint_pipe_start_session(usb_pipe_t *pipe) 247 247 { 248 248 assert(pipe); … … 270 270 * @return Error code. 271 271 */ 272 int usb_endpoint_pipe_end_session(usb_ endpoint_pipe_t *pipe)272 int usb_endpoint_pipe_end_session(usb_pipe_t *pipe) 273 273 { 274 274 assert(pipe); … … 296 296 * @return Whether @p pipe has opened a session. 297 297 */ 298 bool usb_endpoint_pipe_is_session_started(usb_ endpoint_pipe_t *pipe)298 bool usb_endpoint_pipe_is_session_started(usb_pipe_t *pipe) 299 299 { 300 300 return (pipe->hc_phone >= 0); -
uspace/lib/usb/src/pipesinit.c
r8a951ca ra372663 342 342 * @return Error code. 343 343 */ 344 int usb_endpoint_pipe_initialize(usb_ endpoint_pipe_t *pipe,344 int usb_endpoint_pipe_initialize(usb_pipe_t *pipe, 345 345 usb_device_connection_t *connection, usb_endpoint_t endpoint_no, 346 346 usb_transfer_type_t transfer_type, size_t max_packet_size, … … 367 367 * @return Error code. 368 368 */ 369 int usb_endpoint_pipe_initialize_default_control(usb_ endpoint_pipe_t *pipe,369 int usb_endpoint_pipe_initialize_default_control(usb_pipe_t *pipe, 370 370 usb_device_connection_t *connection) 371 371 { … … 390 390 * @return Error code. 391 391 */ 392 int usb_endpoint_pipe_probe_default_control(usb_ endpoint_pipe_t *pipe)392 int usb_endpoint_pipe_probe_default_control(usb_pipe_t *pipe) 393 393 { 394 394 assert(pipe); … … 451 451 * @return Error code. 452 452 */ 453 int usb_endpoint_pipe_register(usb_ endpoint_pipe_t *pipe,453 int usb_endpoint_pipe_register(usb_pipe_t *pipe, 454 454 unsigned int interval, 455 455 usb_hc_connection_t *hc_connection) … … 479 479 * @return Error code. 480 480 */ 481 int usb_endpoint_pipe_unregister(usb_ endpoint_pipe_t *pipe,481 int usb_endpoint_pipe_unregister(usb_pipe_t *pipe, 482 482 usb_hc_connection_t *hc_connection) 483 483 { -
uspace/lib/usb/src/pipesio.c
r8a951ca ra372663 58 58 * @return Error code. 59 59 */ 60 static int usb_endpoint_pipe_read_no_checks(usb_ endpoint_pipe_t *pipe,60 static int usb_endpoint_pipe_read_no_checks(usb_pipe_t *pipe, 61 61 void *buffer, size_t size, size_t *size_transfered) 62 62 { … … 140 140 * @return Error code. 141 141 */ 142 int usb_endpoint_pipe_read(usb_ endpoint_pipe_t *pipe,142 int usb_endpoint_pipe_read(usb_pipe_t *pipe, 143 143 void *buffer, size_t size, size_t *size_transfered) 144 144 { … … 190 190 * @return Error code. 191 191 */ 192 static int usb_endpoint_pipe_write_no_check(usb_ endpoint_pipe_t *pipe,192 static int usb_endpoint_pipe_write_no_check(usb_pipe_t *pipe, 193 193 void *buffer, size_t size) 194 194 { … … 247 247 * @return Error code. 248 248 */ 249 int usb_endpoint_pipe_write(usb_ endpoint_pipe_t *pipe,249 int usb_endpoint_pipe_write(usb_pipe_t *pipe, 250 250 void *buffer, size_t size) 251 251 { … … 289 289 * @return Error code. 290 290 */ 291 static int usb_endpoint_pipe_control_read_no_check(usb_ endpoint_pipe_t *pipe,291 static int usb_endpoint_pipe_control_read_no_check(usb_pipe_t *pipe, 292 292 void *setup_buffer, size_t setup_buffer_size, 293 293 void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size) … … 365 365 * @return Error code. 366 366 */ 367 int usb_endpoint_pipe_control_read(usb_ endpoint_pipe_t *pipe,367 int usb_endpoint_pipe_control_read(usb_pipe_t *pipe, 368 368 void *setup_buffer, size_t setup_buffer_size, 369 369 void *data_buffer, size_t data_buffer_size, size_t *data_transfered_size) … … 414 414 * @return Error code. 415 415 */ 416 static int usb_endpoint_pipe_control_write_no_check(usb_ endpoint_pipe_t *pipe,416 static int usb_endpoint_pipe_control_write_no_check(usb_pipe_t *pipe, 417 417 void *setup_buffer, size_t setup_buffer_size, 418 418 void *data_buffer, size_t data_buffer_size) … … 473 473 * @return Error code. 474 474 */ 475 int usb_endpoint_pipe_control_write(usb_ endpoint_pipe_t *pipe,475 int usb_endpoint_pipe_control_write(usb_pipe_t *pipe, 476 476 void *setup_buffer, size_t setup_buffer_size, 477 477 void *data_buffer, size_t data_buffer_size) -
uspace/lib/usb/src/recognise.c
r8a951ca ra372663 311 311 * @return Error code. 312 312 */ 313 int usb_device_create_match_ids(usb_ endpoint_pipe_t *ctrl_pipe,313 int usb_device_create_match_ids(usb_pipe_t *ctrl_pipe, 314 314 match_id_list_t *matches) 315 315 { … … 363 363 int rc; 364 364 usb_device_connection_t dev_connection; 365 usb_ endpoint_pipe_t ctrl_pipe;365 usb_pipe_t ctrl_pipe; 366 366 367 367 rc = usb_device_connection_initialize(&dev_connection, hc_handle, address); -
uspace/lib/usb/src/request.c
r8a951ca ra372663 60 60 * @retval ERANGE Data buffer too large. 61 61 */ 62 int usb_control_request_set(usb_ endpoint_pipe_t *pipe,62 int usb_control_request_set(usb_pipe_t *pipe, 63 63 usb_request_type_t request_type, usb_request_recipient_t recipient, 64 64 uint8_t request, … … 120 120 * @retval ERANGE Data buffer too large. 121 121 */ 122 int usb_control_request_get(usb_ endpoint_pipe_t *pipe,122 int usb_control_request_get(usb_pipe_t *pipe, 123 123 usb_request_type_t request_type, usb_request_recipient_t recipient, 124 124 uint8_t request, … … 165 165 * @return Error code. 166 166 */ 167 int usb_request_get_status(usb_ endpoint_pipe_t *pipe,167 int usb_request_get_status(usb_pipe_t *pipe, 168 168 usb_request_recipient_t recipient, uint16_t index, 169 169 uint16_t *status) … … 203 203 * @return Error code. 204 204 */ 205 int usb_request_clear_feature(usb_ endpoint_pipe_t *pipe,205 int usb_request_clear_feature(usb_pipe_t *pipe, 206 206 usb_request_type_t request_type, usb_request_recipient_t recipient, 207 207 uint16_t feature_selector, uint16_t index) … … 231 231 * @return Error code. 232 232 */ 233 int usb_request_set_feature(usb_ endpoint_pipe_t *pipe,233 int usb_request_set_feature(usb_pipe_t *pipe, 234 234 usb_request_type_t request_type, usb_request_recipient_t recipient, 235 235 uint16_t feature_selector, uint16_t index) … … 258 258 * @return Error code. 259 259 */ 260 int usb_request_set_address(usb_ endpoint_pipe_t *pipe,260 int usb_request_set_address(usb_pipe_t *pipe, 261 261 usb_address_t new_address) 262 262 { … … 297 297 * @return Error code. 298 298 */ 299 int usb_request_get_descriptor(usb_ endpoint_pipe_t *pipe,299 int usb_request_get_descriptor(usb_pipe_t *pipe, 300 300 usb_request_type_t request_type, usb_request_recipient_t recipient, 301 301 uint8_t descriptor_type, uint8_t descriptor_index, … … 331 331 * @return 332 332 */ 333 int usb_request_get_descriptor_alloc(usb_ endpoint_pipe_t * pipe,333 int usb_request_get_descriptor_alloc(usb_pipe_t * pipe, 334 334 usb_request_type_t request_type, usb_request_recipient_t recipient, 335 335 uint8_t descriptor_type, uint8_t descriptor_index, … … 400 400 * @return Error code. 401 401 */ 402 int usb_request_get_device_descriptor(usb_ endpoint_pipe_t *pipe,402 int usb_request_get_device_descriptor(usb_pipe_t *pipe, 403 403 usb_standard_device_descriptor_t *descriptor) 404 404 { … … 442 442 * @return Error code. 443 443 */ 444 int usb_request_get_bare_configuration_descriptor(usb_ endpoint_pipe_t *pipe,444 int usb_request_get_bare_configuration_descriptor(usb_pipe_t *pipe, 445 445 int index, usb_standard_configuration_descriptor_t *descriptor) 446 446 { … … 488 488 * @return Error code. 489 489 */ 490 int usb_request_get_full_configuration_descriptor(usb_ endpoint_pipe_t *pipe,490 int usb_request_get_full_configuration_descriptor(usb_pipe_t *pipe, 491 491 int index, void *descriptor, size_t descriptor_size, size_t *actual_size) 492 492 { … … 514 514 */ 515 515 int usb_request_get_full_configuration_descriptor_alloc( 516 usb_ endpoint_pipe_t *pipe, int index,516 usb_pipe_t *pipe, int index, 517 517 void **descriptor_ptr, size_t *descriptor_size) 518 518 { … … 578 578 * @return Error code. 579 579 */ 580 int usb_request_set_descriptor(usb_ endpoint_pipe_t *pipe,580 int usb_request_set_descriptor(usb_pipe_t *pipe, 581 581 usb_request_type_t request_type, usb_request_recipient_t recipient, 582 582 uint8_t descriptor_type, uint8_t descriptor_index, … … 607 607 * @return Error code. 608 608 */ 609 int usb_request_get_configuration(usb_ endpoint_pipe_t *pipe,609 int usb_request_get_configuration(usb_pipe_t *pipe, 610 610 uint8_t *configuration_value) 611 611 { … … 639 639 * @return Error code. 640 640 */ 641 int usb_request_set_configuration(usb_ endpoint_pipe_t *pipe,641 int usb_request_set_configuration(usb_pipe_t *pipe, 642 642 uint8_t configuration_value) 643 643 { … … 658 658 * @return Error code. 659 659 */ 660 int usb_request_get_interface(usb_ endpoint_pipe_t *pipe,660 int usb_request_get_interface(usb_pipe_t *pipe, 661 661 uint8_t interface_index, uint8_t *alternate_setting) 662 662 { … … 691 691 * @return Error code. 692 692 */ 693 int usb_request_set_interface(usb_ endpoint_pipe_t *pipe,693 int usb_request_set_interface(usb_pipe_t *pipe, 694 694 uint8_t interface_index, uint8_t alternate_setting) 695 695 { … … 710 710 * @return Error code. 711 711 */ 712 int usb_request_get_supported_languages(usb_ endpoint_pipe_t *pipe,712 int usb_request_get_supported_languages(usb_pipe_t *pipe, 713 713 l18_win_locales_t **languages_ptr, size_t *languages_count) 714 714 { … … 782 782 * @return Error code. 783 783 */ 784 int usb_request_get_string(usb_ endpoint_pipe_t *pipe,784 int usb_request_get_string(usb_pipe_t *pipe, 785 785 size_t index, l18_win_locales_t lang, char **string_ptr) 786 786 {
Note:
See TracChangeset
for help on using the changeset viewer.