blob: f7df82c1deca8ee476a98a1eee0950050507717b [file] [log] [blame]
#ifndef __USB_API_H__
#define __USB_API_H__
/******************************************************************************
*
* (C)Copyright 2005 - 2011 Marvell. All Rights Reserved.
*
* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL.
* The copyright notice above does not evidence any actual or intended
* publication of such source code.
* This Module contains Proprietary Information of Marvell and should be
* treated as Confidential.
* The information in this file is provided for the exclusive use of the
* licensees of Marvell.
* Such users have the right to use, modify, and incorporate this code into
* products for purposes authorized by the license agreement provided they
* include this notice and the associated copyright notice with any such
* product.
* The information in this file is provided "AS IS" without warranty.
******************************************************************************
**
** FILENAME: Media.h
**
** PURPOSE: Holds all Media related definitions
**
******************************************************************************/
#include "general.h"
#include "Typedef.h"
#define MAX_USB_DEVICES 2
typedef struct
{
UINT valid;
UINT bootNum;
UINT interruptNum;
UINT maxpacketsize;
//pointer to the USB Interrupt routine
void (*USB_ISR) (UINT IntNum);
//pointer to the USB Send routine
void (*USB_Send) (UINT *buffer, UINT size, void * pUsbApi);
//pointer to the USB Receive routine
void (*USB_Receive) (UINT *buffer, UINT size, void * pUsbApi);
//pointer to the Shutdown routine
void (*USB_Shutdown) (UINT32 IntNum);
} USBAPI_T, *P_USBAPI_T;
//Prototypes
UINT USBAPI_InitializeDevice(UINT DeviceType);
void USBAPI_ISR(UINT IntNum);
P_USBAPI_T GetUSBAPIhandle_InterruptNum(UINT InterruptNum);
P_USBAPI_T GetUSBAPIhandle_BootNum(UINT BootNum);
P_USBAPI_T CreateUSBAPIhandle(UINT DeviceType);
void USBAPI_ShutdownAll(void);
int get_usb_speed_mode(void);
int get_usb_phy_mode(void);
void set_usb_speed_and_phy_mode(void);
#endif