![](/media/cache/profiles/dc960c46c38bd16e953d97cdeefdbc68.50x50_q85.jpg)
Port of Keils USBCDC example, compiles ok. Gets stuck at init
usbcfg.h@0:0b777ff85deb, 2010-07-05 (annotated)
- Committer:
- tecnosys
- Date:
- Mon Jul 05 10:16:57 2010 +0000
- Revision:
- 0:0b777ff85deb
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
tecnosys | 0:0b777ff85deb | 1 | /*---------------------------------------------------------------------------- |
tecnosys | 0:0b777ff85deb | 2 | * U S B - K e r n e l |
tecnosys | 0:0b777ff85deb | 3 | *---------------------------------------------------------------------------- |
tecnosys | 0:0b777ff85deb | 4 | * Name: usbcfg.h |
tecnosys | 0:0b777ff85deb | 5 | * Purpose: USB Custom Configuration |
tecnosys | 0:0b777ff85deb | 6 | * Version: V1.20 |
tecnosys | 0:0b777ff85deb | 7 | *---------------------------------------------------------------------------- |
tecnosys | 0:0b777ff85deb | 8 | * This software is supplied "AS IS" without any warranties, express, |
tecnosys | 0:0b777ff85deb | 9 | * implied or statutory, including but not limited to the implied |
tecnosys | 0:0b777ff85deb | 10 | * warranties of fitness for purpose, satisfactory quality and |
tecnosys | 0:0b777ff85deb | 11 | * noninfringement. Keil extends you a royalty-free right to reproduce |
tecnosys | 0:0b777ff85deb | 12 | * and distribute executable files created using this software for use |
tecnosys | 0:0b777ff85deb | 13 | * on NXP Semiconductors LPC family microcontroller devices only. Nothing |
tecnosys | 0:0b777ff85deb | 14 | * else gives you the right to use this software. |
tecnosys | 0:0b777ff85deb | 15 | * |
tecnosys | 0:0b777ff85deb | 16 | * Copyright (c) 2009 Keil - An ARM Company. All rights reserved. |
tecnosys | 0:0b777ff85deb | 17 | *---------------------------------------------------------------------------- |
tecnosys | 0:0b777ff85deb | 18 | * History: |
tecnosys | 0:0b777ff85deb | 19 | * V1.20 Added vendor specific support |
tecnosys | 0:0b777ff85deb | 20 | * V1.00 Initial Version |
tecnosys | 0:0b777ff85deb | 21 | *---------------------------------------------------------------------------*/ |
tecnosys | 0:0b777ff85deb | 22 | |
tecnosys | 0:0b777ff85deb | 23 | #ifndef __USBCFG_H__ |
tecnosys | 0:0b777ff85deb | 24 | #define __USBCFG_H__ |
tecnosys | 0:0b777ff85deb | 25 | |
tecnosys | 0:0b777ff85deb | 26 | |
tecnosys | 0:0b777ff85deb | 27 | //*** <<< Use Configuration Wizard in Context Menu >>> *** |
tecnosys | 0:0b777ff85deb | 28 | |
tecnosys | 0:0b777ff85deb | 29 | |
tecnosys | 0:0b777ff85deb | 30 | /* |
tecnosys | 0:0b777ff85deb | 31 | // <h> USB Configuration |
tecnosys | 0:0b777ff85deb | 32 | // <o0> USB Power |
tecnosys | 0:0b777ff85deb | 33 | // <i> Default Power Setting |
tecnosys | 0:0b777ff85deb | 34 | // <0=> Bus-powered |
tecnosys | 0:0b777ff85deb | 35 | // <1=> Self-powered |
tecnosys | 0:0b777ff85deb | 36 | // <o1> Max Number of Interfaces <1-256> |
tecnosys | 0:0b777ff85deb | 37 | // <o2> Max Number of Endpoints <1-32> |
tecnosys | 0:0b777ff85deb | 38 | // <o3> Max Endpoint 0 Packet Size |
tecnosys | 0:0b777ff85deb | 39 | // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes |
tecnosys | 0:0b777ff85deb | 40 | // <e4> DMA Transfer |
tecnosys | 0:0b777ff85deb | 41 | // <i> Use DMA for selected Endpoints |
tecnosys | 0:0b777ff85deb | 42 | // <o5.0> Endpoint 0 Out |
tecnosys | 0:0b777ff85deb | 43 | // <o5.1> Endpoint 0 In |
tecnosys | 0:0b777ff85deb | 44 | // <o5.2> Endpoint 1 Out |
tecnosys | 0:0b777ff85deb | 45 | // <o5.3> Endpoint 1 In |
tecnosys | 0:0b777ff85deb | 46 | // <o5.4> Endpoint 2 Out |
tecnosys | 0:0b777ff85deb | 47 | // <o5.5> Endpoint 2 In |
tecnosys | 0:0b777ff85deb | 48 | // <o5.6> Endpoint 3 Out |
tecnosys | 0:0b777ff85deb | 49 | // <o5.7> Endpoint 3 In |
tecnosys | 0:0b777ff85deb | 50 | // <o5.8> Endpoint 4 Out |
tecnosys | 0:0b777ff85deb | 51 | // <o5.9> Endpoint 4 In |
tecnosys | 0:0b777ff85deb | 52 | // <o5.10> Endpoint 5 Out |
tecnosys | 0:0b777ff85deb | 53 | // <o5.11> Endpoint 5 In |
tecnosys | 0:0b777ff85deb | 54 | // <o5.12> Endpoint 6 Out |
tecnosys | 0:0b777ff85deb | 55 | // <o5.13> Endpoint 6 In |
tecnosys | 0:0b777ff85deb | 56 | // <o5.14> Endpoint 7 Out |
tecnosys | 0:0b777ff85deb | 57 | // <o5.15> Endpoint 7 In |
tecnosys | 0:0b777ff85deb | 58 | // <o5.16> Endpoint 8 Out |
tecnosys | 0:0b777ff85deb | 59 | // <o5.17> Endpoint 8 In |
tecnosys | 0:0b777ff85deb | 60 | // <o5.18> Endpoint 9 Out |
tecnosys | 0:0b777ff85deb | 61 | // <o5.19> Endpoint 9 In |
tecnosys | 0:0b777ff85deb | 62 | // <o5.20> Endpoint 10 Out |
tecnosys | 0:0b777ff85deb | 63 | // <o5.21> Endpoint 10 In |
tecnosys | 0:0b777ff85deb | 64 | // <o5.22> Endpoint 11 Out |
tecnosys | 0:0b777ff85deb | 65 | // <o5.23> Endpoint 11 In |
tecnosys | 0:0b777ff85deb | 66 | // <o5.24> Endpoint 12 Out |
tecnosys | 0:0b777ff85deb | 67 | // <o5.25> Endpoint 12 In |
tecnosys | 0:0b777ff85deb | 68 | // <o5.26> Endpoint 13 Out |
tecnosys | 0:0b777ff85deb | 69 | // <o5.27> Endpoint 13 In |
tecnosys | 0:0b777ff85deb | 70 | // <o5.28> Endpoint 14 Out |
tecnosys | 0:0b777ff85deb | 71 | // <o5.29> Endpoint 14 In |
tecnosys | 0:0b777ff85deb | 72 | // <o5.30> Endpoint 15 Out |
tecnosys | 0:0b777ff85deb | 73 | // <o5.31> Endpoint 15 In |
tecnosys | 0:0b777ff85deb | 74 | // </e> |
tecnosys | 0:0b777ff85deb | 75 | // </h> |
tecnosys | 0:0b777ff85deb | 76 | */ |
tecnosys | 0:0b777ff85deb | 77 | |
tecnosys | 0:0b777ff85deb | 78 | #define USB_POWER 0 |
tecnosys | 0:0b777ff85deb | 79 | #define USB_IF_NUM 4 |
tecnosys | 0:0b777ff85deb | 80 | #define USB_EP_NUM 32 |
tecnosys | 0:0b777ff85deb | 81 | #define USB_MAX_PACKET0 8 |
tecnosys | 0:0b777ff85deb | 82 | #define USB_DMA 0 |
tecnosys | 0:0b777ff85deb | 83 | #define USB_DMA_EP 0x00000000 |
tecnosys | 0:0b777ff85deb | 84 | |
tecnosys | 0:0b777ff85deb | 85 | |
tecnosys | 0:0b777ff85deb | 86 | /* |
tecnosys | 0:0b777ff85deb | 87 | // <h> USB Event Handlers |
tecnosys | 0:0b777ff85deb | 88 | // <h> Device Events |
tecnosys | 0:0b777ff85deb | 89 | // <o0.0> Power Event |
tecnosys | 0:0b777ff85deb | 90 | // <o1.0> Reset Event |
tecnosys | 0:0b777ff85deb | 91 | // <o2.0> Suspend Event |
tecnosys | 0:0b777ff85deb | 92 | // <o3.0> Resume Event |
tecnosys | 0:0b777ff85deb | 93 | // <o4.0> Remote Wakeup Event |
tecnosys | 0:0b777ff85deb | 94 | // <o5.0> Start of Frame Event |
tecnosys | 0:0b777ff85deb | 95 | // <o6.0> Error Event |
tecnosys | 0:0b777ff85deb | 96 | // </h> |
tecnosys | 0:0b777ff85deb | 97 | // <h> Endpoint Events |
tecnosys | 0:0b777ff85deb | 98 | // <o7.0> Endpoint 0 Event |
tecnosys | 0:0b777ff85deb | 99 | // <o7.1> Endpoint 1 Event |
tecnosys | 0:0b777ff85deb | 100 | // <o7.2> Endpoint 2 Event |
tecnosys | 0:0b777ff85deb | 101 | // <o7.3> Endpoint 3 Event |
tecnosys | 0:0b777ff85deb | 102 | // <o7.4> Endpoint 4 Event |
tecnosys | 0:0b777ff85deb | 103 | // <o7.5> Endpoint 5 Event |
tecnosys | 0:0b777ff85deb | 104 | // <o7.6> Endpoint 6 Event |
tecnosys | 0:0b777ff85deb | 105 | // <o7.7> Endpoint 7 Event |
tecnosys | 0:0b777ff85deb | 106 | // <o7.8> Endpoint 8 Event |
tecnosys | 0:0b777ff85deb | 107 | // <o7.9> Endpoint 9 Event |
tecnosys | 0:0b777ff85deb | 108 | // <o7.10> Endpoint 10 Event |
tecnosys | 0:0b777ff85deb | 109 | // <o7.11> Endpoint 11 Event |
tecnosys | 0:0b777ff85deb | 110 | // <o7.12> Endpoint 12 Event |
tecnosys | 0:0b777ff85deb | 111 | // <o7.13> Endpoint 13 Event |
tecnosys | 0:0b777ff85deb | 112 | // <o7.14> Endpoint 14 Event |
tecnosys | 0:0b777ff85deb | 113 | // <o7.15> Endpoint 15 Event |
tecnosys | 0:0b777ff85deb | 114 | // </h> |
tecnosys | 0:0b777ff85deb | 115 | // <h> USB Core Events |
tecnosys | 0:0b777ff85deb | 116 | // <o8.0> Set Configuration Event |
tecnosys | 0:0b777ff85deb | 117 | // <o9.0> Set Interface Event |
tecnosys | 0:0b777ff85deb | 118 | // <o10.0> Set/Clear Feature Event |
tecnosys | 0:0b777ff85deb | 119 | // </h> |
tecnosys | 0:0b777ff85deb | 120 | // </h> |
tecnosys | 0:0b777ff85deb | 121 | */ |
tecnosys | 0:0b777ff85deb | 122 | |
tecnosys | 0:0b777ff85deb | 123 | #define USB_POWER_EVENT 0 |
tecnosys | 0:0b777ff85deb | 124 | #define USB_RESET_EVENT 1 |
tecnosys | 0:0b777ff85deb | 125 | #define USB_SUSPEND_EVENT 0 |
tecnosys | 0:0b777ff85deb | 126 | #define USB_RESUME_EVENT 0 |
tecnosys | 0:0b777ff85deb | 127 | #define USB_WAKEUP_EVENT 0 |
tecnosys | 0:0b777ff85deb | 128 | #define USB_SOF_EVENT 0 |
tecnosys | 0:0b777ff85deb | 129 | #define USB_ERROR_EVENT 0 |
tecnosys | 0:0b777ff85deb | 130 | #define USB_EP_EVENT 0x0007 |
tecnosys | 0:0b777ff85deb | 131 | #define USB_CONFIGURE_EVENT 1 |
tecnosys | 0:0b777ff85deb | 132 | #define USB_INTERFACE_EVENT 0 |
tecnosys | 0:0b777ff85deb | 133 | #define USB_FEATURE_EVENT 0 |
tecnosys | 0:0b777ff85deb | 134 | |
tecnosys | 0:0b777ff85deb | 135 | |
tecnosys | 0:0b777ff85deb | 136 | /* |
tecnosys | 0:0b777ff85deb | 137 | // <e0> USB Class Support |
tecnosys | 0:0b777ff85deb | 138 | // <i> enables USB Class specific Requests |
tecnosys | 0:0b777ff85deb | 139 | // <e1> Human Interface Device (HID) |
tecnosys | 0:0b777ff85deb | 140 | // <o2> Interface Number <0-255> |
tecnosys | 0:0b777ff85deb | 141 | // </e> |
tecnosys | 0:0b777ff85deb | 142 | // <e3> Mass Storage |
tecnosys | 0:0b777ff85deb | 143 | // <o4> Interface Number <0-255> |
tecnosys | 0:0b777ff85deb | 144 | // </e> |
tecnosys | 0:0b777ff85deb | 145 | // <e5> Audio Device |
tecnosys | 0:0b777ff85deb | 146 | // <o6> Control Interface Number <0-255> |
tecnosys | 0:0b777ff85deb | 147 | // <o7> Streaming Interface 1 Number <0-255> |
tecnosys | 0:0b777ff85deb | 148 | // <o8> Streaming Interface 2 Number <0-255> |
tecnosys | 0:0b777ff85deb | 149 | // </e> |
tecnosys | 0:0b777ff85deb | 150 | // <e9> Communication Device |
tecnosys | 0:0b777ff85deb | 151 | // <o10> Control Interface Number <0-255> |
tecnosys | 0:0b777ff85deb | 152 | // <o11> Bulk Interface Number <0-255> |
tecnosys | 0:0b777ff85deb | 153 | // <o12> Max Communication Device Buffer Size |
tecnosys | 0:0b777ff85deb | 154 | // <8=> 8 Bytes <16=> 16 Bytes <32=> 32 Bytes <64=> 64 Bytes |
tecnosys | 0:0b777ff85deb | 155 | // </e> |
tecnosys | 0:0b777ff85deb | 156 | // </e> |
tecnosys | 0:0b777ff85deb | 157 | */ |
tecnosys | 0:0b777ff85deb | 158 | |
tecnosys | 0:0b777ff85deb | 159 | #define USB_CLASS 1 |
tecnosys | 0:0b777ff85deb | 160 | #define USB_HID 0 |
tecnosys | 0:0b777ff85deb | 161 | #define USB_HID_IF_NUM 0 |
tecnosys | 0:0b777ff85deb | 162 | #define USB_MSC 0 |
tecnosys | 0:0b777ff85deb | 163 | #define USB_MSC_IF_NUM 0 |
tecnosys | 0:0b777ff85deb | 164 | #define USB_AUDIO 0 |
tecnosys | 0:0b777ff85deb | 165 | #define USB_ADC_CIF_NUM 0 |
tecnosys | 0:0b777ff85deb | 166 | #define USB_ADC_SIF1_NUM 1 |
tecnosys | 0:0b777ff85deb | 167 | #define USB_ADC_SIF2_NUM 2 |
tecnosys | 0:0b777ff85deb | 168 | #define USB_CDC 1 |
tecnosys | 0:0b777ff85deb | 169 | #define USB_CDC_CIF_NUM 0 |
tecnosys | 0:0b777ff85deb | 170 | #define USB_CDC_DIF_NUM 1 |
tecnosys | 0:0b777ff85deb | 171 | #define USB_CDC_BUFSIZE 64 |
tecnosys | 0:0b777ff85deb | 172 | |
tecnosys | 0:0b777ff85deb | 173 | /* |
tecnosys | 0:0b777ff85deb | 174 | // <e0> USB Vendor Support |
tecnosys | 0:0b777ff85deb | 175 | // <i> enables USB Vendor specific Requests |
tecnosys | 0:0b777ff85deb | 176 | // </e> |
tecnosys | 0:0b777ff85deb | 177 | */ |
tecnosys | 0:0b777ff85deb | 178 | #define USB_VENDOR 0 |
tecnosys | 0:0b777ff85deb | 179 | |
tecnosys | 0:0b777ff85deb | 180 | |
tecnosys | 0:0b777ff85deb | 181 | #endif /* __USBCFG_H__ */ |