lfn
serial
ticket/834-toolchain-update
topic/msim-upgrade
topic/simplify-dev-export
Last change
on this file since b00163f was 89a0485a, checked in by Jan Vesely <jano.vesely@…>, 14 years ago |
Move function implementations to .c files
Unify error reporting in uhci_in()
|
-
Property mode
set to
100644
|
File size:
734 bytes
|
Rev | Line | |
---|
[89a0485a] | 1 | #include <errno.h>
|
---|
| 2 |
|
---|
| 3 | #include "transfer_list.h"
|
---|
| 4 |
|
---|
| 5 | int transfer_list_init(transfer_list_t *instance, transfer_list_t *next)
|
---|
| 6 | {
|
---|
| 7 | assert(instance);
|
---|
| 8 | instance->first = NULL;
|
---|
| 9 | instance->last = NULL;
|
---|
| 10 | instance->queue_head = trans_malloc(sizeof(queue_head_t));
|
---|
| 11 | if (!instance->queue_head) {
|
---|
| 12 | uhci_print_error("Failed to allocate queue head.\n");
|
---|
| 13 | return ENOMEM;
|
---|
| 14 | }
|
---|
| 15 | instance->queue_head_pa = (uintptr_t)addr_to_phys(instance->queue_head);
|
---|
| 16 |
|
---|
| 17 | uint32_t next_pa = next ? next->queue_head_pa : 0;
|
---|
| 18 | queue_head_init(instance->queue_head, next_pa);
|
---|
| 19 | return EOK;
|
---|
| 20 | }
|
---|
| 21 | /*----------------------------------------------------------------------------*/
|
---|
| 22 | int transfer_list_append(
|
---|
| 23 | transfer_list_t *instance, transfer_descriptor_t *transfer)
|
---|
| 24 | {
|
---|
| 25 | return EOK;
|
---|
| 26 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.