USBDevice for STM support

Dependents:   Nucleo_Usb_JoyMouse Nucleo_usbmouse ELEC350_1-referral-2018-usb-hid USBJoystick_HelloWorld2_wip ... more

This library contains all mbed usb device library (mbed-os\features\unsupported\USBDevice).

Committer:
frq08711@LMECWL0871.LME.ST.COM
Date:
Tue Mar 28 11:00:57 2017 +0200
Branch:
master
Revision:
4:50ec00aa4515
Parent:
1:2a3ae13b45ef
update for 5.4.2

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 2 *
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 4 * and associated documentation files (the "Software"), to deal in the Software without
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 7 * Software is furnished to do so, subject to the following conditions:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 8 *
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 9 * The above copyright notice and this permission notice shall be included in all copies or
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 10 * substantial portions of the Software.
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 11 *
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 17 */
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 18
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 19 #include "stdint.h"
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 20 #include "USBMIDI.h"
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 21
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 22
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 23 USBMIDI::USBMIDI(uint16_t vendor_id, uint16_t product_id, uint16_t product_release)
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 24 : USBDevice(vendor_id, product_id, product_release), cur_data(0), data_end(true)
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 25 {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 26 midi_evt = NULL;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 27 USBDevice::connect();
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 28 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 29
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 30 // write plain MIDIMessage that will be converted to USBMidi event packet
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 31 void USBMIDI::write(MIDIMessage m) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 32 // first byte keeped for retro-compatibility
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 33 for(int p=1; p < m.length; p+=3) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 34 uint8_t buf[4];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 35 // Midi message to USBMidi event packet
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 36 buf[0]=m.data[1] >> 4;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 37 // SysEx
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 38 if(buf[0] == 0xF) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 39 if((m.length - p) > 3) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 40 // SysEx start or continue
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 41 buf[0]=0x4;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 42 } else {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 43 switch(m.length - p) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 44 case 1:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 45 // SysEx end with one byte
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 46 buf[0]=0x5;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 47 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 48 case 2:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 49 // SysEx end with two bytes
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 50 buf[0]=0x6;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 51 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 52 case 3:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 53 // SysEx end with three bytes
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 54 buf[0]=0x7;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 55 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 56 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 57 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 58 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 59 buf[1]=m.data[p];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 60
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 61 if(p+1 < m.length)
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 62 buf[2]=m.data[p+1];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 63 else
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 64 buf[2]=0;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 65
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 66 if(p+2 < m.length)
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 67 buf[3]=m.data[p+2];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 68 else
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 69 buf[3]=0;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 70
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 71 USBDevice::write(EPBULK_IN, buf, 4, MAX_PACKET_SIZE_EPBULK);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 72 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 73 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 74
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 75
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 76 void USBMIDI::attach(void (*fptr)(MIDIMessage)) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 77 midi_evt = fptr;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 78 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 79
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 80 bool USBMIDI::EPBULK_OUT_callback() {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 81 uint8_t buf[64];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 82 uint32_t len;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 83 readEP(EPBULK_OUT, buf, &len, 64);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 84
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 85 if (midi_evt != NULL) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 86 for (uint32_t i=0; i<len; i+=4) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 87 uint8_t data_read;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 88 data_end=true;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 89 switch(buf[i]) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 90 case 0x2:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 91 // Two-bytes System Common Message - undefined in USBMidi 1.0
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 92 data_read=2;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 93 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 94 case 0x4:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 95 // SysEx start or continue
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 96 data_end=false;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 97 data_read=3;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 98 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 99 case 0x5:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 100 // Single-byte System Common Message or SysEx end with one byte
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 101 data_read=1;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 102 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 103 case 0x6:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 104 // SysEx end with two bytes
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 105 data_read=2;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 106 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 107 case 0xC:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 108 // Program change
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 109 data_read=2;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 110 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 111 case 0xD:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 112 // Channel pressure
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 113 data_read=2;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 114 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 115 case 0xF:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 116 // Single byte
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 117 data_read=1;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 118 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 119 default:
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 120 // Others three-bytes messages
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 121 data_read=3;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 122 break;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 123 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 124
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 125 for(uint8_t j=1;j<data_read+1;j++) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 126 data[cur_data]=buf[i+j];
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 127 cur_data++;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 128 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 129
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 130 if(data_end) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 131 midi_evt(MIDIMessage(data,cur_data));
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 132 cur_data=0;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 133 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 134 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 135 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 136
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 137 // We reactivate the endpoint to receive next characters
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 138 readStart(EPBULK_OUT, MAX_PACKET_SIZE_EPBULK);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 139 return true;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 140 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 141
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 142 // Called in ISR context
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 143 // Set configuration. Return false if the
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 144 // configuration is not supported.
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 145 bool USBMIDI::USBCallback_setConfiguration(uint8_t configuration) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 146 if (configuration != DEFAULT_CONFIGURATION) {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 147 return false;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 148 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 149
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 150 // Configure endpoints > 0
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 151 addEndpoint(EPBULK_IN, MAX_PACKET_SIZE_EPBULK);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 152 addEndpoint(EPBULK_OUT, MAX_PACKET_SIZE_EPBULK);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 153
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 154 // We activate the endpoint to be able to receive data
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 155 readStart(EPBULK_OUT, MAX_PACKET_SIZE_EPBULK);
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 156 return true;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 157 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 158
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 159
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 160 uint8_t * USBMIDI::stringIinterfaceDesc() {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 161 static uint8_t stringIinterfaceDescriptor[] = {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 162 0x0c, //bLength
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 163 STRING_DESCRIPTOR, //bDescriptorType 0x03
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 164 'A',0,'u',0,'d',0,'i',0,'o',0 //bString iInterface - Audio
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 165 };
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 166 return stringIinterfaceDescriptor;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 167 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 168
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 169 uint8_t * USBMIDI::stringIproductDesc() {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 170 static uint8_t stringIproductDescriptor[] = {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 171 0x16, //bLength
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 172 STRING_DESCRIPTOR, //bDescriptorType 0x03
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 173 'M',0,'b',0,'e',0,'d',0,' ',0,'A',0,'u',0,'d',0,'i',0,'o',0 //bString iProduct - Mbed Audio
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 174 };
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 175 return stringIproductDescriptor;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 176 }
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 177
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 178
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 179 uint8_t * USBMIDI::configurationDesc() {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 180 static uint8_t configDescriptor[] = {
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 181 // configuration descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 182 0x09, 0x02, 0x65, 0x00, 0x02, 0x01, 0x00, 0xc0, 0x50,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 183
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 184 // The Audio Interface Collection
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 185 0x09, 0x04, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, // Standard AC Interface Descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 186 0x09, 0x24, 0x01, 0x00, 0x01, 0x09, 0x00, 0x01, 0x01, // Class-specific AC Interface Descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 187 0x09, 0x04, 0x01, 0x00, 0x02, 0x01, 0x03, 0x00, 0x00, // MIDIStreaming Interface Descriptors
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 188 0x07, 0x24, 0x01, 0x00, 0x01, 0x41, 0x00, // Class-Specific MS Interface Header Descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 189
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 190 // MIDI IN JACKS
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 191 0x06, 0x24, 0x02, 0x01, 0x01, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 192 0x06, 0x24, 0x02, 0x02, 0x02, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 193
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 194 // MIDI OUT JACKS
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 195 0x09, 0x24, 0x03, 0x01, 0x03, 0x01, 0x02, 0x01, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 196 0x09, 0x24, 0x03, 0x02, 0x06, 0x01, 0x01, 0x01, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 197
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 198 // OUT endpoint descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 199 0x09, 0x05, 0x02, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 200 0x05, 0x25, 0x01, 0x01, 0x01,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 201
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 202 // IN endpoint descriptor
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 203 0x09, 0x05, 0x82, 0x02, 0x40, 0x00, 0x00, 0x00, 0x00,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 204 0x05, 0x25, 0x01, 0x01, 0x03,
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 205 };
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 206 return configDescriptor;
frq08711@LMECWL0871.LME.ST.COM 1:2a3ae13b45ef 207 }