Changeset c13ecfe in mainline
- Timestamp:
- 2011-01-28T11:46:22Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 579dec2
- Parents:
- db7ed07
- Location:
- uspace/drv/uhci
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/Makefile
rdb7ed07 rc13ecfe 40 40 root_hub/root_hub.c \ 41 41 transfer_list.c \ 42 uhci.c 42 uhci.c \ 43 uhci_struct/transfer_descriptor.c 43 44 44 45 include $(USPACE_PREFIX)/Makefile.common -
uspace/drv/uhci/uhci_struct/transfer_descriptor.h
rdb7ed07 rc13ecfe 57 57 #define TD_STATUS_COMPLETE_INTERRUPT_FLAG ( 1 << 24 ) 58 58 59 #define TD_STATUS_ ACTIVE ( 1 << 23 )59 #define TD_STATUS_ERROR_ACTIVE ( 1 << 23 ) 60 60 #define TD_STATUS_ERROR_STALLED ( 1 << 22 ) 61 61 #define TD_STATUS_ERROR_BUFFER ( 1 << 21 ) … … 65 65 #define TD_STATUS_ERROR_BIT_STUFF ( 1 << 17 ) 66 66 #define TD_STATUS_ERROR_RESERVED ( 1 << 16 ) 67 #define TD_STATUS_ POS 1668 #define TD_STATUS_ MASK ( 0xff )67 #define TD_STATUS_ERROR_POS 16 68 #define TD_STATUS_ERROR_MASK ( 0xff ) 69 69 70 70 #define TD_STATUS_ACTLEN_POS 0 … … 86 86 uint32_t buffer_ptr; 87 87 88 /* there is 16 byte of data available here88 /* there is 16 bytes of data available here 89 89 * those are used to store callback pointer 90 * and next pointer. Thus there is some free space90 * and next pointer. Thus, there is some free space 91 91 * on 32bits systems. 92 92 */ … … 95 95 } __attribute__((packed)) transfer_descriptor_t; 96 96 97 static inline inttransfer_descriptor_init(transfer_descriptor_t *instance,97 void transfer_descriptor_init(transfer_descriptor_t *instance, 98 98 int error_count, size_t size, bool isochronous, usb_target_t target, 99 int pid) 100 { 101 assert(instance); 99 int pid); 102 100 103 instance->next = 104 0 | LINK_POINTER_VERTICAL_FLAG | LINK_POINTER_TERMINATE_FLAG; 105 106 assert(size < 1024); 107 instance->status = 0 108 | ((error_count & TD_STATUS_ERROR_COUNT_MASK) << TD_STATUS_ERROR_COUNT_POS) 109 | TD_STATUS_ACTIVE; 110 111 instance->device = 0 112 | ((size & TD_DEVICE_MAXLEN_MASK) << TD_DEVICE_MAXLEN_POS) 113 | ((target.address & TD_DEVICE_ADDRESS_MASK) << TD_DEVICE_ADDRESS_POS) 114 | ((target.endpoint & TD_DEVICE_ENDPOINT_MASK) << TD_DEVICE_ENDPOINT_POS) 115 | ((pid & TD_DEVICE_PID_MASK) << TD_DEVICE_PID_POS); 116 117 instance->next_va = NULL; 118 instance->callback = NULL; 119 120 return EOK; 121 } 101 void transfer_descriptor_fini(transfer_descriptor_t *instance); 122 102 123 103 static inline void transfer_descriptor_append( … … 128 108 instance->next = (uintptr_t)addr_to_phys( item ) & LINK_POINTER_ADDRESS_MASK; 129 109 } 130 131 110 #endif 132 111 /**
Note:
See TracChangeset
for help on using the changeset viewer.