Ignore:
Timestamp:
2011-04-13T19:42:36Z (13 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ea993d18
Parents:
4c70554
Message:

More refactoring and doxygen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci-hcd/hw_struct/queue_head.h

    r4c70554 r9d2d444  
    3737
    3838#include "link_pointer.h"
     39#include "transfer_descriptor.h"
    3940#include "utils/malloc32.h"
    4041
     42/** This structure is defined in UHCI design guide p. 31 */
    4143typedef struct queue_head {
     44        /** Pointer to the next entity (another QH or TD */
    4245        volatile link_pointer_t next;
     46        /** Pointer to the contained entities (execution controlled by vertical flag*/
    4347        volatile link_pointer_t element;
    4448} __attribute__((packed)) qh_t;
     
    6367 * @param[in] pa Physical address of the next queue head.
    6468 *
    65  * Adds proper flag. If the pointer is NULL or terminal, sets next to terminal
    66  * NULL.
     69 * Adds proper flag. If the pointer is NULL, sets next to terminal NULL.
    6770 */
    6871static inline void qh_set_next_qh(qh_t *instance, qh_t *next)
    6972{
    70         /* Address is valid and not terminal */
    7173        uint32_t pa = addr_to_phys(next);
    7274        if (pa) {
     
    8284 * @param[in] pa Physical address of the TD structure.
    8385 *
    84  * Adds proper flag. If the pointer is NULL or terminal, sets element
    85  * to terminal NULL.
     86 * Adds proper flag. If the pointer is NULL, sets element to terminal NULL.
    8687 */
    87 static inline void qh_set_element_td(qh_t *instance, uint32_t pa)
     88static inline void qh_set_element_td(qh_t *instance, td_t *td)
    8889{
    89         if (pa && ((pa & LINK_POINTER_TERMINATE_FLAG) == 0)) {
     90        uint32_t pa = addr_to_phys(td);
     91        if (pa) {
    9092                instance->element = LINK_POINTER_TD(pa);
    9193        } else {
     
    9395        }
    9496}
    95 
    9697#endif
    9798/**
Note: See TracChangeset for help on using the changeset viewer.