亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? usb_core.h

?? USB程序
?? H
字號:
/******************** (C) COPYRIGHT 2007 STMicroelectronics ********************
* File Name          : usb_core.h
* Author             : MCD Application Team
* Version            : V1.0
* Date               : 10/08/2007
* Description        : Standard protocol processing functions prototypes
********************************************************************************
* THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
* WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
* AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
* INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
* CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
* INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
*******************************************************************************/

/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __USB_CORE_H
#define __USB_CORE_H

/* Includes ------------------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum _CONTROL_STATE
{
  WAIT_SETUP,       /* 0 */
  SETTING_UP,       /* 1 */
  IN_DATA,          /* 2 */
  OUT_DATA,         /* 3 */
  LAST_IN_DATA,     /* 4 */
  LAST_OUT_DATA,    /* 5 */
  WAIT_STATUS_IN,   /* 7 */
  WAIT_STATUS_OUT,  /* 8 */
  STALLED,          /* 9 */
  PAUSE             /* 10 */
} CONTROL_STATE;    /* The state machine states of a control pipe */

typedef struct OneDescriptor
{
  u8 *Descriptor;
  u16 Descriptor_Size;
}
ONE_DESCRIPTOR, *PONE_DESCRIPTOR;
/* All the request process routines return a value of this type
   If the return value is not SUCCESS or NOT_READY,
   the software will STALL the correspond endpoint */
typedef enum _RESULT
{
  USB_SUCCESS = 0,    /* Process sucessfully */
  USB_ERROR,
  USB_UNSUPPORT,
  USB_NOT_READY       /* The process has not been finished, endpoint will be
                         NAK to further rquest */
} RESULT;


/*-*-*-*-*-*-*-*-*-*-* Definitions for endpoint level -*-*-*-*-*-*-*-*-*-*-*-*/
typedef struct _ENDPOINT_INFO
{
  /* When send data out of the device,
   CopyData() is used to get data buffer 'Length' bytes data
   if Length is 0,
    CopyData() returns the total length of the data
    if the request is not supported, returns 0
    (NEW Feature )
     if CopyData() returns -1, the calling routine should not proceed
     further and will resume the SETUP process by the class device
   if Length is not 0,
    CopyData() returns a pointer to indicate the data location
   Usb_wLength is the data remain to be sent,
   Usb_wOffset is the Offset of original data
  When receive data from the host,
   CopyData() is used to get user data buffer which is capable
   of Length bytes data to copy data from the endpoint buffer.
   if Length is 0,
    CopyData() returns the available data length,
   if Length is not 0,
    CopyData() returns user buffer address
   Usb_rLength is the data remain to be received,
   Usb_rPointer is the Offset of data buffer
  */
  u16  Usb_wLength;
  u16  Usb_wOffset;
  u16  PacketSize;
  u8   *(*CopyData)(u16 Length);
}
ENDPOINT_INFO;

/*-*-*-*-*-*-*-*-*-*-*-* Definitions for device level -*-*-*-*-*-*-*-*-*-*-*-*/

typedef struct _DEVICE
{
  u8 Total_Endpoint;     /* Number of endpoints that are used */
  u8 Total_Configuration;/* Number of configuration available */
}
DEVICE;

typedef union
{
  u16 w;
  struct BW
  {
    u8 bb1;
    u8 bb0;
  }
  bw;
} u16_u8;

typedef struct _DEVICE_INFO
{
  u8 USBbmRequestType;       /* bmRequestType */
  u8 USBbRequest;            /* bRequest */
  u16_u8 USBwValues;         /* wValue */
  u16_u8 USBwIndexs;         /* wIndex */
  u16_u8 USBwLengths;        /* wLength */

  u8 ControlState;           /* of type CONTROL_STATE */
  u8 Current_Feature;
  u8 Current_Configuration;   /* Selected configuration */
  u8 Current_Interface;       /* Selected interface of current configuration */
  u8 Current_AlternateSetting;/* Selected Alternate Setting of current
                                     interface*/

  ENDPOINT_INFO Ctrl_Info;
}
DEVICE_INFO;

