Changeset b4b534ac in mainline for uspace/drv/bus/usb/ohci/hw_struct/hcca.h
- Timestamp:
- 2016-07-22T08:24:47Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f76d2c2
- Parents:
- 5b18137 (diff), 8351f9a4 (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/bus/usb/ohci/hw_struct/hcca.h
r5b18137 rb4b534ac 35 35 #define DRV_OHCI_HW_STRUCT_HCCA_H 36 36 37 #include <stdint.h>38 37 #include <malloc.h> 38 #include <sys/types.h> 39 #include <macros.h> 39 40 40 41 #include "mem_access.h" … … 50 51 /** Frame number. */ 51 52 uint16_t frame_number; 52 uint16_t pad1;53 PADD16; 53 54 /** Pointer to the last completed TD. (useless) */ 54 55 uint32_t done_head; 55 56 /** Padding to make the size 256B */ 56 uint32_t reserved[30];57 PADD32[30]; 57 58 } hcca_t; 59 60 STATIC_ASSERT(sizeof(hcca_t) == 256); 58 61 59 62 /** Allocate properly aligned structure. … … 65 68 static inline hcca_t * hcca_get(void) 66 69 { 67 static_assert(sizeof(hcca_t) == 256); 68 hcca_t *hcca = memalign(256, sizeof(hcca_t)); 70 hcca_t *hcca = memalign(sizeof(hcca_t), sizeof(hcca_t)); 69 71 if (hcca) 70 72 memset(hcca, 0, sizeof(hcca_t)); … … 80 82 { 81 83 assert(hcca); 82 assert(index < HCCA_INT_EP_COUNT);84 assert(index < ARRAY_SIZE(hcca->int_ep)); 83 85 OHCI_MEM32_WR(hcca->int_ep[index], pa); 84 85 86 } 86 87 #endif
Note:
See TracChangeset
for help on using the changeset viewer.