blob: ade0c4328dcfbd9dc825fc42d90724e7cd649be0 [file] [log] [blame]
yuezonghe824eb0c2024-06-27 02:32:26 -07001/*******************************************************************************
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
23extern "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*/
38typedef 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
49typedef enum _T_UsbHal_ConnectionState {
50 USB_DEVICE_UNPLUGGED=0,
51 USB_DEVICE_PLUGGED
52} T_UsbHal_ConnectionState;
53
54typedef enum _T_plug_in
55{
56 NOTHING,
57 COMPUTER,
58 CHARGER
59}plug_in;
60/****************************************************************************
61* Types
62****************************************************************************/
63typedef SINT32 (*T_ZDrvUSBRef_ChargerDetect_CallBack)(UINT32);
64/****************************************************************************
65* Constants
66****************************************************************************/
67
68/****************************************************************************
69* Global Variables
70****************************************************************************/
71extern T_ZDrvUSBRef_ChargerDetect_CallBack g_USBRef_ChargerDetect;
72/****************************************************************************
73* Function Prototypes
74****************************************************************************/
75SINT32 zDrvUsbRef_Detect_Initiate(VOID);
76
77#ifdef __cplusplus
78}
79#endif
80
81#endif /*_HAL_SPI_H*/