Changeset 9d2d444 in mainline for uspace/drv/uhci-hcd/hw_struct/queue_head.h
- Timestamp:
- 2011-04-13T19:42:36Z (14 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ea993d18
- Parents:
- 4c70554
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/hw_struct/queue_head.h
r4c70554 r9d2d444 37 37 38 38 #include "link_pointer.h" 39 #include "transfer_descriptor.h" 39 40 #include "utils/malloc32.h" 40 41 42 /** This structure is defined in UHCI design guide p. 31 */ 41 43 typedef struct queue_head { 44 /** Pointer to the next entity (another QH or TD */ 42 45 volatile link_pointer_t next; 46 /** Pointer to the contained entities (execution controlled by vertical flag*/ 43 47 volatile link_pointer_t element; 44 48 } __attribute__((packed)) qh_t; … … 63 67 * @param[in] pa Physical address of the next queue head. 64 68 * 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. 67 70 */ 68 71 static inline void qh_set_next_qh(qh_t *instance, qh_t *next) 69 72 { 70 /* Address is valid and not terminal */71 73 uint32_t pa = addr_to_phys(next); 72 74 if (pa) { … … 82 84 * @param[in] pa Physical address of the TD structure. 83 85 * 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. 86 87 */ 87 static inline void qh_set_element_td(qh_t *instance, uint32_t pa)88 static inline void qh_set_element_td(qh_t *instance, td_t *td) 88 89 { 89 if (pa && ((pa & LINK_POINTER_TERMINATE_FLAG) == 0)) { 90 uint32_t pa = addr_to_phys(td); 91 if (pa) { 90 92 instance->element = LINK_POINTER_TD(pa); 91 93 } else { … … 93 95 } 94 96 } 95 96 97 #endif 97 98 /**
Note:
See TracChangeset
for help on using the changeset viewer.