typedef struct _DEVICE_PROP
{
  void (*Init)(void);        /* Initialize the device */
  void (*Reset)(void);       /* Reset routine of this device */

  /* Device dependent process after the status stage */
  void (*Process_Status_IN)(void);
  void (*Process_Status_OUT)(void);

  /* Procedure of process on setup stage of a class specified request with data stage */
  /* All class specified requests with data stage are processed in Class_Data_Setup
   Class_Data_Setup()
    responses to check all special requests and fills ENDPOINT_INFO
    according to the request
    If IN tokens are expected, then wLength & wOffset will be filled
    with the total transferring bytes and the starting position
    If OUT tokens are expected, then rLength & rOffset will be filled
    with the total expected bytes and the starting position in the buffer

    If the request is valid, Class_Data_Setup returns SUCCESS, else UNSUPPORT

   CAUTION:
    Since GET_CONFIGURATION & GET_INTERFACE are highly related to
    the individual classes, they will be checked and processed here.
  */
  RESULT (*Class_Data_Setup)(u8 RequestNo);

  /* Procedure of process on setup stage of a class specified request without data stage */
  /* All class specified requests without data stage are processed in Class_NoData_Setup
   Class_NoData_Setup
    responses to check all special requests and perform the request

   CAUTION:
    Since SET_CONFIGURATION & SET_INTERFACE are highly related to
    the individual classes, they will be checked and processed here.
  */
  RESULT (*Class_NoData_Setup)(u8 RequestNo);

  /*Class_Get_Interface_Setting
   This function is used by the file usb_core.c to test if the selected Interface
   and Alternate Setting (u8 Interface, u8 AlternateSetting) are supported by
   the application.
   This function is writing by user. It should return "SUCCESS" if the Interface
   and Alternate Setting are supported by the application or "UNSUPPORT" if they
   are not supported. */

  RESULT  (*Class_Get_Interface_Setting)(u8 Interface, u8 AlternateSetting);

  u8* (*GetDeviceDescriptor)(u16 Length);
  u8* (*GetConfigDescriptor)(u16 Length);
  u8* (*GetStringDescriptor)(u16 Length);

  u8* RxEP_buffer;
  u8 MaxPacketSize;

}
DEVICE_PROP;

typedef struct _USER_STANDARD_REQUESTS
{
  void (*User_GetConfiguration)(void);       /* Get Configuration */
  void (*User_SetConfiguration)(void);       /* Set Configuration */
  void (*User_GetInterface)(void);           /* Get Interface */
  void (*User_SetInterface)(void);           /* Set Interface */
  void (*User_GetStatus)(void);              /* Get Status */
  void (*User_ClearFeature)(void);           /* Clear Feature */
  void (*User_SetEndPointFeature)(void);     /* Set Endpoint Feature */
  void (*User_SetDeviceFeature)(void);       /* Set Device Feature */
  void (*User_SetDeviceAddress)(void);       /* Set Device Address */
}
USER_STANDARD_REQUESTS;

/* Exported constants --------------------------------------------------------*/
#define Type_Recipient (pInformation->USBbmRequestType & (REQUEST_TYPE | RECIPIENT))

#define Usb_rLength Usb_wLength
#define Usb_rOffset Usb_wOffset

#define USBwValue USBwValues.w
#define USBwValue0 USBwValues.bw.bb0
#define USBwValue1 USBwValues.bw.bb1
#define USBwIndex USBwIndexs.w
#define USBwIndex0 USBwIndexs.bw.bb0
#define USBwIndex1 USBwIndexs.bw.bb1
#define USBwLength USBwLengths.w
#define USBwLength0 USBwLengths.bw.bb0
#define USBwLength1 USBwLengths.bw.bb1

