Changeset 75d8821 in mainline
- Timestamp:
- 2013-12-31T06:58:19Z (11 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1760556
- Parents:
- 643e7ba
- Location:
- uspace/lib/usbhost
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/usb_bus.h
r643e7ba r75d8821 53 53 #define BANDWIDTH_AVAILABLE_USB11 ((BANDWIDTH_TOTAL_USB11 / 10) * 9) 54 54 55 //TODO: Implement 56 #define BANDWIDTH_AVAILABLE_USB20 1 57 55 58 typedef size_t (*bw_count_func_t)(usb_speed_t, usb_transfer_type_t, size_t, size_t); 56 59 typedef void (*ep_remove_callback_t)(endpoint_t *, void *); … … 78 81 79 82 size_t bandwidth_count_usb11(usb_speed_t speed, usb_transfer_type_t type, 83 size_t size, size_t max_packet_size); 84 size_t bandwidth_count_usb20(usb_speed_t speed, usb_transfer_type_t type, 80 85 size_t size, size_t max_packet_size); 81 86 -
uspace/lib/usbhost/src/usb_bus.c
r643e7ba r75d8821 169 169 } 170 170 171 /** Calculate bandwidth that needs to be reserved for communication with EP. 172 * Calculation follows USB 2.0 specification. 173 * @param speed Device's speed. 174 * @param type Type of the transfer. 175 * @param size Number of byte to transfer. 176 * @param max_packet_size Maximum bytes in one packet. 177 */ 178 size_t bandwidth_count_usb20(usb_speed_t speed, usb_transfer_type_t type, 179 size_t size, size_t max_packet_size) 180 { 181 /* We care about bandwidth only for interrupt and isochronous. */ 182 if ((type != USB_TRANSFER_INTERRUPT) 183 && (type != USB_TRANSFER_ISOCHRONOUS)) { 184 return 0; 185 } 186 //TODO Implement 187 return 0; 188 } 189 171 190 /** Initialize to default state. 172 191 * You need to provide valid bw_count function if you plan to use
Note:
See TracChangeset
for help on using the changeset viewer.