Changeset ae3a941 in mainline for uspace/drv/bus/usb/ohci/hw_struct
- Timestamp:
- 2018-02-26T16:51:40Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e773f58
- Parents:
- 3692678
- Location:
- uspace/drv/bus/usb/ohci/hw_struct
- Files:
-
- 4 edited
-
endpoint_descriptor.c (modified) (1 diff)
-
endpoint_descriptor.h (modified) (2 diffs)
-
iso_transfer_descriptor.h (modified) (1 diff)
-
transfer_descriptor.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c
r3692678 rae3a941 84 84 | ((ep->endpoint & ED_STATUS_EN_MASK) << ED_STATUS_EN_SHIFT) 85 85 | ((dir[ep->direction] & ED_STATUS_D_MASK) << ED_STATUS_D_SHIFT) 86 | ((ep->max_packet_size & ED_STATUS_MPS_MASK) 87 << ED_STATUS_MPS_SHIFT)); 86 | ((ep->max_packet_size & ED_STATUS_MPS_MASK) << ED_STATUS_MPS_SHIFT)); 88 87 89 88 /* Low speed flag */ -
uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.h
r3692678 rae3a941 107 107 #define ED_NEXT_PTR_MASK (0xfffffff0) 108 108 #define ED_NEXT_PTR_SHIFT (0) 109 } __attribute__((packed, aligned(32))) ed_t;109 } __attribute__((packed, aligned(32))) ed_t; 110 110 111 111 void ed_init(ed_t *instance, const endpoint_t *ep, const td_t *td); … … 204 204 { 205 205 assert(instance); 206 return (OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY) ? 1 : 0;206 return !!(OHCI_MEM32_RD(instance->td_head) & ED_TDHEAD_TOGGLE_CARRY); 207 207 } 208 208 -
uspace/drv/bus/usb/ohci/hw_struct/iso_transfer_descriptor.h
r3692678 rae3a941 69 69 #define ITD_OFFSET_CC_SHIFT (12) 70 70 71 } __attribute__((packed, aligned(32))) itd_t;71 } __attribute__((packed, aligned(32))) itd_t; 72 72 73 73 #endif -
uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.h
r3692678 rae3a941 90 90 */ 91 91 volatile uint32_t be; 92 } __attribute__((packed, aligned(32))) td_t;92 } __attribute__((packed, aligned(32))) td_t; 93 93 94 94 void td_init(td_t *, const td_t *, usb_direction_t, const void *, size_t, int); … … 103 103 { 104 104 assert(instance); 105 const int cc = (OHCI_MEM32_RD(instance->status)106 >> TD_STATUS_CC_SHIFT)& TD_STATUS_CC_MASK;105 const int cc = (OHCI_MEM32_RD(instance->status) >> TD_STATUS_CC_SHIFT) 106 & TD_STATUS_CC_MASK; 107 107 /* This value is changed on transfer completion, 108 108 * either to CC_NOERROR or and error code.
Note:
See TracChangeset
for help on using the changeset viewer.
