Ignore:
Timestamp:
2014-01-24T01:24:58Z (10 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
4e732f1a
Parents:
a24d6825
Message:

ehci: Implement endpoint list append

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/bus/usb/ehci/hw_struct/queue_head.h

    ra24d6825 r3de7a62  
    4040
    4141#include "link_pointer.h"
     42#include "mem_access.h"
    4243
    4344/** This structure is defined in EHCI design guide p. 46 */
     
    140141} qh_t;
    141142
     143static inline void qh_append_qh(qh_t *qh, const qh_t *next)
     144{
     145        assert(qh);
     146        assert(next);
     147        const uint32_t pa = addr_to_phys(next);
     148        assert((pa & LINK_POINTER_ADDRESS_MASK) == pa);
     149        EHCI_MEM32_WR(qh->horizontal, LINK_POINTER_QH(pa));
     150}
     151
     152static inline uintptr_t qh_next(const qh_t *qh)
     153{
     154        assert(qh);
     155        return (qh->horizontal & LINK_POINTER_ADDRESS_MASK);
     156}
     157
    142158void qh_init(qh_t *instance, const endpoint_t *ep);
    143159#endif
Note: See TracChangeset for help on using the changeset viewer.