Changeset 00db345a in mainline for uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h
- Timestamp:
- 2011-03-05T11:51:14Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1efe89b
- Parents:
- 7ac73a4 (diff), 474d08e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/uhci_struct/transfer_descriptor.h
r7ac73a4 r00db345a 88 88 * we don't use it anyway 89 89 */ 90 } __attribute__((packed)) t ransfer_descriptor_t;90 } __attribute__((packed)) td_t; 91 91 92 92 93 void t ransfer_descriptor_init(transfer_descriptor_t *instance,94 int error_count, size_t size, bool toggle, bool isochronous, bool low_speed,95 usb_target_t target, int pid, void *buffer, transfer_descriptor_t *next);93 void td_init(td_t *instance, int error_count, size_t size, bool toggle, bool iso, 94 bool low_speed, usb_target_t target, usb_packet_id pid, void *buffer, 95 td_t *next); 96 96 97 int t ransfer_descriptor_status(transfer_descriptor_t *instance);97 int td_status(td_t *instance); 98 98 99 static inline size_t transfer_descriptor_actual_size( 100 transfer_descriptor_t *instance) 99 static inline size_t td_act_size(td_t *instance) 101 100 { 102 101 assert(instance); 103 102 return 104 ((instance->status >> TD_STATUS_ACTLEN_POS) + 1) & TD_STATUS_ACTLEN_MASK; 103 ((instance->status >> TD_STATUS_ACTLEN_POS) + 1) 104 & TD_STATUS_ACTLEN_MASK; 105 105 } 106 106 107 static inline bool transfer_descriptor_is_active( 108 transfer_descriptor_t *instance) 107 static inline bool td_is_short(td_t *instance) 108 { 109 const size_t act_size = td_act_size(instance); 110 const size_t max_size = 111 ((instance->device >> TD_DEVICE_MAXLEN_POS) + 1) 112 & TD_DEVICE_MAXLEN_MASK; 113 return 114 (instance->status | TD_STATUS_SPD_FLAG) && act_size < max_size; 115 } 116 117 static inline bool td_is_active(td_t *instance) 109 118 { 110 119 assert(instance);
Note:
See TracChangeset
for help on using the changeset viewer.