Ignore:
Timestamp:
2011-03-11T15:42:43Z (14 years ago)
Author:
Matej Klonfar <maklf@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
0bd4810c
Parents:
60a228f (diff), a8def7d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

merge with hidd

File:
1 moved

Legend:

Unmodified
Added
Removed
  • uspace/lib/drv/include/pci_dev_iface.h

    r60a228f r9d9ffdd  
    11/*
    2  * Copyright (c) 2010 Vojtech Horky
     2 * Copyright (c) 2011 Jan Vesely
    33 * All rights reserved.
    44 *
     
    2727 */
    2828
    29 /** @addtogroup libusb
     29/** @addtogroup libdrv
     30 * @addtogroup usb
    3031 * @{
    3132 */
    3233/** @file
    33  * @brief Common definitions for both HC driver and hub driver.
     34 * @brief PCI device interface definition.
    3435 */
    35 #ifndef LIBUSB_HCDHUBD_PRIVATE_H_
    36 #define LIBUSB_HCDHUBD_PRIVATE_H_
    3736
    38 #define USB_HUB_DEVICE_NAME "usbhub"
    39 #define USB_KBD_DEVICE_NAME "hid"
     37#ifndef LIBDRV_PCI_DEV_IFACE_H_
     38#define LIBDRV_PCI_DEV_IFACE_H_
    4039
    41 extern link_t hc_list;
    42 extern usb_hc_driver_t *hc_driver;
     40#include "ddf/driver.h"
    4341
    44 extern usbhc_iface_t usbhc_interface;
     42typedef enum {
     43        IPC_M_CONFIG_SPACE_READ_8,
     44        IPC_M_CONFIG_SPACE_READ_16,
     45        IPC_M_CONFIG_SPACE_READ_32,
    4546
    46 usb_address_t usb_get_address_by_handle(devman_handle_t);
    47 int usb_add_hc_device(device_t *);
     47        IPC_M_CONFIG_SPACE_WRITE_8,
     48        IPC_M_CONFIG_SPACE_WRITE_16,
     49        IPC_M_CONFIG_SPACE_WRITE_32
     50} pci_dev_iface_funcs_t;
    4851
    49 /** lowest allowed usb address */
    50 extern int usb_lowest_address;
     52/** PCI device communication interface. */
     53typedef struct {
     54        int (*config_space_read_8)(ddf_fun_t *, uint32_t address, uint8_t *data);
     55        int (*config_space_read_16)(ddf_fun_t *, uint32_t address, uint16_t *data);
     56        int (*config_space_read_32)(ddf_fun_t *, uint32_t address, uint32_t *data);
    5157
    52 /** highest allowed usb address */
    53 extern int usb_highest_address;
    54 
    55 /**
    56  * @brief initialize address list of given hcd
    57  *
    58  * This function should be used only for hcd initialization.
    59  * It creates interval list of free addresses, thus it is initialized as
    60  * list with one interval with whole address space. Using an address shrinks
    61  * the interval, freeing an address extends an interval or creates a
    62  * new one.
    63  *
    64  * @param hcd
    65  * @return
    66  */
    67 void  usb_create_address_list(usb_hc_device_t * hcd);
    68 
    69 
    70 
    71 
     58        int (*config_space_write_8)(ddf_fun_t *, uint32_t address, uint8_t data);
     59        int (*config_space_write_16)(ddf_fun_t *, uint32_t address, uint16_t data);
     60        int (*config_space_write_32)(ddf_fun_t *, uint32_t address, uint32_t data);
     61} pci_dev_iface_t;
    7262
    7363
     
    7666 * @}
    7767 */
     68
Note: See TracChangeset for help on using the changeset viewer.