Ignore:
Timestamp:
2011-10-16T14:24:05Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d5abaf4
Parents:
9515f674
Message:

ohci: OHCI TD routines refactoring.

Merge td_set_next to td_init: td list is built during initialization.
Add doxygen and other comments.
Add ed_inactive and ed_transfer_pending routines, these will be used later.

File:
1 edited

Legend:

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

    r9515f674 r70d72dd  
    109109
    110110/**
     111 * Check for SKIP or HALTED flag being set.
     112 * @param instance ED
     113 * @return true if either SKIP or HALTED flag is set, false otherwise.
     114 */
     115static inline bool ed_inactive(const ed_t *instance)
     116{
     117        assert(instance);
     118        return (instance->td_head & ED_TDHEAD_HALTED_FLAG)
     119            || (instance->status & ED_STATUS_K_FLAG);
     120}
     121
     122/**
     123 * Check whether this ED contains TD to be executed.
     124 * @param instance ED
     125 * @return true if there are pending TDs, false otherwise.
     126 */
     127static inline bool ed_transfer_pending(const ed_t *instance)
     128{
     129        assert(instance);
     130        return (instance->td_head & ED_TDHEAD_PTR_MASK)
     131            != (instance->td_tail & ED_TDTAIL_PTR_MASK);
     132}
     133
     134/**
    111135 * Set the last element of TD list
    112136 * @param instance ED
Note: See TracChangeset for help on using the changeset viewer.