b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame^] | 1 | #ifndef __USB_API_H__ |
| 2 | #define __USB_API_H__ |
| 3 | /****************************************************************************** |
| 4 | * |
| 5 | * (C)Copyright 2005 - 2011 Marvell. All Rights Reserved. |
| 6 | * |
| 7 | * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MARVELL. |
| 8 | * The copyright notice above does not evidence any actual or intended |
| 9 | * publication of such source code. |
| 10 | * This Module contains Proprietary Information of Marvell and should be |
| 11 | * treated as Confidential. |
| 12 | * The information in this file is provided for the exclusive use of the |
| 13 | * licensees of Marvell. |
| 14 | * Such users have the right to use, modify, and incorporate this code into |
| 15 | * products for purposes authorized by the license agreement provided they |
| 16 | * include this notice and the associated copyright notice with any such |
| 17 | * product. |
| 18 | * The information in this file is provided "AS IS" without warranty. |
| 19 | |
| 20 | ****************************************************************************** |
| 21 | ** |
| 22 | ** FILENAME: Media.h |
| 23 | ** |
| 24 | ** PURPOSE: Holds all Media related definitions |
| 25 | ** |
| 26 | ******************************************************************************/ |
| 27 | |
| 28 | #include "general.h" |
| 29 | #include "Typedef.h" |
| 30 | |
| 31 | #define MAX_USB_DEVICES 2 |
| 32 | |
| 33 | typedef struct |
| 34 | { |
| 35 | UINT valid; |
| 36 | UINT bootNum; |
| 37 | UINT interruptNum; |
| 38 | UINT maxpacketsize; |
| 39 | |
| 40 | //pointer to the USB Interrupt routine |
| 41 | void (*USB_ISR) (UINT IntNum); |
| 42 | //pointer to the USB Send routine |
| 43 | void (*USB_Send) (UINT *buffer, UINT size, void * pUsbApi); |
| 44 | //pointer to the USB Receive routine |
| 45 | void (*USB_Receive) (UINT *buffer, UINT size, void * pUsbApi); |
| 46 | //pointer to the Shutdown routine |
| 47 | void (*USB_Shutdown) (UINT32 IntNum); |
| 48 | } USBAPI_T, *P_USBAPI_T; |
| 49 | |
| 50 | |
| 51 | //Prototypes |
| 52 | UINT USBAPI_InitializeDevice(UINT DeviceType); |
| 53 | void USBAPI_ISR(UINT IntNum); |
| 54 | P_USBAPI_T GetUSBAPIhandle_InterruptNum(UINT InterruptNum); |
| 55 | P_USBAPI_T GetUSBAPIhandle_BootNum(UINT BootNum); |
| 56 | P_USBAPI_T CreateUSBAPIhandle(UINT DeviceType); |
| 57 | void USBAPI_ShutdownAll(void); |
| 58 | int get_usb_speed_mode(void); |
| 59 | int get_usb_phy_mode(void); |
| 60 | void set_usb_speed_and_phy_mode(void); |
| 61 | #endif |