1 /*----------------------------------------------------------------------------
3 *----------------------------------------------------------------------------
5 * Purpose: USB Hardware Layer Definitions
7 *----------------------------------------------------------------------------
8 * This software is supplied "AS IS" without any warranties, express,
9 * implied or statutory, including but not limited to the implied
10 * warranties of fitness for purpose, satisfactory quality and
11 * noninfringement. Keil extends you a royalty-free right to reproduce
12 * and distribute executable files created using this software for use
13 * on NXP Semiconductors LPC microcontroller devices only. Nothing else
14 * gives you the right to use this software.
16 * Copyright (c) 2009 Keil - An ARM Company. All rights reserved.
17 *----------------------------------------------------------------------------
19 * V1.20 Added USB_ClearEPBuf
20 * V1.00 Initial Version
21 *----------------------------------------------------------------------------*/
28 #define USB_ERR_PID 0x0001 /* PID Error */
29 #define USB_ERR_UEPKT 0x0002 /* Unexpected Packet */
30 #define USB_ERR_DCRC 0x0004 /* Data CRC Error */
31 #define USB_ERR_TIMOUT 0x0008 /* Bus Time-out Error */
32 #define USB_ERR_EOP 0x0010 /* End of Packet Error */
33 #define USB_ERR_B_OVRN 0x0020 /* Buffer Overrun */
34 #define USB_ERR_BTSTF 0x0040 /* Bit Stuff Error */
35 #define USB_ERR_TGL 0x0080 /* Toggle Bit Error */
37 /* USB Hardware Functions */
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);
62 #endif /* __USBHW_H__ */
This page took 0.049393 seconds and 5 git commands to generate.