Fork us on GitHub Follow us on Facebook Follow us on Twitter

Ignore:
Timestamp:
2014-01-25T07:07:54Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial
Children:
23e5471
Parents:
6602e97
Message:

ehci: Implement batch error checking

File:
1 edited

Legend:

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

    r6602e97 ra752c78c  
    7373} td_t;
    7474
     75static inline bool td_active(const td_t *td)
     76{
     77        assert(td);
     78        return (EHCI_MEM32_RD(td->status) & TD_STATUS_HALTED_FLAG) != 0;
     79}
     80
     81static inline size_t td_remain_size(const td_t *td)
     82{
     83        assert(td);
     84        return (EHCI_MEM32_RD(td->status) >> TD_STATUS_TOTAL_SHIFT) &
     85            TD_STATUS_TOTAL_MASK;
     86}
     87
     88int td_error(const td_t *td);
     89
    7590void td_init(td_t *td, const td_t *next, usb_direction_t dir, const void * buf,
    7691    size_t buf_size, int toggle);
Note: See TracChangeset for help on using the changeset viewer.