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

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

?? usb_core.h

?? 基于CORTEX-M3內核的stm32f10x芯片的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一区二区三区免费野_久草精品视频
久久蜜桃香蕉精品一区二区三区| 白白色 亚洲乱淫| 欧美电影一区二区| 日韩有码一区二区三区| 日韩免费观看高清完整版 | 日韩午夜在线播放| 美女www一区二区| 久久精品日产第一区二区三区高清版| 国产精品一二三| 136国产福利精品导航| 欧洲日韩一区二区三区| 首页国产欧美日韩丝袜| 欧美va在线播放| 成人免费毛片片v| 一区二区三区四区乱视频| 欧美日韩夫妻久久| 韩国三级电影一区二区| ...xxx性欧美| 欧美一区二区三区视频免费播放| 国产一级精品在线| 一区二区三区四区精品在线视频| 日韩一区二区三| 99精品视频一区二区| 亚洲成av人片一区二区梦乃| 亚洲精品一区二区三区在线观看| 91丨porny丨国产| 日韩福利视频网| 国产精品网站在线观看| 欧美一区二区人人喊爽| 波多野结衣中文字幕一区二区三区| 亚洲一区二区在线免费观看视频| 精品少妇一区二区三区日产乱码| 99精品热视频| 精品一区二区三区在线观看| 18欧美亚洲精品| 欧美精品一区二区三区蜜桃 | 久久精品二区亚洲w码| 国产精品久线在线观看| 日韩一级片在线观看| 成人h精品动漫一区二区三区| 日韩中文字幕不卡| 亚洲三级小视频| 26uuu亚洲婷婷狠狠天堂| 日本高清成人免费播放| 国产成人h网站| 秋霞午夜鲁丝一区二区老狼| 亚洲人精品一区| 久久美女艺术照精彩视频福利播放 | 成人午夜免费电影| 奇米影视在线99精品| 一区二区三区免费网站| 久久精品亚洲精品国产欧美kt∨ | 国产成人免费在线视频| 婷婷综合另类小说色区| 亚洲视频一区二区在线观看| 国产欧美一区二区三区在线看蜜臀| 欧美色网站导航| 91亚洲国产成人精品一区二三 | 懂色av一区二区在线播放| 久久99国产精品成人| 婷婷一区二区三区| 亚洲国产精品人人做人人爽| 亚洲欧美一区二区三区极速播放 | 亚洲美女屁股眼交3| 日本一区二区三区四区| 久久伊人蜜桃av一区二区| 日韩一级片在线观看| 欧美丰满少妇xxxxx高潮对白| 在线亚洲高清视频| 在线日韩av片| 色综合av在线| 色妞www精品视频| jlzzjlzz亚洲日本少妇| 福利电影一区二区| 成人高清伦理免费影院在线观看| 国产一区二区电影| 国产精品一区二区视频| 国产成人综合在线播放| 国产精品中文字幕日韩精品| 国产一区二区美女诱惑| 国内精品久久久久影院色| 国产在线精品一区二区不卡了| 激情图区综合网| 国产真实乱子伦精品视频| 国产一区美女在线| 国产成人免费网站| 99re成人精品视频| 日本韩国欧美国产| 欧美日本韩国一区二区三区视频 | 精品久久国产97色综合| 久久久99免费| 日本一区二区在线不卡| 国产精品国产三级国产a | 欧美日韩精品免费观看视频| 欧美日韩三级视频| 日韩视频国产视频| 精品国产免费久久| 国产精品电影一区二区三区| 一区二区视频免费在线观看| 天堂av在线一区| 国产一区日韩二区欧美三区| www.99精品| 欧美亚一区二区| 日韩精品在线网站| 国产精品女人毛片| 一区二区久久久| 免费精品99久久国产综合精品| 久久99精品久久久久久| 成人精品视频网站| 欧美日韩一级视频| 久久亚洲综合av| 亚洲黄色av一区| 久久精品二区亚洲w码| 99国内精品久久| 91精品国产综合久久久久| 亚洲国产成人自拍| 三级一区在线视频先锋 | 99久久综合精品| 欧美伦理影视网| 国产午夜精品在线观看| 亚洲国产乱码最新视频 | 亚洲高清免费在线| 国产高清无密码一区二区三区| 91福利小视频| 国产免费成人在线视频| 日韩av中文在线观看| 99免费精品在线| 精品国产伦一区二区三区免费 | 中文字幕一区二区三区不卡| 午夜av区久久| av在线不卡电影| 精品免费99久久| 亚洲女同ⅹxx女同tv| 国产乱码精品一品二品| 欧美午夜不卡在线观看免费| 国产欧美久久久精品影院| 石原莉奈一区二区三区在线观看| av影院午夜一区| 精品播放一区二区| 午夜不卡av在线| 日本精品一区二区三区四区的功能| 精品粉嫩aⅴ一区二区三区四区| 亚洲午夜久久久久久久久电影院 | 欧美乱妇一区二区三区不卡视频| 欧美激情一区二区三区蜜桃视频 | 国产精品视频在线看| 蜜桃av一区二区三区| 欧美日精品一区视频| 成人欧美一区二区三区小说| 国产一区二区中文字幕| 在线不卡一区二区| 性欧美疯狂xxxxbbbb| 91日韩在线专区| 中文字幕在线免费不卡| 国产成人综合自拍| 国产视频一区在线播放| 久久国产生活片100| 日韩视频一区在线观看| 日韩精品久久久久久| 欧美吞精做爰啪啪高潮| 亚洲综合色噜噜狠狠| 日本精品免费观看高清观看| 亚洲人午夜精品天堂一二香蕉| 成人一道本在线| 国产网站一区二区| 国产成人精品免费| 亚洲国产精品黑人久久久| 国产高清不卡一区| 久久久久九九视频| 国产精品1区二区.| 欧美国产日韩一二三区| 成人黄色在线看| 国产精品超碰97尤物18| av在线综合网| 一区二区三区电影在线播| 国产欧美精品国产国产专区 | 国产精品2024| 国产欧美日韩视频在线观看| 成人一区二区三区中文字幕| 最新不卡av在线| 91黄色免费版| 亚洲高清免费观看| 91精品麻豆日日躁夜夜躁| 美腿丝袜亚洲一区| 欧美精品一区二区久久婷婷| 国产一区 二区 三区一级| 国产精品网站导航| 91女神在线视频| 亚洲v日本v欧美v久久精品| 日韩午夜电影在线观看| 国产成人在线色| 亚洲欧美一区二区视频| 精品视频全国免费看| 免费xxxx性欧美18vr| 国产日韩欧美一区二区三区乱码| www.欧美亚洲| 日韩成人dvd| 国产女人aaa级久久久级| 精品视频在线看| 国产精品88888|