Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    r3e48c93 racdb5bac  
    3535#define DRV_OHCI_HW_STRUCT_HCCA_H
    3636
     37#include <stdint.h>
    3738#include <malloc.h>
    38 #include <sys/types.h>
    39 #include <macros.h>
    4039
    4140#include "mem_access.h"
     
    5150        /** Frame number. */
    5251        uint16_t frame_number;
    53         PADD16;
     52        uint16_t pad1;
    5453        /** Pointer to the last completed TD. (useless) */
    5554        uint32_t done_head;
    5655        /** Padding to make the size 256B */
    57         PADD32[30];
     56        uint32_t reserved[30];
    5857} hcca_t;
    59 
    60 STATIC_ASSERT(sizeof(hcca_t) == 256);
    6158
    6259/** Allocate properly aligned structure.
     
    6865static inline hcca_t * hcca_get(void)
    6966{
    70         hcca_t *hcca = memalign(sizeof(hcca_t), sizeof(hcca_t));
     67        assert(sizeof(hcca_t) == 256);
     68        hcca_t *hcca = memalign(256, sizeof(hcca_t));
    7169        if (hcca)
    7270                memset(hcca, 0, sizeof(hcca_t));
     
    8280{
    8381        assert(hcca);
    84         assert(index < ARRAY_SIZE(hcca->int_ep));
     82        assert(index < HCCA_INT_EP_COUNT);
    8583        OHCI_MEM32_WR(hcca->int_ep[index], pa);
     84
    8685}
    8786#endif
Note: See TracChangeset for help on using the changeset viewer.