Changeset 888238e9 in mainline for uspace/lib
- Timestamp:
- 2017-11-20T12:56:00Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d3086873
- Parents:
- ff14aede
- git-author:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:55:58)
- git-committer:
- Aearsis <Hlavaty.Ondrej@…> (2017-11-20 12:56:00)
- Location:
- uspace/lib/usbhost
- Files:
-
- 3 edited
-
include/usb/host/endpoint.h (modified) (1 diff)
-
include/usb/host/usb_transfer_batch.h (modified) (2 diffs)
-
src/bandwidth.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/endpoint.h
rff14aede r888238e9 66 66 /** USB transfer type. */ 67 67 usb_transfer_type_t transfer_type; 68 /** Communication speed. */69 usb_speed_t speed;70 68 /** Maximum size of data packets. */ 71 69 size_t max_packet_size; -
uspace/lib/usbhost/include/usb/host/usb_transfer_batch.h
rff14aede r888238e9 39 39 #include <usb/usb.h> 40 40 #include <usb/request.h> 41 #include <usb/host/bus.h> 41 42 #include <usbhc_iface.h> 42 43 … … 99 100 #define USB_TRANSFER_BATCH_ARGS(batch) \ 100 101 (batch).target.address, (batch).target.endpoint, \ 101 usb_str_speed((batch).ep-> speed), \102 usb_str_speed((batch).ep->device->speed), \ 102 103 usb_str_transfer_type_short((batch).ep->transfer_type), \ 103 104 usb_str_direction((batch).ep->direction), \ -
uspace/lib/usbhost/src/bandwidth.c
rff14aede r888238e9 36 36 #include <usb/host/bandwidth.h> 37 37 #include <usb/host/endpoint.h> 38 #include <usb/host/bus.h> 38 39 39 40 #include <assert.h> … … 42 43 /** Calculate bandwidth that needs to be reserved for communication with EP. 43 44 * Calculation follows USB 1.1 specification. 44 * @param speed Device's speed. 45 * @param type Type of the transfer. 46 * @param size Number of byte to transfer. 45 * @param ep Registered endpoint 46 * @param size Number of bytes to transfer. 47 47 * @param max_packet_size Maximum bytes in one packet. 48 48 */ … … 50 50 { 51 51 assert(ep); 52 assert(ep->device); 52 53 53 54 const usb_transfer_type_t type = ep->transfer_type; … … 66 67 * transaction, but I did not find text in USB spec to confirm this */ 67 68 /* NOTE: All data packets will be considered to be max_packet_size */ 68 switch (ep-> speed)69 switch (ep->device->speed) 69 70 { 70 71 case USB_SPEED_LOW:
Note:
See TracChangeset
for help on using the changeset viewer.
