Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: FatFileSystem TB6612FNG2 mbed
usb/UsbInc.h@0:de03cbbcd0ff, 2015-11-30 (annotated)
- Committer:
- mbed_Cookbook_SE
- Date:
- Mon Nov 30 09:32:15 2015 +0000
- Revision:
- 0:de03cbbcd0ff
??
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 1 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 2 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 3 | Copyright (c) 2010 Donatien Garnier (donatiengar [at] gmail [dot] com) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 4 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 6 | of this software and associated documentation files (the "Software"), to deal |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 7 | in the Software without restriction, including without limitation the rights |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 9 | copies of the Software, and to permit persons to whom the Software is |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 10 | furnished to do so, subject to the following conditions: |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 11 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 12 | The above copyright notice and this permission notice shall be included in |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 13 | all copies or substantial portions of the Software. |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 14 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 21 | THE SOFTWARE. |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 22 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 23 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 24 | #ifndef USB_INC_H |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 25 | #define USB_INC_H |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 26 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 27 | #include "mbed.h" |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 28 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 29 | #define MIN(a,b) ((a)<(b)?(a):(b)) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 30 | #define MAX(a,b) ((a)>(b)?(a):(b)) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 31 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 32 | //typedef int32_t RC; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 33 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 34 | typedef uint8_t byte; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 35 | typedef uint16_t word; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 36 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 37 | enum UsbErr |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 38 | { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 39 | __USBERR_MIN = -0xFFFF, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 40 | USBERR_DISCONNECTED, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 41 | USBERR_NOTFOUND, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 42 | USBERR_BADCONFIG, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 43 | USBERR_PROCESSING, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 44 | USBERR_HALTED, //Transfer on an ep is stalled |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 45 | USBERR_BUSY, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 46 | USBERR_TDFAIL, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 47 | USBERR_ERROR, |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 48 | USBERR_OK = 0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 49 | }; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 50 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 51 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 52 | /* From NXP's USBHostLite stack's usbhost_lpc17xx.h */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 53 | /* Only the types names have been changed to avoid unecessary typedefs */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 54 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 55 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 56 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 57 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 58 | * NXP USB Host Stack |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 59 | * |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 60 | * (c) Copyright 2008, NXP SemiConductors |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 61 | * (c) Copyright 2008, OnChip Technologies LLC |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 62 | * All Rights Reserved |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 63 | * |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 64 | * www.nxp.com |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 65 | * www.onchiptech.com |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 66 | * |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 67 | * File : usbhost_lpc17xx.h |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 68 | * Programmer(s) : Ravikanth.P |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 69 | * Version : |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 70 | * |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 71 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 72 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 73 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 74 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 75 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 76 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 77 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 78 | * OHCI OPERATIONAL REGISTER FIELD DEFINITIONS |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 79 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 80 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 81 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 82 | /* ------------------ HcControl Register --------------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 83 | #define OR_CONTROL_PLE 0x00000004 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 84 | #define OR_CONTROL_IE 0x00000008 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 85 | #define OR_CONTROL_CLE 0x00000010 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 86 | #define OR_CONTROL_BLE 0x00000020 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 87 | #define OR_CONTROL_HCFS 0x000000C0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 88 | #define OR_CONTROL_HC_OPER 0x00000080 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 89 | /* ----------------- HcCommandStatus Register ----------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 90 | #define OR_CMD_STATUS_HCR 0x00000001 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 91 | #define OR_CMD_STATUS_CLF 0x00000002 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 92 | #define OR_CMD_STATUS_BLF 0x00000004 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 93 | /* --------------- HcInterruptStatus Register ----------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 94 | #define OR_INTR_STATUS_WDH 0x00000002 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 95 | #define OR_INTR_STATUS_RHSC 0x00000040 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 96 | #define OR_INTR_STATUS_UE 0x00000010 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 97 | /* --------------- HcInterruptEnable Register ----------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 98 | #define OR_INTR_ENABLE_WDH 0x00000002 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 99 | #define OR_INTR_ENABLE_RHSC 0x00000040 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 100 | #define OR_INTR_ENABLE_MIE 0x80000000 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 101 | /* ---------------- HcRhDescriptorA Register ------------------ */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 102 | #define OR_RH_STATUS_LPSC 0x00010000 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 103 | #define OR_RH_STATUS_DRWE 0x00008000 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 104 | /* -------------- HcRhPortStatus[1:NDP] Register -------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 105 | #define OR_RH_PORT_CCS 0x00000001 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 106 | #define OR_RH_PORT_PRS 0x00000010 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 107 | #define OR_RH_PORT_CSC 0x00010000 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 108 | #define OR_RH_PORT_PRSC 0x00100000 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 109 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 110 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 111 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 112 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 113 | * FRAME INTERVAL |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 114 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 115 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 116 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 117 | #define FI 0x2EDF /* 12000 bits per frame (-1) */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 118 | #define DEFAULT_FMINTERVAL ((((6 * (FI - 210)) / 7) << 16) | FI) |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 119 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 120 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 121 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 122 | * ENDPOINT DESCRIPTOR CONTROL FIELDS |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 123 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 124 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 125 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 126 | #define ED_SKIP (uint32_t) (0x00001000) /* Skip this ep in queue */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 127 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 128 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 129 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 130 | * TRANSFER DESCRIPTOR CONTROL FIELDS |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 131 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 132 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 133 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 134 | #define TD_ROUNDING (uint32_t) (0x00040000) /* Buffer Rounding */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 135 | #define TD_SETUP (uint32_t)(0) /* Direction of Setup Packet */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 136 | #define TD_IN (uint32_t)(0x00100000) /* Direction In */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 137 | #define TD_OUT (uint32_t)(0x00080000) /* Direction Out */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 138 | #define TD_DELAY_INT(x) (uint32_t)((x) << 21) /* Delay Interrupt */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 139 | #define TD_TOGGLE_0 (uint32_t)(0x02000000) /* Toggle 0 */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 140 | #define TD_TOGGLE_1 (uint32_t)(0x03000000) /* Toggle 1 */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 141 | #define TD_CC (uint32_t)(0xF0000000) /* Completion Code */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 142 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 143 | #define ITD_SF (uint32_t)(0x0000FFFF) /* Starting Frame */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 144 | #define ITD_FC (uint32_t)(0x07000000) /* FrameCount */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 145 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 146 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 147 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 148 | * USB STANDARD REQUEST DEFINITIONS |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 149 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 150 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 151 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 152 | #define USB_DESCRIPTOR_TYPE_DEVICE 1 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 153 | #define USB_DESCRIPTOR_TYPE_CONFIGURATION 2 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 154 | #define USB_DESCRIPTOR_TYPE_STRING 3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 155 | #define USB_DESCRIPTOR_TYPE_INTERFACE 4 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 156 | #define USB_DESCRIPTOR_TYPE_ENDPOINT 5 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 157 | #define USB_DESCRIPTOR_TYPE_HUB 0x29 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 158 | /* ----------- Control RequestType Fields ----------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 159 | #define USB_DEVICE_TO_HOST 0x80 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 160 | #define USB_HOST_TO_DEVICE 0x00 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 161 | #define USB_REQUEST_TYPE_CLASS 0x20 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 162 | #define USB_RECIPIENT_DEVICE 0x00 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 163 | #define USB_RECIPIENT_INTERFACE 0x01 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 164 | #define USB_RECIPIENT_OTHER 0x03 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 165 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 166 | /* -------------- USB Standard Requests -------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 167 | #define GET_STATUS 0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 168 | #define CLEAR_FEATURE 1 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 169 | #define SET_FEATURE 3 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 170 | #define SET_ADDRESS 5 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 171 | #define GET_DESCRIPTOR 6 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 172 | #define SET_CONFIGURATION 9 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 173 | #define SET_INTERFACE 11 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 174 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 175 | /* |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 176 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 177 | * TYPE DEFINITIONS |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 178 | ************************************************************************************************************** |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 179 | */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 180 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 181 | typedef struct hcEd { /* ----------- HostController EndPoint Descriptor ------------- */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 182 | volatile uint32_t Control; /* Endpoint descriptor control */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 183 | volatile uint32_t TailTd; /* Physical address of tail in Transfer descriptor list */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 184 | volatile uint32_t HeadTd; /* Physcial address of head in Transfer descriptor list */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 185 | volatile uint32_t Next; /* Physical address of next Endpoint descriptor */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 186 | } HCED; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 187 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 188 | typedef struct hcTd { /* ------------ HostController Transfer Descriptor ------------ */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 189 | volatile uint32_t Control; /* Transfer descriptor control */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 190 | volatile uint32_t CurrBufPtr; /* Physical address of current buffer pointer */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 191 | volatile uint32_t Next; /* Physical pointer to next Transfer Descriptor */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 192 | volatile uint32_t BufEnd; /* Physical address of end of buffer */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 193 | } HCTD; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 194 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 195 | typedef struct hcItd { // HostController Isochronous Transfer Descriptor |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 196 | volatile uint32_t Control; // Transfer descriptor control |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 197 | volatile uint32_t BufferPage0; // Buffer Page 0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 198 | volatile uint32_t Next; // Physical pointer to next Transfer Descriptor |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 199 | volatile uint32_t BufferEnd; // buffer End |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 200 | volatile uint32_t OffsetPSW10; // Offset1/PSW1 Offset0/PSW0 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 201 | volatile uint32_t OffsetPSW32; // Offset3/PSW3 Offset2/PSW2 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 202 | volatile uint32_t OffsetPSW54; // Offset5/PSW5 Offset4/PSW4 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 203 | volatile uint32_t OffsetPSW76; // Offset7/PSW7 Offset6/PSW6 |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 204 | } HCITD; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 205 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 206 | typedef struct hcUtd { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 207 | union { |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 208 | HCTD hctd; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 209 | HCITD hcitd; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 210 | }; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 211 | volatile uint32_t type; // 1:TD, 2:ITD |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 212 | volatile uint32_t UsbEndpoint; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 213 | volatile uint32_t reserve1; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 214 | volatile uint32_t reserve2; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 215 | } HCUTD; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 216 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 217 | typedef struct hcca { /* ----------- Host Controller Communication Area ------------ */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 218 | volatile uint32_t IntTable[32]; /* Interrupt Table */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 219 | volatile uint32_t FrameNumber; /* Frame Number */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 220 | volatile uint32_t DoneHead; /* Done Head */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 221 | volatile uint8_t Reserved[116]; /* Reserved for future use */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 222 | volatile uint8_t Unknown[4]; /* Unused */ |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 223 | } HCCA; |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 224 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 225 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 226 | |
| mbed_Cookbook_SE | 0:de03cbbcd0ff | 227 | #endif |