Ignore:
Timestamp:
2011-04-08T21:54:12Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
b854e56
Parents:
96b8f322
Message:

Implement endpoint descriptor initialization

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/ohci/hw_struct/endpoint_descriptor.h

    r96b8f322 r7786cea  
    3838#include <stdint.h>
    3939
     40#include <usb/host/endpoint.h>
     41
    4042#include "utils/malloc32.h"
    4143
     
    5254#define ED_STATUS_D_IN (0x1)
    5355#define ED_STATUS_D_OUT (0x2)
     56#define ED_STATUS_D_TRANSFER (0x3)
    5457
    55 #define ED_STATUS_S_FLAG (1 << 13) /* speed flag */
     58#define ED_STATUS_S_FLAG (1 << 13) /* speed flag: 1 = low */
    5659#define ED_STATUS_K_FLAG (1 << 14) /* skip flag (no not execute this ED) */
    5760#define ED_STATUS_F_FLAG (1 << 15) /* format: 1 = isochronous*/
     
    7578} __attribute__((packed)) ed_t;
    7679
    77 static inline void ed_init_dummy(ed_t *instance)
     80void ed_init(ed_t *instance, endpoint_t *ep);
     81
     82static inline void ed_add_tds(ed_t *instance, uint32_t head, uint32_t tail)
    7883{
    7984        assert(instance);
    80         bzero(instance, sizeof(ed_t));
    81         instance->status |= ED_STATUS_K_FLAG;
     85        instance->td_head = head & ED_TDHEAD_PTR_MASK;
     86        instance->td_tail = tail & ED_TDTAIL_PTR_MASK;
    8287}
    8388
Note: See TracChangeset for help on using the changeset viewer.