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

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

?? usb_core.h

?? STM32F10xxx 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****/

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
五月天亚洲精品| 亚洲制服丝袜一区| 国产精品国产自产拍高清av王其| 亚洲天堂av老司机| 麻豆视频一区二区| 色综合久久综合中文综合网| 日韩精品一区二区三区三区免费 | 国产日韩三级在线| 图片区小说区区亚洲影院| 国产不卡视频在线观看| 欧美日韩二区三区| 亚洲精品久久久蜜桃| 欧洲生活片亚洲生活在线观看| 日韩av一级电影| 成人国产亚洲欧美成人综合网 | 久久久精品中文字幕麻豆发布| 亚洲成人综合视频| 91在线视频播放| 久久久精品免费免费| 亚洲国产视频直播| 色婷婷av一区二区三区之一色屋| 久久久久99精品国产片| 麻豆极品一区二区三区| 欧美精品自拍偷拍动漫精品| 亚洲精品中文在线影院| 成人黄色777网| 中文成人av在线| 国产成+人+日韩+欧美+亚洲| xfplay精品久久| 久久疯狂做爰流白浆xx| 7777女厕盗摄久久久| 亚洲成人激情社区| 欧美探花视频资源| 亚洲综合色婷婷| 欧美三级乱人伦电影| 亚洲妇熟xx妇色黄| 欧美日韩国产片| 丝袜亚洲另类欧美综合| 91麻豆精品国产91久久久久久久久| 亚洲午夜激情网页| 久久影院视频免费| 理论片日本一区| 久久亚洲免费视频| 国产91丝袜在线18| 国产精品高潮呻吟久久| 99v久久综合狠狠综合久久| 亚洲色图19p| 在线观看免费亚洲| 日韩经典中文字幕一区| 日韩欧美高清一区| 丁香激情综合国产| 最新中文字幕一区二区三区 | 国产精品国产三级国产普通话99| 成人福利视频网站| 亚洲黄色小视频| 91超碰这里只有精品国产| 日韩国产精品久久久久久亚洲| 日韩欧美成人一区| 丁香婷婷深情五月亚洲| 一区二区三区国产精华| 91精品国产麻豆| 国产白丝精品91爽爽久久 | 亚洲成人在线观看视频| 日韩视频在线一区二区| 欧美一区二区免费| 亚洲天堂av老司机| 欧美中文字幕一区| 美腿丝袜亚洲一区| 国产欧美日韩中文久久| 色中色一区二区| 日韩国产在线观看一区| 久久久99精品久久| 色综合久久综合网欧美综合网 | 一区二区三区中文字幕电影| 在线综合+亚洲+欧美中文字幕| 国产精品综合久久| 亚洲综合丁香婷婷六月香| 精品国产网站在线观看| 91视频在线观看| 天堂久久一区二区三区| 欧美日韩精品高清| 国产精品66部| 同产精品九九九| 欧美国产禁国产网站cc| 欧美猛男超大videosgay| 国产成人自拍在线| 日本中文在线一区| 中文字幕日韩欧美一区二区三区| 日韩一卡二卡三卡| 色素色在线综合| 国产高清精品网站| 美女在线一区二区| 亚洲影视在线观看| 国产精品精品国产色婷婷| 欧美一区二区三区免费观看视频| 99精品视频在线观看| 国产成人a级片| 秋霞电影网一区二区| 一区二区三区成人| 国产精品国产三级国产普通话蜜臀| 日韩一区二区三区在线观看| 欧美午夜一区二区三区 | 成人av资源在线| 久久99国产精品免费| 婷婷久久综合九色综合伊人色| 亚洲另类一区二区| 亚洲欧美一区二区在线观看| 国产欧美日产一区| 久久综合网色—综合色88| 欧美一级日韩免费不卡| 在线成人小视频| 欧美日韩国产高清一区二区三区| 91色在线porny| 91在线免费看| 99riav一区二区三区| 99久久综合狠狠综合久久| 成人激情免费视频| 不卡的av网站| 91啪亚洲精品| 91极品视觉盛宴| 欧洲一区在线电影| 欧美日韩中字一区| 欧美精品自拍偷拍动漫精品| 欧美电影一区二区三区| 91精品福利在线一区二区三区| 91精品国产色综合久久ai换脸| 99精品国产91久久久久久| 丁香激情综合国产| 粉嫩蜜臀av国产精品网站| 国产a区久久久| 成人白浆超碰人人人人| av成人免费在线| 一本大道久久a久久综合婷婷 | 免费观看一级特黄欧美大片| 青青草91视频| 韩国av一区二区三区四区| 国产99一区视频免费| 成人app在线| 色噜噜狠狠一区二区三区果冻| 欧美日韩一区二区三区视频 | 亚洲成人一二三| 9人人澡人人爽人人精品| 粉嫩aⅴ一区二区三区四区| 国产91精品久久久久久久网曝门| zzijzzij亚洲日本少妇熟睡| 91国产免费观看| 日韩一区二区三免费高清| 欧美久久久久久久久中文字幕| 一区二区久久久久| 五月天中文字幕一区二区| 美女在线观看视频一区二区| 国产成人av资源| 一本一道综合狠狠老| 日韩欧美第一区| 1024亚洲合集| 免费观看在线综合| 成人黄色一级视频| 91精品国产一区二区三区| 国产亚洲精久久久久久| 亚洲一区二区四区蜜桃| 韩国女主播一区| 色哟哟国产精品| 久久在线免费观看| 亚洲一区二区三区四区在线免费观看 | 91日韩一区二区三区| 91精品国产入口| 综合av第一页| 狠狠色丁香久久婷婷综合丁香| 色婷婷精品久久二区二区蜜臀av| 日韩一级大片在线观看| 有码一区二区三区| 国产精品1区二区.| 91精品国产91综合久久蜜臀| 国产精品久久久久久久午夜片| 日本视频中文字幕一区二区三区| 国产aⅴ综合色| 日韩精品一区二区三区在线播放 | 欧美顶级少妇做爰| 一区二区三区在线免费| 欧美亚一区二区| 日韩三级精品电影久久久| 亚洲欧美国产毛片在线| 国产美女精品在线| 7777精品久久久大香线蕉| 亚洲人一二三区| 国产成人免费xxxxxxxx| 精品国产在天天线2019| 婷婷六月综合网| 欧美亚洲国产bt| 一区二区三区中文免费| 欧美日韩一区三区| 亚洲女同ⅹxx女同tv| 成人免费视频app| 欧美经典一区二区| 国产精品一品二品| 欧美刺激午夜性久久久久久久| 亚洲h动漫在线| 欧美日韩一区在线观看| 亚洲高清中文字幕| 欧美日韩国产另类一区|