yuezonghe | 824eb0c | 2024-06-27 02:32:26 -0700 | [diff] [blame^] | 1 | /*******************************************************************************
|
| 2 | * Copyright (C) 2007, ZTE Corporation.
|
| 3 | *
|
| 4 | * File Name: hal_spi.h
|
| 5 | * File Mark:
|
| 6 | * Description: Provide spi hal function prototype declaration and type declaration.
|
| 7 | * Others:
|
| 8 | * Version: V0.5
|
| 9 | * Author: zhenghong
|
| 10 | * Date: 2008-03-19
|
| 11 | * History 1:
|
| 12 | * Date:
|
| 13 | * Version:
|
| 14 | * Author:
|
| 15 | * Modification:
|
| 16 | * History 2:
|
| 17 | ********************************************************************************/
|
| 18 |
|
| 19 | #ifndef _USB_DETECT_H
|
| 20 | #define _USB_DETECT_H
|
| 21 |
|
| 22 | #ifdef __cplusplus
|
| 23 | extern "C" {
|
| 24 | #endif
|
| 25 |
|
| 26 | /****************************************************************************
|
| 27 | * Include files
|
| 28 | ****************************************************************************/
|
| 29 | #include "drvs_gpio.h"
|
| 30 | /****************************************************************************
|
| 31 | * Macros
|
| 32 | ****************************************************************************/
|
| 33 | #define USB_ENUM_DEBUG_EN 1
|
| 34 | /**
|
| 35 | * Messages sent from the Phy to the OTG driver.
|
| 36 | *
|
| 37 | */
|
| 38 | typedef enum _T_UsbHal_ConnectMessage
|
| 39 | {
|
| 40 | CONNECTED_TO_HOST = 0x10, /**< Host connect detected */
|
| 41 | DISCONNECTED_FROM_HOST, /**< Host disconnect detected */
|
| 42 | CONNECTED_TO_DEVICE, /**< Function connect detected */
|
| 43 | DISCONNECTED_FROM_DEVICE, /**< Function disconnect detected */
|
| 44 | CHECK_CONNECT_MODE,
|
| 45 | CHECK_CONNECT_QUICK_POWER_ON,
|
| 46 | RECONNECT_TO_HOST
|
| 47 | }T_UsbHal_ConnectMessage;
|
| 48 |
|
| 49 | typedef enum _T_UsbHal_ConnectionState {
|
| 50 | USB_DEVICE_UNPLUGGED=0,
|
| 51 | USB_DEVICE_PLUGGED
|
| 52 | } T_UsbHal_ConnectionState;
|
| 53 |
|
| 54 | typedef enum _T_plug_in
|
| 55 | {
|
| 56 | NOTHING,
|
| 57 | COMPUTER,
|
| 58 | CHARGER
|
| 59 | }plug_in;
|
| 60 | /****************************************************************************
|
| 61 | * Types
|
| 62 | ****************************************************************************/
|
| 63 | typedef SINT32 (*T_ZDrvUSBRef_ChargerDetect_CallBack)(UINT32);
|
| 64 | /****************************************************************************
|
| 65 | * Constants
|
| 66 | ****************************************************************************/
|
| 67 |
|
| 68 | /****************************************************************************
|
| 69 | * Global Variables
|
| 70 | ****************************************************************************/
|
| 71 | extern T_ZDrvUSBRef_ChargerDetect_CallBack g_USBRef_ChargerDetect;
|
| 72 | /****************************************************************************
|
| 73 | * Function Prototypes
|
| 74 | ****************************************************************************/
|
| 75 | SINT32 zDrvUsbRef_Detect_Initiate(VOID);
|
| 76 |
|
| 77 | #ifdef __cplusplus
|
| 78 | }
|
| 79 | #endif
|
| 80 |
|
| 81 | #endif /*_HAL_SPI_H*/
|