Changes in uspace/drv/bus/usb/ohci/hw_struct/hcca.h [acdb5bac:3e48c93] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/bus/usb/ohci/hw_struct/hcca.h
racdb5bac r3e48c93 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 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.