/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
u8 Setup0_Process(void);
u8 Post0_Process(void);
u8 Out0_Process(void);
u8 In0_Process(void);

RESULT Standard_SetEndPointFeature(void);
RESULT Standard_SetDeviceFeature(void);

u8 *Standard_GetConfiguration(u16 Length);
RESULT Standard_SetConfiguration(void);
u8 *Standard_GetInterface(u16 Length);
RESULT Standard_SetInterface(void);
u8 *Standard_GetDescriptorData(u16 Length, PONE_DESCRIPTOR pDesc);

u8 *Standard_GetStatus(u16 Length);
RESULT Standard_ClearFeature(void);
void SetDeviceAddress(u8);
void NOP_Process(void);

extern DEVICE_PROP Device_Property;
extern  USER_STANDARD_REQUESTS User_Standard_Requests;
extern  DEVICE  Device_Table;
extern DEVICE_INFO Device_Info;

/* cells saving status during interrupt servicing */
extern u16 SaveRState;
extern u16 SaveTState;

#endif /* __USB_CORE_H */

/******************* (C) COPYRIGHT 2007 STMicroelectronics *****END OF FILE****/

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天堂蜜桃91精品| 亚洲精品久久久久久国产精华液| 亚洲色图色小说| 捆绑变态av一区二区三区| 成人黄色小视频在线观看| 日韩欧美一区在线| 一区二区三区不卡视频在线观看 | 精品国产青草久久久久福利| 一区二区三区自拍| 国产91丝袜在线播放| 制服丝袜国产精品| 一区二区三区免费| 成人听书哪个软件好| 精品福利二区三区| 日本成人在线看| 欧美精品日日鲁夜夜添| 亚洲女同一区二区| 成人h版在线观看| 久久精品男人天堂av| 开心九九激情九九欧美日韩精美视频电影 | 亚洲国产cao| 92国产精品观看| 中文字幕va一区二区三区| 国模套图日韩精品一区二区| 91精品国产综合久久精品app | 国产精品久久久久毛片软件| 激情欧美一区二区| 欧美成人精品1314www| 日韩精品一二三区| 欧美高清视频在线高清观看mv色露露十八| 亚洲欧美视频在线观看视频| 99视频热这里只有精品免费| 中文字幕高清一区| 国产精品一区二区三区四区| 日韩西西人体444www| 日本不卡不码高清免费观看| 欧美日韩国产高清一区二区三区| 亚洲成a人片在线不卡一二三区 | 成人国产在线观看| 国产精品色哟哟| 成人午夜精品一区二区三区| 国产欧美一区二区在线观看| 国产成人在线电影| 国产视频一区二区在线| 国产成人综合网| 国产精品伦一区| 99久久99久久免费精品蜜臀| 综合自拍亚洲综合图不卡区| 91在线视频18| 亚洲激情中文1区| 欧洲亚洲国产日韩| 亚洲v精品v日韩v欧美v专区| 欧美丰满嫩嫩电影| 久久国产精品免费| 久久麻豆一区二区| 高清国产一区二区| 中文字幕一区二| 在线观看一区二区视频| 亚洲第一会所有码转帖| 欧美精品色一区二区三区| 麻豆成人免费电影| 国产亚洲午夜高清国产拍精品| 国产精品123| 亚洲乱码国产乱码精品精小说| 欧洲精品一区二区| 日本视频一区二区| 久久综合国产精品| 成人成人成人在线视频| 亚洲激情欧美激情| 欧美美女一区二区三区| 久草中文综合在线| 亚洲国产精品激情在线观看| 色综合中文字幕| 丝袜美腿亚洲一区| 久久午夜免费电影| 99re热这里只有精品视频| 亚洲地区一二三色| 精品国产乱码久久久久久图片 | 色网站国产精品| 日日骚欧美日韩| 久久精品人人做人人爽人人| 91蝌蚪porny成人天涯| 日韩高清欧美激情| 国产网站一区二区三区| 91国偷自产一区二区三区成为亚洲经典 | 国产精品视频yy9299一区| 日本精品视频一区二区三区| 美女www一区二区| 国产精品国模大尺度视频| 欧美日韩一区二区三区在线看| 精品在线播放免费| 亚洲女同ⅹxx女同tv| 精品少妇一区二区三区视频免付费 | 日本中文在线一区| 国产精品久久久久久久久免费相片| 欧美影院一区二区| 国产乱码精品一品二品| 亚洲最快最全在线视频| 欧美精品一区二区不卡| 91国产精品成人| 国产一区二区精品在线观看| 亚洲成人在线观看视频| 久久精品人人做人人爽97| 91.成人天堂一区| 99re视频精品| 国产在线视频不卡二| 亚洲亚洲人成综合网络| 国产午夜精品理论片a级大结局| 欧美高清一级片在线| 91婷婷韩国欧美一区二区| 精品一区二区久久久| 亚洲五月六月丁香激情| 国产精品另类一区| 精品少妇一区二区三区| 欧美视频中文字幕| 成人黄色777网| 国内外精品视频| 天天影视涩香欲综合网| 成人免费小视频| 久久九九国产精品| 日韩欧美在线观看一区二区三区| 91久久国产综合久久| 成人激情图片网| 国产一区二区三区日韩| 日韩va亚洲va欧美va久久| 亚洲视频精选在线| 欧美极品美女视频| 精品精品国产高清一毛片一天堂| 欧美日韩一区二区三区四区五区 | 9l国产精品久久久久麻豆| 狠狠v欧美v日韩v亚洲ⅴ| 五月天视频一区| 亚洲美女偷拍久久| 中文字幕在线视频一区| 国产亚洲制服色| 精品久久久久久久久久久久久久久久久| 在线日韩国产精品| 91日韩一区二区三区| youjizz国产精品| 粉嫩在线一区二区三区视频| 国产一区二区在线观看免费| 免费在线观看一区二区三区| 日韩成人精品在线| 轻轻草成人在线| 五月综合激情日本mⅴ| 亚洲午夜免费福利视频| 一区二区三区欧美视频| 亚洲欧美一区二区三区孕妇| 中文字幕一区二区在线观看| 亚洲国产经典视频| 国产欧美精品日韩区二区麻豆天美| www激情久久| 精品处破学生在线二十三| 欧美成人性战久久| 欧美电影免费观看高清完整版在线观看| 欧美一二三区在线| 日韩三级中文字幕| 欧美一区二区三区婷婷月色| 91精品国产欧美一区二区18| 91精品视频网| 日韩你懂的在线观看| 亚洲精品在线电影| 久久久一区二区| 中文字幕精品—区二区四季| 国产精品对白交换视频 | 欧美岛国在线观看| 久久香蕉国产线看观看99| 国产欧美日韩综合精品一区二区 | 欧美日本一区二区三区四区 | 成人一级视频在线观看| 成人福利电影精品一区二区在线观看| 成人午夜伦理影院| 一本高清dvd不卡在线观看| 91国产福利在线| 欧美裸体一区二区三区| 欧美mv日韩mv亚洲| 国产日韩在线不卡| 日韩理论片中文av| 亚洲国产裸拍裸体视频在线观看乱了| 亚洲成a人在线观看| 久久99精品国产| 成人晚上爱看视频| 在线观看亚洲精品| 日韩一区二区中文字幕| 国产日韩欧美精品一区| 亚洲色图欧美偷拍| 天天综合色天天| 国产电影精品久久禁18| 91国偷自产一区二区三区成为亚洲经典 | 精品一二三四在线| 成人app网站| 6080日韩午夜伦伦午夜伦| 精品精品国产高清a毛片牛牛| 国产精品人成在线观看免费| 一二三四社区欧美黄| 免费观看日韩电影| 不卡视频一二三| 欧美高清一级片在线| 国产日韩精品一区二区三区 | 亚洲动漫第一页|