Ignore:
Timestamp:
2011-04-08T15:15:34Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6b6e3ed3
Parents:
6bec59b
Message:

Port transfer_list from UHCI

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    r6bec59b rf98b8269  
    3535#define DRV_OHCI_HW_STRUCT_ENDPOINT_DESCRIPTOR_H
    3636
     37#include <assert.h>
    3738#include <stdint.h>
     39
     40#include "utils/malloc32.h"
    3841
    3942#include "completion_codes.h"
     
    7174#define ED_NEXT_PTR_SHIFT (0)
    7275} __attribute__((packed)) ed_t;
     76
     77static inline void ed_init_dummy(ed_t *instance)
     78{
     79        assert(instance);
     80        bzero(instance, sizeof(ed_t));
     81        instance->status |= ED_STATUS_K_FLAG;
     82}
     83
     84static inline void ed_append_ed(ed_t *instance, ed_t *next)
     85{
     86        assert(instance);
     87        assert(next);
     88        uint32_t pa = addr_to_phys(next);
     89        assert((pa & ED_NEXT_PTR_MASK) << ED_NEXT_PTR_SHIFT == pa);
     90        instance->next = pa;
     91}
     92
    7393#endif
    7494/**
Note: See TracChangeset for help on using the changeset viewer.