Changeset bae9e76 in mainline for uspace/drv/uhci/uhci_struct/queue_head.h
- Timestamp:
- 2011-01-25T18:09:20Z (12 years ago)
- Branches:
- lfn, master, serial
- Children:
- d5f7a8ab
- Parents:
- 643b983
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/drv/uhci/uhci_struct/queue_head.h
r643b983 rbae9e76 38 38 #include <assert.h> 39 39 40 #include "translating_malloc.h"41 40 #include "link_pointer.h" 42 41 … … 46 45 } __attribute__((packed)) queue_head_t; 47 46 48 static inline void queue_head_init(queue_head_t *instance, uint32_t next_ pa)47 static inline void queue_head_init(queue_head_t *instance, uint32_t next_queue_pa) 49 48 { 50 49 assert(instance); 51 assert((next_ pa & 0xf) == 0);50 assert((next_queue_pa & LINK_POINTER_ADDRESS_MASK) == next_queue_pa); 52 51 53 memset(instance, 0, sizeof(*instance)); 54 instance->element.terminate = 1; 55 if (next_pa) { 56 instance->next_queue.terminate = 0; 57 instance->next_queue.addr = next_pa >> 4; 52 instance->element = 0 | LINK_POINTER_TERMINATE_FLAG; 53 if (next_queue_pa) { 54 instance->next_queue = (next_queue_pa & LINK_POINTER_ADDRESS_MASK) 55 | LINK_POINTER_QUEUE_HEAD_FLAG; 58 56 } else { 59 instance-> element.terminate = 1;57 instance->next_queue = 0 | LINK_POINTER_TERMINATE_FLAG; 60 58 } 61 59 }
Note: See TracChangeset
for help on using the changeset viewer.