Samuel Mokrani
/
USBAudio_micro
USBAudio example using a microphone
USBDevice/USBAudio/USBAudio.cpp@3:e6a29c83ac52, 2011-12-19 (annotated)
- Committer:
- samux
- Date:
- Mon Dec 19 15:46:17 2011 +0000
- Revision:
- 3:e6a29c83ac52
- Parent:
- 2:7d8bdeb3753b
- Child:
- 5:b49b6a8ca111
ok we can send a music from an sdcard but readings are time to time slow...
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
samux |
0:539ec61e1fbb | 1 | /* Copyright (c) 2010-2011 mbed.org, MIT License |
samux |
0:539ec61e1fbb | 2 | * |
samux |
0:539ec61e1fbb | 3 | * Permission is hereby granted, free of charge, to any person obtaining a copy of this software |
samux |
0:539ec61e1fbb | 4 | * and associated documentation files (the "Software"), to deal in the Software without |
samux |
0:539ec61e1fbb | 5 | * restriction, including without limitation the rights to use, copy, modify, merge, publish, |
samux |
0:539ec61e1fbb | 6 | * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the |
samux |
0:539ec61e1fbb | 7 | * Software is furnished to do so, subject to the following conditions: |
samux |
0:539ec61e1fbb | 8 | * |
samux |
0:539ec61e1fbb | 9 | * The above copyright notice and this permission notice shall be included in all copies or |
samux |
0:539ec61e1fbb | 10 | * substantial portions of the Software. |
samux |
0:539ec61e1fbb | 11 | * |
samux |
0:539ec61e1fbb | 12 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING |
samux |
0:539ec61e1fbb | 13 | * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
samux |
0:539ec61e1fbb | 14 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, |
samux |
0:539ec61e1fbb | 15 | * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
samux |
0:539ec61e1fbb | 16 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
samux |
0:539ec61e1fbb | 17 | */ |
samux |
0:539ec61e1fbb | 18 | |
samux |
0:539ec61e1fbb | 19 | #include "stdint.h" |
samux |
0:539ec61e1fbb | 20 | #include "USBAudio.h" |
samux |
0:539ec61e1fbb | 21 | #include "USBBusInterface.h" |
samux |
0:539ec61e1fbb | 22 | #include "USBAudio_Types.h" |
samux |
0:539ec61e1fbb | 23 | |
samux |
0:539ec61e1fbb | 24 | |
samux |
0:539ec61e1fbb | 25 | |
samux |
0:539ec61e1fbb | 26 | USBAudio::USBAudio(uint32_t frequency, uint8_t channel_nb, uint16_t vendor_id, uint16_t product_id, uint16_t product_release): USBDevice(vendor_id, product_id, product_release) { |
samux |
0:539ec61e1fbb | 27 | |
samux |
0:539ec61e1fbb | 28 | FREQ = frequency; |
samux |
0:539ec61e1fbb | 29 | |
samux |
0:539ec61e1fbb | 30 | this->channel_nb = channel_nb; |
samux |
0:539ec61e1fbb | 31 | |
samux |
0:539ec61e1fbb | 32 | // stereo -> *2, mono -> *1 |
samux |
0:539ec61e1fbb | 33 | PACKET_SIZE_ISO = (FREQ / 500) * channel_nb; |
samux |
0:539ec61e1fbb | 34 | |
samux |
0:539ec61e1fbb | 35 | // STEREO -> left and right |
samux |
0:539ec61e1fbb | 36 | channel_config = (channel_nb == 1) ? CHANNEL_M : CHANNEL_L + CHANNEL_R; |
samux |
0:539ec61e1fbb | 37 | |
samux |
0:539ec61e1fbb | 38 | SOF_handler = false; |
samux |
0:539ec61e1fbb | 39 | readIN = false; |
samux |
0:539ec61e1fbb | 40 | interruptIN = false; |
samux |
0:539ec61e1fbb | 41 | |
samux |
0:539ec61e1fbb | 42 | buf_stream = NULL; |
samux |
0:539ec61e1fbb | 43 | |
samux |
0:539ec61e1fbb | 44 | // connect the device |
samux |
0:539ec61e1fbb | 45 | USBDevice::connect(); |
samux |
0:539ec61e1fbb | 46 | } |
samux |
0:539ec61e1fbb | 47 | |
samux |
0:539ec61e1fbb | 48 | bool USBAudio::write(uint8_t * buf) { |
samux |
0:539ec61e1fbb | 49 | readIN = false; |
samux |
0:539ec61e1fbb | 50 | SOF_handler = false; |
samux |
1:1d38d9ca354d | 51 | if (interruptIN) { |
samux |
1:1d38d9ca354d | 52 | USBDevice::writeNB(EP3IN, buf, 16, 16); |
samux |
1:1d38d9ca354d | 53 | } else { |
samux |
1:1d38d9ca354d | 54 | buf_stream = buf; |
samux |
0:539ec61e1fbb | 55 | } |
samux |
1:1d38d9ca354d | 56 | while (!SOF_handler); |
samux |
1:1d38d9ca354d | 57 | if (interruptIN) { |
samux |
1:1d38d9ca354d | 58 | while (!readIN); |
samux |
1:1d38d9ca354d | 59 | } |
samux |
1:1d38d9ca354d | 60 | buf_stream = NULL; |
samux |
0:539ec61e1fbb | 61 | return true; |
samux |
0:539ec61e1fbb | 62 | } |
samux |
0:539ec61e1fbb | 63 | |
samux |
0:539ec61e1fbb | 64 | // Called in ISR context on each start of frame |
samux |
0:539ec61e1fbb | 65 | void USBAudio::SOF(int frameNumber) { |
samux |
1:1d38d9ca354d | 66 | if (buf_stream != NULL) { |
samux |
1:1d38d9ca354d | 67 | USBDevice::writeNB(EP3IN, (uint8_t *)buf_stream, 16, 16); |
samux |
0:539ec61e1fbb | 68 | } |
samux |
0:539ec61e1fbb | 69 | SOF_handler = true; |
samux |
0:539ec61e1fbb | 70 | } |
samux |
0:539ec61e1fbb | 71 | |
samux |
0:539ec61e1fbb | 72 | |
samux |
0:539ec61e1fbb | 73 | bool USBAudio::EP3_IN_callback() { |
samux |
0:539ec61e1fbb | 74 | interruptIN = true; |
samux |
0:539ec61e1fbb | 75 | readIN = true; |
samux |
0:539ec61e1fbb | 76 | return true; |
samux |
0:539ec61e1fbb | 77 | } |
samux |
0:539ec61e1fbb | 78 | |
samux |
0:539ec61e1fbb | 79 | |
samux |
0:539ec61e1fbb | 80 | // Called in ISR context |
samux |
0:539ec61e1fbb | 81 | // Set configuration. Return false if the configuration is not supported. |
samux |
0:539ec61e1fbb | 82 | bool USBAudio::USBCallback_setConfiguration(uint8_t configuration) { |
samux |
0:539ec61e1fbb | 83 | if (configuration != DEFAULT_CONFIGURATION) { |
samux |
0:539ec61e1fbb | 84 | return false; |
samux |
0:539ec61e1fbb | 85 | } |
samux |
0:539ec61e1fbb | 86 | |
samux |
0:539ec61e1fbb | 87 | // Configure isochronous endpoint |
samux |
0:539ec61e1fbb | 88 | realiseEndpoint(EP3IN, PACKET_SIZE_ISO, ISOCHRONOUS); |
samux |
0:539ec61e1fbb | 89 | return true; |
samux |
0:539ec61e1fbb | 90 | } |
samux |
0:539ec61e1fbb | 91 | |
samux |
0:539ec61e1fbb | 92 | |
samux |
0:539ec61e1fbb | 93 | // Called in ISR context |
samux |
0:539ec61e1fbb | 94 | // Set alternate setting. Return false if the alternate setting is not supported |
samux |
0:539ec61e1fbb | 95 | bool USBAudio::USBCallback_setInterface(uint16_t interface, uint8_t alternate) { |
samux |
0:539ec61e1fbb | 96 | if (interface == 0 && alternate == 0) { |
samux |
0:539ec61e1fbb | 97 | return true; |
samux |
0:539ec61e1fbb | 98 | } |
samux |
0:539ec61e1fbb | 99 | if (interface == 1 && (alternate == 0 || alternate == 1)) { |
samux |
0:539ec61e1fbb | 100 | return true; |
samux |
0:539ec61e1fbb | 101 | } else |
samux |
0:539ec61e1fbb | 102 | printf("intf: %d, alt: %d\r\n", interface, alternate); |
samux |
0:539ec61e1fbb | 103 | return false; |
samux |
0:539ec61e1fbb | 104 | } |
samux |
0:539ec61e1fbb | 105 | |
samux |
0:539ec61e1fbb | 106 | |
samux |
0:539ec61e1fbb | 107 | |
samux |
0:539ec61e1fbb | 108 | #define TOTAL_DESCRIPTOR_LENGTH ((1 * CONFIGURATION_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 109 | + (5 * INTERFACE_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 110 | + (1 * CONTROL_INTERFACE_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 111 | + (2 * INPUT_TERMINAL_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 112 | + (2 * FEATURE_UNIT_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 113 | + (2 * OUTPUT_TERMINAL_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 114 | + (0x07) \ |
samux |
0:539ec61e1fbb | 115 | + (2 * STREAMING_INTERFACE_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 116 | + (2 * FORMAT_TYPE_I_DESCRIPTOR_LENGTH) \ |
samux |
0:539ec61e1fbb | 117 | + (2 * (ENDPOINT_DESCRIPTOR_LENGTH + 2)) \ |
samux |
0:539ec61e1fbb | 118 | + (2 * STREAMING_ENDPOINT_DESCRIPTOR_LENGTH) ) |
samux |
0:539ec61e1fbb | 119 | |
samux |
0:539ec61e1fbb | 120 | #define TOTAL_CONTROL_INTF_LENGTH (CONTROL_INTERFACE_DESCRIPTOR_LENGTH + \ |
samux |
0:539ec61e1fbb | 121 | 2 * INPUT_TERMINAL_DESCRIPTOR_LENGTH + \ |
samux |
0:539ec61e1fbb | 122 | 2 * FEATURE_UNIT_DESCRIPTOR_LENGTH + \ |
samux |
0:539ec61e1fbb | 123 | 2 * OUTPUT_TERMINAL_DESCRIPTOR_LENGTH + \ |
samux |
0:539ec61e1fbb | 124 | 0x07) |
samux |
0:539ec61e1fbb | 125 | |
samux |
0:539ec61e1fbb | 126 | uint8_t * USBAudio::configurationDesc() { |
samux |
0:539ec61e1fbb | 127 | static uint8_t configDescriptor[] = { |
samux |
0:539ec61e1fbb | 128 | // Configuration 1 |
samux |
2:7d8bdeb3753b | 129 | CONFIGURATION_DESCRIPTOR_LENGTH, // bLength |
samux |
2:7d8bdeb3753b | 130 | CONFIGURATION_DESCRIPTOR, // bDescriptorType |
samux |
2:7d8bdeb3753b | 131 | 0x64, // wTotalLength (LSB) |
samux |
2:7d8bdeb3753b | 132 | 0x00, // wTotalLength (MSB) |
samux |
2:7d8bdeb3753b | 133 | 0x02, // bNumInterfaces |
samux |
2:7d8bdeb3753b | 134 | DEFAULT_CONFIGURATION, // bConfigurationValue |
samux |
2:7d8bdeb3753b | 135 | 0x00, // iConfiguration |
samux |
2:7d8bdeb3753b | 136 | 0x80, // bmAttributes |
samux |
2:7d8bdeb3753b | 137 | 50, // bMaxPower |
samux |
0:539ec61e1fbb | 138 | |
samux |
0:539ec61e1fbb | 139 | // Interface 0, Alternate Setting 0, Audio Control |
samux |
2:7d8bdeb3753b | 140 | INTERFACE_DESCRIPTOR_LENGTH, // bLength |
samux |
2:7d8bdeb3753b | 141 | INTERFACE_DESCRIPTOR, // bDescriptorType |
samux |
2:7d8bdeb3753b | 142 | 0x00, // bInterfaceNumber |
samux |
2:7d8bdeb3753b | 143 | 0x00, // bAlternateSetting |
samux |
2:7d8bdeb3753b | 144 | 0x00, // bNumEndpoints |
samux |
2:7d8bdeb3753b | 145 | 0x01, // bInterfaceClass |
samux |
2:7d8bdeb3753b | 146 | 0x01, // bInterfaceSubClass |
samux |
2:7d8bdeb3753b | 147 | 0x00, // bInterfaceProtocol |
samux |
2:7d8bdeb3753b | 148 | 0x00, // iInterface |
samux |
0:539ec61e1fbb | 149 | |
samux |
0:539ec61e1fbb | 150 | |
samux |
0:539ec61e1fbb | 151 | // Audio Control Interface |
samux |
2:7d8bdeb3753b | 152 | 0x09, // bLength |
samux |
2:7d8bdeb3753b | 153 | 0x24, // bDescriptorType |
samux |
2:7d8bdeb3753b | 154 | 0x01, // bDescriptorSubtype |
samux |
2:7d8bdeb3753b | 155 | LSB(0x0100), // bcdADC (LSB) |
samux |
2:7d8bdeb3753b | 156 | MSB(0x0100), // bcdADC (MSB) |
samux |
2:7d8bdeb3753b | 157 | 0x1e, // wTotalLength |
samux |
2:7d8bdeb3753b | 158 | 0x00, // wTotalLength |
samux |
2:7d8bdeb3753b | 159 | 0x01, // bInCollection |
samux |
2:7d8bdeb3753b | 160 | 0x01, // baInterfaceNr |
samux |
0:539ec61e1fbb | 161 | |
samux |
0:539ec61e1fbb | 162 | // Audio Input Terminal (Speaker) |
samux |
2:7d8bdeb3753b | 163 | 0x0c, // bLength |
samux |
2:7d8bdeb3753b | 164 | 0x24, // bDescriptorType |
samux |
2:7d8bdeb3753b | 165 | 0x02, // bDescriptorSubtype |
samux |
2:7d8bdeb3753b | 166 | 0x01, // bTerminalID |
samux |
2:7d8bdeb3753b | 167 | 0x01, // wTerminalType |
samux |
2:7d8bdeb3753b | 168 | 0x02, // wTerminalType |
samux |
2:7d8bdeb3753b | 169 | 0x00, // bAssocTerminal |
samux |
2:7d8bdeb3753b | 170 | 0x01, // bNrChannels |
samux |
2:7d8bdeb3753b | 171 | 0x00, // wChannelConfig |
samux |
2:7d8bdeb3753b | 172 | 0x00, // wChannelConfig |
samux |
2:7d8bdeb3753b | 173 | 0x00, // iChannelNames |
samux |
2:7d8bdeb3753b | 174 | 0x00, // iTerminal |
samux |
0:539ec61e1fbb | 175 | |
samux |
0:539ec61e1fbb | 176 | // Audio Output Terminal (Speaker) |
samux |
2:7d8bdeb3753b | 177 | 0x09, // bLength |
samux |
2:7d8bdeb3753b | 178 | 0x24, // bDescriptorType |
samux |
2:7d8bdeb3753b | 179 | 0x03, // bDescriptorSubtype |
samux |
2:7d8bdeb3753b | 180 | 0x02, // bTerminalID |
samux |
2:7d8bdeb3753b | 181 | 0x01, // wTerminalType |
samux |
2:7d8bdeb3753b | 182 | 0x01, // wTerminalType |
samux |
2:7d8bdeb3753b | 183 | 0x00, // bAssocTerminal |
samux |
2:7d8bdeb3753b | 184 | 0x01, // bSourceID |
samux |
2:7d8bdeb3753b | 185 | 0x00, // iTerminal |
samux |
0:539ec61e1fbb | 186 | |
samux |
0:539ec61e1fbb | 187 | |
samux |
0:539ec61e1fbb | 188 | |
samux |
0:539ec61e1fbb | 189 | |
samux |
0:539ec61e1fbb | 190 | |
samux |
0:539ec61e1fbb | 191 | |
samux |
0:539ec61e1fbb | 192 | |
samux |
0:539ec61e1fbb | 193 | |
samux |
0:539ec61e1fbb | 194 | // Interface 1, Alternate Setting 0, Audio Streaming - Zero Bandwith |
samux |
2:7d8bdeb3753b | 195 | 0x09, // bLength |
samux |
2:7d8bdeb3753b | 196 | 0x04, // bDescriptorType |
samux |
2:7d8bdeb3753b | 197 | 0x01, // bInterfaceNumber |
samux |
2:7d8bdeb3753b | 198 | 0x00, // bAlternateSetting |
samux |
2:7d8bdeb3753b | 199 | 0x00, // bNumEndpoints |
samux |
2:7d8bdeb3753b | 200 | 0x01, // bInterfaceClass |
samux |
2:7d8bdeb3753b | 201 | 0x02, // bInterfaceSubClass |
samux |
2:7d8bdeb3753b | 202 | 0x00, // bInterfaceProtocol |
samux |
2:7d8bdeb3753b | 203 | 0x00, // iInterface |
samux |
0:539ec61e1fbb | 204 | |
samux |
0:539ec61e1fbb | 205 | // Interface 1, Alternate Setting 1, Audio Streaming - Operational |
samux |
2:7d8bdeb3753b | 206 | 0x09, // bLength |
samux |
2:7d8bdeb3753b | 207 | 0x04, // bDescriptorType |
samux |
2:7d8bdeb3753b | 208 | 0x01, // bInterfaceNumber |
samux |
2:7d8bdeb3753b | 209 | 0x01, // bAlternateSetting |
samux |
2:7d8bdeb3753b | 210 | 0x01, // bNumEndpoints |
samux |
2:7d8bdeb3753b | 211 | 0x01, // bInterfaceClass |
samux |
2:7d8bdeb3753b | 212 | 0x02, // bInterfaceSubClass |
samux |
2:7d8bdeb3753b | 213 | 0x00, // bInterfaceProtocol |
samux |
2:7d8bdeb3753b | 214 | 0x00, // iInterface |
samux |
0:539ec61e1fbb | 215 | |
samux |
0:539ec61e1fbb | 216 | // Audio Streaming Interface |
samux |
2:7d8bdeb3753b | 217 | 0x07, // bLength |
samux |
2:7d8bdeb3753b | 218 | 0x24, // bDescriptorType |
samux |
2:7d8bdeb3753b | 219 | 0x01, // bDescriptorSubtype |
samux |
2:7d8bdeb3753b | 220 | 0x02, // bTerminalLink |
samux |
2:7d8bdeb3753b | 221 | 0x01, // bDelay |
samux |
2:7d8bdeb3753b | 222 | 0x01, // wFormatTag |
samux |
2:7d8bdeb3753b | 223 | 0x00, // wFormatTag |
samux |
0:539ec61e1fbb | 224 | |
samux |
0:539ec61e1fbb | 225 | // Audio Type I Format |
samux |
2:7d8bdeb3753b | 226 | 0x0B, // bLength |
samux |
2:7d8bdeb3753b | 227 | 0x24, // bDescriptorType |
samux |
2:7d8bdeb3753b | 228 | 0x02, // bDescriptorSubtype |
samux |
2:7d8bdeb3753b | 229 | 0x01, // bFormatType |
samux |
2:7d8bdeb3753b | 230 | 0x01, // bNrChannels |
samux |
2:7d8bdeb3753b | 231 | 0x02, // bSubFrameSize |
samux |
2:7d8bdeb3753b | 232 | 0x10, // bBitResolution |
samux |
2:7d8bdeb3753b | 233 | 0x01, // bSamFreqType |
samux |
2:7d8bdeb3753b | 234 | 0x40, // tSamFreq |
samux |
2:7d8bdeb3753b | 235 | 0x1F, // tSamFreq |
samux |
2:7d8bdeb3753b | 236 | 0x00, // tSamFreq |
samux |
0:539ec61e1fbb | 237 | |
samux |
0:539ec61e1fbb | 238 | // Endpoint - Standard Descriptor |
samux |
2:7d8bdeb3753b | 239 | 0x09, // bLength |
samux |
2:7d8bdeb3753b | 240 | 0x05, // bDescriptorType |
samux |
2:7d8bdeb3753b | 241 | PHY_TO_DESC(EPISO_IN), // bEndpointAddress |
samux |
2:7d8bdeb3753b | 242 | E_ISOCHRONOUS, // bmAttributes |
samux |
2:7d8bdeb3753b | 243 | LSB(PACKET_SIZE_ISO), // wMaxPacketSize |
samux |
2:7d8bdeb3753b | 244 | MSB(PACKET_SIZE_ISO), // wMaxPacketSize |
samux |
2:7d8bdeb3753b | 245 | 0x01, // bInterval |
samux |
2:7d8bdeb3753b | 246 | 0x00, // bRefresh |
samux |
2:7d8bdeb3753b | 247 | 0x00, // bSynchAddress |
samux |
0:539ec61e1fbb | 248 | |
samux |
0:539ec61e1fbb | 249 | // Endpoint - Audio Streaming |
samux |
0:539ec61e1fbb | 250 | 0x07, // bLength |
samux |
2:7d8bdeb3753b | 251 | 0x25, // bDescriptorType |
samux |
2:7d8bdeb3753b | 252 | 0x01, // bDescriptor |
samux |
2:7d8bdeb3753b | 253 | 0x00, // bmAttributes |
samux |
2:7d8bdeb3753b | 254 | 0x00, // bLockDelayUnits |
samux |
2:7d8bdeb3753b | 255 | LSB(0x0000), // wLockDelay |
samux |
2:7d8bdeb3753b | 256 | MSB(0x0000), // wLockDelay |
samux |
0:539ec61e1fbb | 257 | |
samux |
0:539ec61e1fbb | 258 | |
samux |
0:539ec61e1fbb | 259 | |
samux |
0:539ec61e1fbb | 260 | |
samux |
0:539ec61e1fbb | 261 | // Terminator |
samux |
0:539ec61e1fbb | 262 | 0 |
samux |
0:539ec61e1fbb | 263 | }; |
samux |
0:539ec61e1fbb | 264 | //printf("size config: %d\r\n", sizeof(configDescriptor)); |
samux |
0:539ec61e1fbb | 265 | return configDescriptor; |
samux |
0:539ec61e1fbb | 266 | } |
samux |
0:539ec61e1fbb | 267 | |
samux |
0:539ec61e1fbb | 268 | uint8_t * USBAudio::stringIinterfaceDesc() { |
samux |
0:539ec61e1fbb | 269 | static uint8_t stringIinterfaceDescriptor[] = { |
samux |
0:539ec61e1fbb | 270 | 0x0c, //bLength |
samux |
0:539ec61e1fbb | 271 | STRING_DESCRIPTOR, //bDescriptorType 0x03 |
samux |
0:539ec61e1fbb | 272 | 'A',0,'u',0,'d',0,'i',0,'o',0 //bString iInterface - Audio |
samux |
0:539ec61e1fbb | 273 | }; |
samux |
0:539ec61e1fbb | 274 | return stringIinterfaceDescriptor; |
samux |
0:539ec61e1fbb | 275 | } |
samux |
0:539ec61e1fbb | 276 | |
samux |
0:539ec61e1fbb | 277 | uint8_t * USBAudio::stringIproductDesc() { |
samux |
0:539ec61e1fbb | 278 | static uint8_t stringIproductDescriptor[] = { |
samux |
0:539ec61e1fbb | 279 | 0x16, //bLength |
samux |
0:539ec61e1fbb | 280 | STRING_DESCRIPTOR, //bDescriptorType 0x03 |
samux |
0:539ec61e1fbb | 281 | 'M',0,'b',0,'e',0,'d',0,' ',0,'A',0,'u',0,'d',0,'i',0,'o',0 //bString iProduct - Mbed Audio |
samux |
0:539ec61e1fbb | 282 | }; |
samux |
0:539ec61e1fbb | 283 | return stringIproductDescriptor; |
samux |
0:539ec61e1fbb | 284 | } |