28 #define USB_ERR_PID 0x0001
29 #define USB_ERR_UEPKT 0x0002
30 #define USB_ERR_DCRC 0x0004
31 #define USB_ERR_TIMOUT 0x0008
32 #define USB_ERR_EOP 0x0010
33 #define USB_ERR_B_OVRN 0x0020
34 #define USB_ERR_BTSTF 0x0040
35 #define USB_ERR_TGL 0x0080
38 extern void USBIOClkConfig (
void);
39 extern void USB_Init (
void);
40 extern void USB_Connect (uint32_t con);
41 extern void USB_Reset (
void);
42 extern void USB_Suspend (
void);
43 extern void USB_Resume (
void);
44 extern void USB_WakeUp (
void);
45 extern void USB_WakeUpCfg (uint32_t cfg);
46 extern void USB_SetAddress (uint32_t adr);
47 extern void USB_Configure (uint32_t cfg);
48 extern void USB_ConfigEP (USB_ENDPOINT_DESCRIPTOR *pEPD);
49 extern void USB_DirCtrlEP (uint32_t dir);
50 extern void USB_EnableEP (uint32_t EPNum);
51 extern void USB_DisableEP (uint32_t EPNum);
52 extern void USB_ResetEP (uint32_t EPNum);
53 extern void USB_SetStallEP (uint32_t EPNum);
54 extern void USB_ClrStallEP (uint32_t EPNum);
55 extern void USB_ClearEPBuf (uint32_t EPNum);
56 extern uint32_t USB_ReadEP (uint32_t EPNum, uint8_t *pData);
57 extern uint32_t USB_WriteEP (uint32_t EPNum, uint8_t *pData, uint32_t cnt);
58 extern uint32_t USB_GetFrame(
void);
59 extern void USB_IRQHandler (
void);
61 extern void USB_IRQ (
void);