Ignore:
Timestamp:
2016-07-22T08:24:47Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge from lp:~jan.vesely/helenos/usb

File:
1 edited

Legend:

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

    r5b18137 rb4b534ac  
    3535#define DRV_OHCI_HW_STRUCT_HCCA_H
    3636
    37 #include <stdint.h>
    3837#include <malloc.h>
     38#include <sys/types.h>
     39#include <macros.h>
    3940
    4041#include "mem_access.h"
     
    5051        /** Frame number. */
    5152        uint16_t frame_number;
    52         uint16_t pad1;
     53        PADD16;
    5354        /** Pointer to the last completed TD. (useless) */
    5455        uint32_t done_head;
    5556        /** Padding to make the size 256B */
    56         uint32_t reserved[30];
     57        PADD32[30];
    5758} hcca_t;
     59
     60STATIC_ASSERT(sizeof(hcca_t) == 256);
    5861
    5962/** Allocate properly aligned structure.
     
    6568static inline hcca_t * hcca_get(void)
    6669{
    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));
    6971        if (hcca)
    7072                memset(hcca, 0, sizeof(hcca_t));
     
    8082{
    8183        assert(hcca);
    82         assert(index < HCCA_INT_EP_COUNT);
     84        assert(index < ARRAY_SIZE(hcca->int_ep));
    8385        OHCI_MEM32_WR(hcca->int_ep[index], pa);
    84 
    8586}
    8687#endif
Note: See TracChangeset for help on using the changeset viewer.