亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区| 精品久久久久一区| 国产精品综合网| 欧美韩日一区二区三区| proumb性欧美在线观看| 一区二区三区小说| 欧美日韩黄色影视| 久久99精品久久久久婷婷| 久久久电影一区二区三区| 成人的网站免费观看| 亚洲一区二区在线观看视频 | 精品国产第一区二区三区观看体验| 欧美aaaaa成人免费观看视频| 欧美电影免费观看高清完整版在线 | 成人涩涩免费视频| 亚洲最大的成人av| 日韩欧美电影在线| 成人免费看的视频| 亚洲v中文字幕| 久久综合精品国产一区二区三区 | 91蜜桃在线免费视频| 亚洲欧美成aⅴ人在线观看| 欧美在线视频全部完| 免费成人你懂的| 国产精品久线在线观看| 6080亚洲精品一区二区| 国产99久久久国产精品| 亚洲一区在线观看视频| 日韩免费一区二区| 95精品视频在线| 天堂久久久久va久久久久| 久久精品视频免费| 欧美精品色一区二区三区| 国产精品一区二区在线观看不卡 | 欧美色精品在线视频| 国产精品一区在线观看乱码| 亚洲制服丝袜一区| 国产亚洲视频系列| 69精品人人人人| 午夜欧美电影在线观看| av亚洲精华国产精华精华| 日韩一区二区三区av| 国产在线精品免费| 亚洲午夜视频在线观看| 国产日产欧美一区| 欧美一区二区三区四区久久| 91美女在线看| 国产精品夜夜嗨| 午夜伦欧美伦电影理论片| 日韩一区日韩二区| 久久网站热最新地址| 欧美猛男男办公室激情| 91老师国产黑色丝袜在线| 国产原创一区二区三区| 视频在线观看国产精品| 亚洲视频一区二区在线观看| 337p日本欧洲亚洲大胆精品| 91精品欧美福利在线观看| 欧美在线视频不卡| 色视频欧美一区二区三区| 国产成人综合在线播放| 日韩有码一区二区三区| 亚洲精品视频在线观看网站| 亚洲欧洲成人精品av97| 中文字幕免费在线观看视频一区| 精品国产乱码久久久久久图片| 7777精品伊人久久久大香线蕉| 在线观看一区二区精品视频| 99久久久精品免费观看国产蜜| 国产91对白在线观看九色| 黄色日韩三级电影| 国产在线国偷精品产拍免费yy| 极品美女销魂一区二区三区免费| 日韩精品乱码av一区二区| 亚洲成av人影院| 亚洲成av人片一区二区三区| 同产精品九九九| 亚洲成人在线网站| 日韩成人一级片| 日本麻豆一区二区三区视频| 男人的天堂久久精品| 日韩av一区二| 国产做a爰片久久毛片| 国产精品夜夜嗨| 成人app下载| 色妞www精品视频| 欧美视频你懂的| 91精品国产色综合久久不卡蜜臀| 欧美精品 国产精品| 日韩午夜电影av| 国产日韩精品一区二区三区| 国产精品久久久久久久浪潮网站| 亚洲女同女同女同女同女同69| 1024亚洲合集| 亚洲国产综合91精品麻豆| 亚洲va国产va欧美va观看| 老司机一区二区| 成人视屏免费看| 欧美中文字幕一区二区三区| 日韩午夜激情av| 国产精品污网站| 亚洲网友自拍偷拍| 激情偷乱视频一区二区三区| 粉嫩aⅴ一区二区三区四区五区| 91影院在线观看| 欧美丰满一区二区免费视频| 日韩欧美的一区| 国产精品视频yy9299一区| 亚洲图片有声小说| 国产麻豆成人传媒免费观看| av中文字幕不卡| 欧美日韩日本视频| 国产免费观看久久| 亚洲 欧美综合在线网络| 国产福利精品一区| 欧美主播一区二区三区美女| 久久久久97国产精华液好用吗| 亚洲欧美另类在线| 久久精品国产久精国产爱| 不卡视频免费播放| 91精品麻豆日日躁夜夜躁| 亚洲国产电影在线观看| 日韩高清在线观看| 国产成人av电影在线观看| 欧美午夜一区二区三区| 久久久不卡影院| 秋霞影院一区二区| 色综合中文字幕| 久久久久久久久久久久久夜| 亚洲国产精品久久人人爱| 波多野结衣在线一区| 日韩一区二区电影网| 亚洲国产视频一区二区| 成人黄色一级视频| 2020日本不卡一区二区视频| 午夜精品久久久久久| 99精品视频在线观看免费| 日韩精品一区二区三区视频 | 国产区在线观看成人精品| 日韩极品在线观看| 色域天天综合网| 国产三级久久久| 免费在线观看成人| 欧美日韩免费观看一区三区| 国产精品电影一区二区三区| 狠狠久久亚洲欧美| 欧美一区二区性放荡片| 亚洲高清久久久| 在线一区二区三区做爰视频网站| 国产欧美日韩在线看| 精品一区二区三区的国产在线播放| 99国产精品99久久久久久| 中文幕一区二区三区久久蜜桃| 久久99久久久久| 日韩三级中文字幕| 亚洲成人资源在线| 欧美色视频一区| 亚洲成人一二三| 欧美日韩一二区| 午夜精品福利在线| 91精品国产综合久久精品性色 | 久久综合九色综合欧美98| 另类调教123区| 欧美成人猛片aaaaaaa| 免费成人美女在线观看| 91精品国产综合久久蜜臀| 青青草一区二区三区| 7777精品伊人久久久大香线蕉 | 色综合中文字幕国产| 久久久91精品国产一区二区三区| 美女视频黄频大全不卡视频在线播放| 欧美色网一区二区| 日韩电影在线一区| 日韩一级完整毛片| 久久爱www久久做| 久久久久成人黄色影片| 成人免费视频app| 亚洲视频在线一区| 欧美色爱综合网| 婷婷综合在线观看| 欧美成人精品3d动漫h| 狠狠色2019综合网| 中文字幕乱码久久午夜不卡| 91啪亚洲精品| 偷窥少妇高潮呻吟av久久免费| 欧美一级国产精品| 国产高清不卡一区| 亚洲欧洲中文日韩久久av乱码| 欧美色综合网站| 精品亚洲成a人| 亚洲欧洲一区二区三区| 欧美日韩国产123区| 国内外精品视频| 亚洲手机成人高清视频| 欧美久久高跟鞋激| 国产精品一二一区|