Changes in uspace/lib/usbdev/include/usb/dev/pipes.h [b7fd2a0:ae3a941] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbdev/include/usb/dev/pipes.h
rb7fd2a0 rae3a941 1 1 /* 2 2 * Copyright (c) 2011 Vojtech Horky 3 * Copyright (c) 2018 Ondrej Hlavaty 3 4 * All rights reserved. 4 5 * … … 44 45 45 46 #define CTRL_PIPE_MIN_PACKET_SIZE 8 47 46 48 /** Abstraction of a logical connection to USB device endpoint. 47 * It encapsulates endpoint attributes (transfer type etc.).49 * It contains some vital information about the pipe. 48 50 * This endpoint must be bound with existing usb_device_connection_t 49 51 * (i.e. the wire to send data over). 50 52 */ 51 53 typedef struct { 52 /** Endpoint number. */ 53 usb_endpoint_t endpoint_no; 54 55 /** Endpoint transfer type. */ 56 usb_transfer_type_t transfer_type; 57 58 /** Endpoint direction. */ 59 usb_direction_t direction; 60 61 /** Maximum packet size for the endpoint. */ 62 size_t max_packet_size; 63 64 /** Number of packets per frame/uframe. 65 * Only valid for HS INT and ISO transfers. All others should set to 1*/ 66 unsigned packets; 54 /** Pipe description received from HC */ 55 usb_pipe_desc_t desc; 67 56 68 57 /** Whether to automatically reset halt on the endpoint. … … 70 59 */ 71 60 bool auto_reset_halt; 72 73 61 /** The connection used for sending the data. */ 74 62 usb_dev_session_t *bus_session; … … 103 91 /** Found descriptor fitting the description. */ 104 92 const usb_standard_endpoint_descriptor_t *descriptor; 93 /** Relevant superspeed companion descriptor. */ 94 const usb_superspeed_endpoint_companion_descriptor_t 95 *companion_descriptor; 105 96 /** Interface descriptor the endpoint belongs to. */ 106 97 const usb_standard_interface_descriptor_t *interface; … … 109 100 } usb_endpoint_mapping_t; 110 101 111 errno_t usb_pipe_initialize(usb_pipe_t *, usb_endpoint_t, usb_transfer_type_t, 112 size_t, usb_direction_t, unsigned, usb_dev_session_t *); 102 errno_t usb_pipe_initialize(usb_pipe_t *, usb_dev_session_t *); 113 103 errno_t usb_pipe_initialize_default_control(usb_pipe_t *, usb_dev_session_t *); 114 104 115 errno_t usb_pipe_probe_default_control(usb_pipe_t *);116 105 errno_t usb_pipe_initialize_from_configuration(usb_endpoint_mapping_t *, 117 106 size_t, const uint8_t *, size_t, usb_dev_session_t *); 118 107 119 errno_t usb_pipe_register(usb_pipe_t *, unsigned); 108 errno_t usb_pipe_register(usb_pipe_t *, 109 const usb_standard_endpoint_descriptor_t *, 110 const usb_superspeed_endpoint_companion_descriptor_t *); 120 111 errno_t usb_pipe_unregister(usb_pipe_t *); 121 112 122 113 errno_t usb_pipe_read(usb_pipe_t *, void *, size_t, size_t *); 123 114 errno_t usb_pipe_write(usb_pipe_t *, const void *, size_t); 115 116 errno_t usb_pipe_read_dma(usb_pipe_t *, void *, void *, size_t, size_t *); 117 errno_t usb_pipe_write_dma(usb_pipe_t *, void *, void *, size_t); 124 118 125 119 errno_t usb_pipe_control_read(usb_pipe_t *, const void *, size_t, … … 128 122 const void *, size_t); 129 123 124 void *usb_pipe_alloc_buffer(usb_pipe_t *, size_t); 125 void usb_pipe_free_buffer(usb_pipe_t *, void *); 130 126 #endif 131 127 /**
Note:
See TracChangeset
for help on using the changeset viewer.