📄 usbuser.h
字号:
/*----------------------------------------------------------------------------
* U S B - K e r n e l
*----------------------------------------------------------------------------
* Name: USBUSER.H
* Purpose: USB Custom User Definitions
* Version: V1.00
*----------------------------------------------------------------------------
* This file is part of the uVision/ARM development tools.
* Copyright (c) 2005 Keil Software. All rights reserved.
*---------------------------------------------------------------------------*/
#ifndef __USBUSER_H__
#define __USBUSER_H__
/* USB Events Callback Functions */
extern void USB_Power_Event (BOOL power);
extern void USB_Reset_Event (void);
extern void USB_Suspend_Event (void);
extern void USB_Resume_Event (void);
extern void USB_WakeUp_Event (void);
extern void USB_SOF_Event (DWORD frame);
extern void USB_Error_Event (DWORD error);
/* USB Error Codes */
#define USB_ERR_PID 1 /* PID Encoding Error */
#define USB_ERR_CRC 2 /* Packet CRC Error */
#define USB_ERR_BIT_STUFF 3 /* Bit Stuff Error */
#define USB_ERR_TIMEOUT 4 /* Bus Time-out Error */
#define USB_ERR_EOP 5 /* End of Packet Error */
#define USB_ERR_DATA_TOGGLE 6 /* Data Toggle Error */
#define USB_ERR_BABBLE 7 /* Babble Error */
#define USB_ERR_LOA 8 /* Loss of Activity Error */
/* USB Enpoint Callback Events */
#define USB_EVT_SETUP 1
#define USB_EVT_OUT 2
#define USB_EVT_IN 3
#define USB_EVT_OUT_NAK 4
#define USB_EVT_IN_NAK 5
#define USB_EVT_OUT_STALL 6
#define USB_EVT_IN_STALL 7
/* USB Endpoint Events Callback Pointers */
extern const void (*USB_P_EP[16])(DWORD event);
/* USB Endpoint Events Callback Functions */
extern void USB_EndPoint0 (DWORD event);
extern void USB_EndPoint1 (DWORD event);
extern void USB_EndPoint2 (DWORD event);
extern void USB_EndPoint3 (DWORD event);
extern void USB_EndPoint4 (DWORD event);
extern void USB_EndPoint5 (DWORD event);
extern void USB_EndPoint6 (DWORD event);
extern void USB_EndPoint7 (DWORD event);
extern void USB_EndPoint8 (DWORD event);
extern void USB_EndPoint9 (DWORD event);
extern void USB_EndPoint10 (DWORD event);
extern void USB_EndPoint11 (DWORD event);
extern void USB_EndPoint12 (DWORD event);
extern void USB_EndPoint13 (DWORD event);
extern void USB_EndPoint14 (DWORD event);
extern void USB_EndPoint15 (DWORD event);
/* USB Device Request Events Callback Functions */
extern void USB_Configure_Event (void);
extern void USB_Interface_Event (void);
extern void USB_Feature_Event (void);
#endif /* __USBUSER_H__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -