These are the examples provided for [[/users/frank26080115/libraries/LPC1700CMSIS_Lib/]] Note, the entire "program" is not compilable!
usbcfg.h
00001 /*---------------------------------------------------------------------------- 00002 * U S B - K e r n e l 00003 *---------------------------------------------------------------------------- 00004 * Name: usbcfg.h 00005 * Purpose: USB Custom Configuration 00006 * Version: V1.20 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) 2009 Keil - An ARM Company. All rights reserved. 00017 *---------------------------------------------------------------------------- 00018 * History: 00019 * V1.20 Added vendor specific support 00020 * V1.00 Initial Version 00021 *----------------------------------------------------------------------------*/ 00022 00023 #ifndef __USBCFG_H__ 00024 #define __USBCFG_H__ 00025 00026 00027 //*** <<< Use Configuration Wizard in Context Menu >>> *** 00028 00029 00030 /* 00031 // <h> USB Configuration 00032 // <o0> USB Power 00033 // <i> Default Power Setting 00034 // <0=> Bus-powered 00035 // <1=> Self-powered 00036 // <o1> Max Number of Interfaces <1-256> 00037 // <o2> Max Number of Endpoints <1-32> 00038 // <o3> Max Endpoint 0 Packet Size 00039 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes 00040 // <e4> DMA Transfer 00041 // <i> Use DMA for selected Endpoints 00042 // <o5.0> Endpoint 0 Out 00043 // <o5.1> Endpoint 0 In 00044 // <o5.2> Endpoint 1 Out 00045 // <o5.3> Endpoint 1 In 00046 // <o5.4> Endpoint 2 Out 00047 // <o5.5> Endpoint 2 In 00048 // <o5.6> Endpoint 3 Out 00049 // <o5.7> Endpoint 3 In 00050 // <o5.8> Endpoint 4 Out 00051 // <o5.9> Endpoint 4 In 00052 // <o5.10> Endpoint 5 Out 00053 // <o5.11> Endpoint 5 In 00054 // <o5.12> Endpoint 6 Out 00055 // <o5.13> Endpoint 6 In 00056 // <o5.14> Endpoint 7 Out 00057 // <o5.15> Endpoint 7 In 00058 // <o5.16> Endpoint 8 Out 00059 // <o5.17> Endpoint 8 In 00060 // <o5.18> Endpoint 9 Out 00061 // <o5.19> Endpoint 9 In 00062 // <o5.20> Endpoint 10 Out 00063 // <o5.21> Endpoint 10 In 00064 // <o5.22> Endpoint 11 Out 00065 // <o5.23> Endpoint 11 In 00066 // <o5.24> Endpoint 12 Out 00067 // <o5.25> Endpoint 12 In 00068 // <o5.26> Endpoint 13 Out 00069 // <o5.27> Endpoint 13 In 00070 // <o5.28> Endpoint 14 Out 00071 // <o5.29> Endpoint 14 In 00072 // <o5.30> Endpoint 15 Out 00073 // <o5.31> Endpoint 15 In 00074 // </e> 00075 // </h> 00076 */ 00077 00078 #define USB_POWER 0 00079 #define USB_IF_NUM 4 00080 #define USB_EP_NUM 32 00081 #define USB_MAX_PACKET0 64 00082 #define USB_DMA 0 00083 #define USB_DMA_EP 0x00000040 00084 00085 00086 /* 00087 // <h> USB Event Handlers 00088 // <h> Device Events 00089 // <o0.0> Power Event 00090 // <o1.0> Reset Event 00091 // <o2.0> Suspend Event 00092 // <o3.0> Resume Event 00093 // <o4.0> Remote Wakeup Event 00094 // <o5.0> Start of Frame Event 00095 // <o6.0> Error Event 00096 // </h> 00097 // <h> Endpoint Events 00098 // <o7.0> Endpoint 0 Event 00099 // <o7.1> Endpoint 1 Event 00100 // <o7.2> Endpoint 2 Event 00101 // <o7.3> Endpoint 3 Event 00102 // <o7.4> Endpoint 4 Event 00103 // <o7.5> Endpoint 5 Event 00104 // <o7.6> Endpoint 6 Event 00105 // <o7.7> Endpoint 7 Event 00106 // <o7.8> Endpoint 8 Event 00107 // <o7.9> Endpoint 9 Event 00108 // <o7.10> Endpoint 10 Event 00109 // <o7.11> Endpoint 11 Event 00110 // <o7.12> Endpoint 12 Event 00111 // <o7.13> Endpoint 13 Event 00112 // <o7.14> Endpoint 14 Event 00113 // <o7.15> Endpoint 15 Event 00114 // </h> 00115 // <h> USB Core Events 00116 // <o8.0> Set Configuration Event 00117 // <o9.0> Set Interface Event 00118 // <o10.0> Set/Clear Feature Event 00119 // </h> 00120 // </h> 00121 */ 00122 00123 #define USB_POWER_EVENT 0 00124 #define USB_RESET_EVENT 1 00125 #define USB_SUSPEND_EVENT 0 00126 #define USB_RESUME_EVENT 0 00127 #define USB_WAKEUP_EVENT 0 00128 #define USB_SOF_EVENT 1 00129 #define USB_ERROR_EVENT 0 00130 #define USB_EP_EVENT 0x0009 00131 #define USB_CONFIGURE_EVENT 0 00132 #define USB_INTERFACE_EVENT 0 00133 #define USB_FEATURE_EVENT 0 00134 00135 00136 /* 00137 // <e0> USB Class Support 00138 // <i> enables USB Class specific Requests 00139 // <e1> Human Interface Device (HID) 00140 // <o2> Interface Number <0-255> 00141 // </e> 00142 // <e3> Mass Storage 00143 // <o4> Interface Number <0-255> 00144 // </e> 00145 // <e5> Audio Device 00146 // <o6> Control Interface Number <0-255> 00147 // <o7> Streaming Interface 1 Number <0-255> 00148 // <o8> Streaming Interface 2 Number <0-255> 00149 // </e> 00150 // <e9> Communication Device 00151 // <o10> Control Interface Number <0-255> 00152 // <o11> Bulk Interface Number <0-255> 00153 // <o12> Max Communication Device Buffer Size 00154 // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes 00155 // </e> 00156 // </e> 00157 */ 00158 00159 #define USB_CLASS 1 00160 #define USB_HID 0 00161 #define USB_HID_IF_NUM 0 00162 #define USB_MSC 0 00163 #define USB_MSC_IF_NUM 0 00164 #define USB_AUDIO 1 00165 #define USB_ADC_CIF_NUM 0 00166 #define USB_ADC_SIF1_NUM 1 00167 #define USB_ADC_SIF2_NUM 2 00168 #define USB_CDC 0 00169 #define USB_CDC_CIF_NUM 0 00170 #define USB_CDC_DIF_NUM 1 00171 #define USB_CDC_BUFSIZE 64 00172 00173 /* 00174 // <e0> USB Vendor Support 00175 // <i> enables USB Vendor specific Requests 00176 // </e> 00177 */ 00178 #define USB_VENDOR 0 00179 00180 00181 #endif /* __USBCFG_H__ */
Generated on Tue Jul 12 2022 17:28:10 by 1.7.2