Changeset 3515533 in mainline for uspace/drv/uhci/uhci.h


Ignore:
Timestamp:
2010-12-17T22:07:41Z (14 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
18e35a7
Parents:
6b5f3b0
Message:

start of coding

root hub driver checks for devices
all addresses are hardcoded

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/uhci/uhci.h

    r6b5f3b0 r3515533  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2010 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2626 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    2727 */
    28 
    2928/** @addtogroup usb
    3029 * @{
     
    3635#define DRV_UHCI_UHCI_H
    3736
     37#include <fibril.h>
     38
     39#include <usb/addrkeep.h>
     40#include <usb/hcdhubd.h>
    3841#include <usbhc_iface.h>
    3942
    40 #define NAME "uhci"
     43#include "root_hub/root_hub.h"
    4144
    42 usbhc_iface_t uhci_iface;
     45typedef struct uhci_regs {
     46        uint16_t usbcmd;
     47        uint16_t usbsts;
     48        uint16_t usbintr;
     49        uint16_t frnum;
     50        uint32_t flbaseadd;
     51        uint8_t sofmod;
     52} regs_t;
     53
     54typedef struct uhci {
     55        usb_address_keeping_t address_manager;
     56        uhci_root_hub_t root_hub;
     57        volatile regs_t* registers;
     58
     59} uhci_t ;
     60
     61/* init uhci specifics in device.driver_data */
     62int uhci_init( device_t *device, void *regs );
     63
     64int uhci_destroy( device_t *device );
     65
     66int uhci_in(
     67  device_t *dev,
     68        usb_target_t target,
     69        usb_transfer_type_t transfer_type,
     70        void *buffer, size_t size,
     71        usbhc_iface_transfer_in_callback_t callback, void *arg
     72        );
     73
     74int uhci_out(
     75  device_t *dev,
     76        usb_target_t target,
     77  usb_transfer_type_t transfer_type,
     78  void *buffer, size_t size,
     79        usbhc_iface_transfer_out_callback_t callback, void *arg
     80  );
     81
     82int uhci_setup(
     83  device_t *dev,
     84  usb_target_t target,
     85  usb_transfer_type_t transfer_type,
     86  void *buffer, size_t size,
     87  usbhc_iface_transfer_out_callback_t callback, void *arg
     88  );
    4389
    4490#endif
Note: See TracChangeset for help on using the changeset viewer.