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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usb_core.h

?? st公司的開發板的資料
?? 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****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91首页免费视频| 99免费精品视频| 欧美一区二区三区的| 视频一区在线播放| 国产亚洲美州欧州综合国| jlzzjlzz欧美大全| 成人综合在线网站| 亚洲香肠在线观看| 久久精品一区二区三区av| 精品久久久久久亚洲综合网| 色综合久久久久久久久| 蜜臀a∨国产成人精品| |精品福利一区二区三区| 日韩午夜小视频| 色综合久久天天综合网| 91蝌蚪porny九色| 欧美日韩中文另类| 丰满少妇在线播放bd日韩电影| 亚洲午夜免费电影| 日本不卡免费在线视频| 亚洲美女区一区| 自拍偷拍国产亚洲| 日韩欧美在线1卡| 久久婷婷国产综合国色天香| 欧美色爱综合网| 日韩三级视频在线看| 中文字幕欧美激情一区| 日韩欧美国产综合一区 | 欧美日韩综合一区| 欧美美女bb生活片| av欧美精品.com| 7878成人国产在线观看| 欧美性三三影院| 在线观看中文字幕不卡| 国产电影一区在线| 国产一区二区三区免费| 蜜臂av日日欢夜夜爽一区| 国产精品456| 国产成人精品影视| 欧美日韩亚洲综合一区 | 国产香蕉久久精品综合网| 亚洲人成小说网站色在线| 日韩主播视频在线| eeuss鲁一区二区三区| 日韩免费观看高清完整版在线观看| 国产精品毛片无遮挡高清| 久久精品一二三| 一区二区三区精品| 五月婷婷综合网| 日韩精品一级二级| 99久久99久久精品国产片果冻| 成人av综合在线| av成人免费在线观看| 日韩写真欧美这视频| 亚洲美女在线国产| 亚洲天堂免费在线观看视频| 91精品国产综合久久香蕉的特点| 亚洲成人免费在线| 亚洲va欧美va人人爽| 午夜精品一区二区三区电影天堂| 丝袜亚洲另类欧美| 丁香婷婷综合激情五月色| 欧美日本高清视频在线观看| 在线观看91精品国产入口| 亚洲精品在线三区| 国产精品久久久久久户外露出 | 日韩精品一卡二卡三卡四卡无卡| 粉嫩蜜臀av国产精品网站| 日韩欧美一级二级| 天堂久久久久va久久久久| 色噜噜狠狠成人网p站| 欧美高清视频一二三区| 亚洲午夜免费电影| 欧美日韩一区二区三区不卡| 亚洲激情图片小说视频| 精品一区二区三区欧美| 国产一区二区三区免费| 日韩欧美你懂的| 亚洲国产一区二区a毛片| 99久久精品免费| 国产精品大尺度| 北条麻妃一区二区三区| 亚洲丝袜精品丝袜在线| 色婷婷综合久久久久中文| 亚洲免费观看视频| 欧美猛男超大videosgay| 亚洲国产精品麻豆| 91麻豆精品久久久久蜜臀| 午夜国产精品影院在线观看| 91.xcao| 亚洲女与黑人做爰| 欧美这里有精品| 午夜在线成人av| 欧美日韩国产综合一区二区三区 | 日韩电影在线观看网站| 日韩精品电影在线| 91精品国产全国免费观看| 日韩成人免费看| www国产成人免费观看视频 深夜成人网| 精品在线一区二区| 亚洲丝袜制服诱惑| 欧美一区二区在线不卡| 国产精品99久久久久久有的能看| 日本一二三不卡| 欧美婷婷六月丁香综合色| 午夜久久久久久电影| 久久久无码精品亚洲日韩按摩| 中文字幕 久热精品 视频在线| 色播五月激情综合网| 亚洲电影一级黄| 中文字幕av一区 二区| 欧美日精品一区视频| 国产一区二区看久久| 亚洲综合无码一区二区| 在线影视一区二区三区| 精品一区二区三区蜜桃| 色狠狠av一区二区三区| 亚洲一区在线观看网站| 国产精品一品二品| 中文在线免费一区三区高中清不卡| 91论坛在线播放| 精品一区免费av| 亚洲自拍偷拍欧美| 国产精品久久久久久户外露出| 欧美日韩国产综合一区二区| 成人黄色软件下载| 毛片av中文字幕一区二区| 亚洲另类在线视频| 国产精品视频yy9299一区| 日韩情涩欧美日韩视频| 色综合久久99| 国产成人精品网址| 极品少妇xxxx精品少妇| 午夜精品久久久久影视| 一区二区三区精品在线观看| 久久九九国产精品| 欧美精品一区男女天堂| 欧美一级欧美一级在线播放| 欧洲亚洲精品在线| 91国产精品成人| 9l国产精品久久久久麻豆| 免费精品视频在线| 日日夜夜免费精品| 天堂午夜影视日韩欧美一区二区| 亚洲线精品一区二区三区| 亚洲乱码国产乱码精品精小说| 国产精品三级久久久久三级| 欧美国产精品专区| 久久久久国产精品麻豆| 久久久国产精华| 国产欧美一区二区精品性| 成人av中文字幕| 成人激情免费视频| 99久久婷婷国产综合精品| 成人免费视频一区| av在线播放成人| 欧洲一区二区三区在线| 欧美亚洲国产bt| 69精品人人人人| 欧美成人官网二区| 国产色产综合产在线视频| 亚洲国产精品v| 一区二区三区在线视频观看| 亚洲va欧美va国产va天堂影院| 亚洲成人av电影在线| 石原莉奈在线亚洲二区| 激情综合五月天| 成人综合在线网站| 欧美色精品天天在线观看视频| 欧美日韩精品一区二区天天拍小说 | 一区二区三区成人| 亚洲午夜日本在线观看| 美女视频黄频大全不卡视频在线播放| 精品一区二区三区欧美| 成人免费视频一区二区| 在线观看区一区二| 精品国产乱码久久久久久1区2区| 亚洲国产精品高清| 亚洲最大的成人av| 久久99精品久久久久久| 91热门视频在线观看| 日韩小视频在线观看专区| 国产欧美日韩亚州综合| 午夜精品一区二区三区三上悠亚| 国内外成人在线| 免费黄网站欧美| 成人av电影在线| 日韩一区二区影院| 亚洲另类在线制服丝袜| 另类小说欧美激情| 精品亚洲porn| 91九色最新地址| 国产亚洲一二三区| 午夜久久福利影院| 91色porny在线视频| 精品日本一线二线三线不卡| 亚洲人一二三区| 国产91精品露脸国语对白| 制服丝袜中文字幕亚洲| 日韩美女视频19|