Changeset 4c70554 in mainline for uspace/drv/uhci-hcd/hw_struct/queue_head.h
- Timestamp:
- 2011-04-13T19:06:11Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade
- Children:
- 9d2d444
- Parents:
- a0a134b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci-hcd/hw_struct/queue_head.h
ra0a134b r4c70554 34 34 #ifndef DRV_UHCI_QH_H 35 35 #define DRV_UHCI_QH_H 36 37 /* libc */38 36 #include <assert.h> 39 37 40 38 #include "link_pointer.h" 39 #include "utils/malloc32.h" 41 40 42 41 typedef struct queue_head { … … 67 66 * NULL. 68 67 */ 69 static inline void qh_set_next_qh(qh_t *instance, uint32_t pa)68 static inline void qh_set_next_qh(qh_t *instance, qh_t *next) 70 69 { 71 70 /* Address is valid and not terminal */ 72 if (pa && ((pa & LINK_POINTER_TERMINATE_FLAG) == 0)) { 71 uint32_t pa = addr_to_phys(next); 72 if (pa) { 73 73 instance->next = LINK_POINTER_QH(pa); 74 74 } else { 75 75 instance->next = LINK_POINTER_TERM; 76 }77 }78 /*----------------------------------------------------------------------------*/79 /** Set queue head element pointer80 *81 * @param[in] instance qh_t structure to initialize.82 * @param[in] pa Physical address of the next queue head.83 *84 * Adds proper flag. If the pointer is NULL or terminal, sets element85 * to terminal NULL.86 */87 static inline void qh_set_element_qh(qh_t *instance, uint32_t pa)88 {89 /* Address is valid and not terminal */90 if (pa && ((pa & LINK_POINTER_TERMINATE_FLAG) == 0)) {91 instance->element = LINK_POINTER_QH(pa);92 } else {93 instance->element = LINK_POINTER_TERM;94 76 } 95 77 }
Note:
See TracChangeset
for help on using the changeset viewer.