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