Changeset b357377 in mainline for uspace/lib/usbhost/include
- Timestamp:
- 2018-01-25T02:05:57Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- d369b3b
- Parents:
- 5f0b366
- git-author:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 01:23:20)
- git-committer:
- Ondřej Hlavatý <aearsis@…> (2018-01-25 02:05:57)
- Location:
- uspace/lib/usbhost/include/usb/host
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/usbhost/include/usb/host/bandwidth.h
r5f0b366 rb357377 41 41 #include <stddef.h> 42 42 43 /** Bytes per second in FULL SPEED */44 #define BANDWIDTH_TOTAL_USB11 (12000000 / 8)45 /** 90% of total bandwidth is available for periodic transfers */46 #define BANDWIDTH_AVAILABLE_USB11 ((BANDWIDTH_TOTAL_USB11 * 9) / 10)47 48 /** Number of nanoseconds in one microframe */49 #define BANDWIDTH_TOTAL_USB20 (125000)50 /** 90% of total bandwidth is available for periodic transfers */51 #define BANDWIDTH_AVAILABLE_USB20 ((BANDWIDTH_TOTAL_USB20 * 9) / 10)52 53 43 typedef struct endpoint endpoint_t; 54 44 55 extern ssize_t bandwidth_count_usb11(endpoint_t *, size_t);45 typedef size_t (*endpoint_count_bw_t)(endpoint_t *); 56 46 57 extern ssize_t bandwidth_count_usb20(endpoint_t *, size_t); 47 typedef struct { 48 size_t available_bandwidth; 49 endpoint_count_bw_t count_bw; 50 } bandwidth_accounting_t; 51 52 extern const bandwidth_accounting_t bandwidth_accounting_usb11; 53 extern const bandwidth_accounting_t bandwidth_accounting_usb2; 58 54 59 55 #endif -
uspace/lib/usbhost/include/usb/host/bus.h
r5f0b366 rb357377 120 120 void (*endpoint_unregister)(endpoint_t *); 121 121 void (*endpoint_destroy)(endpoint_t *); /**< Optional */ 122 ssize_t (*endpoint_count_bw) (endpoint_t *, size_t); /**< Optional */123 122 usb_transfer_batch_t *(*batch_create)(endpoint_t *); /**< Optional */ 124 123 -
uspace/lib/usbhost/include/usb/host/usb2_bus.h
r5f0b366 rb357377 42 42 43 43 #include <usb/host/bus.h> 44 #include <usb/host/bandwidth.h> 44 45 45 46 typedef struct usb2_bus usb2_bus_t; … … 57 58 /** Size of the bandwidth pool */ 58 59 size_t free_bw; 60 61 /* Configured bandwidth accounting */ 62 const bandwidth_accounting_t *bw_accounting; 59 63 } usb2_bus_t; 60 64 61 65 extern const bus_ops_t usb2_bus_ops; 62 66 63 extern void usb2_bus_init(usb2_bus_t *, size_t);67 extern void usb2_bus_init(usb2_bus_t *, const bandwidth_accounting_t *); 64 68 65 69 #endif
Note:
See TracChangeset
for help on using the changeset viewer.