Changeset f1be95c8 in mainline for uspace/drv/ohci/hw_struct/transfer_descriptor.h
- Timestamp:
- 2011-04-09T00:22:30Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 4c28d17
- Parents:
- e42dd32
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/ohci/hw_struct/transfer_descriptor.h
re42dd32 rf1be95c8 35 35 #define DRV_OHCI_HW_STRUCT_TRANSFER_DESCRIPTOR_H 36 36 37 #include <bool.h> 37 38 #include <stdint.h> 38 39 #include "utils/malloc32.h" … … 79 80 instance->next = addr_to_phys(next) & TD_NEXT_PTR_MASK; 80 81 } 82 83 inline static bool td_is_finished(td_t *instance) 84 { 85 assert(instance); 86 int cc = (instance->status >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK; 87 /* something went wrong, error code is set */ 88 if (cc != CC_NOACCESS1 && cc != CC_NOACCESS2 && cc != CC_NOERROR) { 89 return true; 90 } 91 /* everything done */ 92 if (cc == CC_NOERROR && instance->cbp == 0) { 93 return true; 94 } 95 return false; 96 } 97 98 static inline int td_error(td_t *instance) 99 { 100 assert(instance); 101 int cc = (instance->status >> TD_STATUS_CC_SHIFT) & TD_STATUS_CC_MASK; 102 return cc_to_rc(cc); 103 } 81 104 #endif 82 105 /**
Note:
See TracChangeset
for help on using the changeset viewer.