These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers usbuser.h Source File

usbuser.h

00001 /*----------------------------------------------------------------------------
00002  *      U S B  -  K e r n e l
00003  *----------------------------------------------------------------------------
00004  *      Name:    USBUSER.H
00005  *      Purpose: USB Custom User Definitions
00006  *      Version: V1.10
00007  *----------------------------------------------------------------------------
00008  *      This software is supplied "AS IS" without any warranties, express,
00009  *      implied or statutory, including but not limited to the implied
00010  *      warranties of fitness for purpose, satisfactory quality and
00011  *      noninfringement. Keil extends you a royalty-free right to reproduce
00012  *      and distribute executable files created using this software for use
00013  *      on NXP Semiconductors LPC family microcontroller devices only. Nothing 
00014  *      else gives you the right to use this software.
00015  *
00016  *      Copyright (c) 2005-2009 Keil Software.
00017  *---------------------------------------------------------------------------*/
00018 
00019 #ifndef __USBUSER_H__
00020 #define __USBUSER_H__
00021 
00022 
00023 /* USB Device Events Callback Functions */
00024 extern void USB_Power_Event     (uint32_t  power);
00025 extern void USB_Reset_Event     (void);
00026 extern void USB_Suspend_Event   (void);
00027 extern void USB_Resume_Event    (void);
00028 extern void USB_WakeUp_Event    (void);
00029 extern void USB_SOF_Event       (void);
00030 extern void USB_Error_Event     (uint32_t error);
00031 
00032 /* USB Endpoint Callback Events */
00033 #define USB_EVT_SETUP       1   /* Setup Packet */
00034 #define USB_EVT_OUT         2   /* OUT Packet */
00035 #define USB_EVT_IN          3   /*  IN Packet */
00036 #define USB_EVT_OUT_NAK     4   /* OUT Packet - Not Acknowledged */
00037 #define USB_EVT_IN_NAK      5   /*  IN Packet - Not Acknowledged */
00038 #define USB_EVT_OUT_STALL   6   /* OUT Packet - Stalled */
00039 #define USB_EVT_IN_STALL    7   /*  IN Packet - Stalled */
00040 #define USB_EVT_OUT_DMA_EOT 8   /* DMA OUT EP - End of Transfer */
00041 #define USB_EVT_IN_DMA_EOT  9   /* DMA  IN EP - End of Transfer */
00042 #define USB_EVT_OUT_DMA_NDR 10  /* DMA OUT EP - New Descriptor Request */
00043 #define USB_EVT_IN_DMA_NDR  11  /* DMA  IN EP - New Descriptor Request */
00044 #define USB_EVT_OUT_DMA_ERR 12  /* DMA OUT EP - Error */
00045 #define USB_EVT_IN_DMA_ERR  13  /* DMA  IN EP - Error */
00046 
00047 /* USB Endpoint Events Callback Pointers */
00048 extern void (* const USB_P_EP[16])(uint32_t event);
00049 
00050 /* USB Endpoint Events Callback Functions */
00051 extern void USB_EndPoint0  (uint32_t event);
00052 extern void USB_EndPoint1  (uint32_t event);
00053 extern void USB_EndPoint2  (uint32_t event);
00054 extern void USB_EndPoint3  (uint32_t event);
00055 extern void USB_EndPoint4  (uint32_t event);
00056 extern void USB_EndPoint5  (uint32_t event);
00057 extern void USB_EndPoint6  (uint32_t event);
00058 extern void USB_EndPoint7  (uint32_t event);
00059 extern void USB_EndPoint8  (uint32_t event);
00060 extern void USB_EndPoint9  (uint32_t event);
00061 extern void USB_EndPoint10 (uint32_t event);
00062 extern void USB_EndPoint11 (uint32_t event);
00063 extern void USB_EndPoint12 (uint32_t event);
00064 extern void USB_EndPoint13 (uint32_t event);
00065 extern void USB_EndPoint14 (uint32_t event);
00066 extern void USB_EndPoint15 (uint32_t event);
00067 
00068 /* USB Core Events Callback Functions */
00069 extern void USB_Configure_Event (void);
00070 extern void USB_Interface_Event (void);
00071 extern void USB_Feature_Event   (void);
00072 
00073 
00074 #endif  /* __USBUSER_H__ */