Base station firmware

Committer:
Perijah
Date:
Tue May 24 13:16:55 2016 +0000
Revision:
0:ecc3925d3f8c
Base station firmware

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Perijah 0:ecc3925d3f8c 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
Perijah 0:ecc3925d3f8c 2 *
Perijah 0:ecc3925d3f8c 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
Perijah 0:ecc3925d3f8c 4 * and associated documentation files (the "Software"), to deal in the Software without
Perijah 0:ecc3925d3f8c 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
Perijah 0:ecc3925d3f8c 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
Perijah 0:ecc3925d3f8c 7 * Software is furnished to do so, subject to the following conditions:
Perijah 0:ecc3925d3f8c 8 *
Perijah 0:ecc3925d3f8c 9 * The above copyright notice and this permission notice shall be included in all copies or
Perijah 0:ecc3925d3f8c 10 * substantial portions of the Software.
Perijah 0:ecc3925d3f8c 11 *
Perijah 0:ecc3925d3f8c 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
Perijah 0:ecc3925d3f8c 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Perijah 0:ecc3925d3f8c 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
Perijah 0:ecc3925d3f8c 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
Perijah 0:ecc3925d3f8c 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Perijah 0:ecc3925d3f8c 17 */
Perijah 0:ecc3925d3f8c 18
Perijah 0:ecc3925d3f8c 19 #include "stdint.h"
Perijah 0:ecc3925d3f8c 20
Perijah 0:ecc3925d3f8c 21 #include "USBKeyboard.h"
Perijah 0:ecc3925d3f8c 22
Perijah 0:ecc3925d3f8c 23 #define REPORT_ID_KEYBOARD 1
Perijah 0:ecc3925d3f8c 24 #define REPORT_ID_VOLUME 3
Perijah 0:ecc3925d3f8c 25
Perijah 0:ecc3925d3f8c 26
Perijah 0:ecc3925d3f8c 27 typedef struct {
Perijah 0:ecc3925d3f8c 28 unsigned char usage;
Perijah 0:ecc3925d3f8c 29 unsigned char modifier;
Perijah 0:ecc3925d3f8c 30 } KEYMAP;
Perijah 0:ecc3925d3f8c 31
Perijah 0:ecc3925d3f8c 32 #ifdef US_KEYBOARD
Perijah 0:ecc3925d3f8c 33 /* US keyboard (as HID standard) */
Perijah 0:ecc3925d3f8c 34 #define KEYMAP_SIZE (152)
Perijah 0:ecc3925d3f8c 35 const KEYMAP keymap[KEYMAP_SIZE] = {
Perijah 0:ecc3925d3f8c 36 {0, 0}, /* NUL */
Perijah 0:ecc3925d3f8c 37 {0, 0}, /* SOH */
Perijah 0:ecc3925d3f8c 38 {0, 0}, /* STX */
Perijah 0:ecc3925d3f8c 39 {0, 0}, /* ETX */
Perijah 0:ecc3925d3f8c 40 {0, 0}, /* EOT */
Perijah 0:ecc3925d3f8c 41 {0, 0}, /* ENQ */
Perijah 0:ecc3925d3f8c 42 {0, 0}, /* ACK */
Perijah 0:ecc3925d3f8c 43 {0, 0}, /* BEL */
Perijah 0:ecc3925d3f8c 44 {0x2a, 0}, /* BS */ /* Keyboard Delete (Backspace) */
Perijah 0:ecc3925d3f8c 45 {0x2b, 0}, /* TAB */ /* Keyboard Tab */
Perijah 0:ecc3925d3f8c 46 {0x28, 0}, /* LF */ /* Keyboard Return (Enter) */
Perijah 0:ecc3925d3f8c 47 {0, 0}, /* VT */
Perijah 0:ecc3925d3f8c 48 {0, 0}, /* FF */
Perijah 0:ecc3925d3f8c 49 {0, 0}, /* CR */
Perijah 0:ecc3925d3f8c 50 {0, 0}, /* SO */
Perijah 0:ecc3925d3f8c 51 {0, 0}, /* SI */
Perijah 0:ecc3925d3f8c 52 {0, 0}, /* DEL */
Perijah 0:ecc3925d3f8c 53 {0, 0}, /* DC1 */
Perijah 0:ecc3925d3f8c 54 {0, 0}, /* DC2 */
Perijah 0:ecc3925d3f8c 55 {0, 0}, /* DC3 */
Perijah 0:ecc3925d3f8c 56 {0, 0}, /* DC4 */
Perijah 0:ecc3925d3f8c 57 {0, 0}, /* NAK */
Perijah 0:ecc3925d3f8c 58 {0, 0}, /* SYN */
Perijah 0:ecc3925d3f8c 59 {0, 0}, /* ETB */
Perijah 0:ecc3925d3f8c 60 {0, 0}, /* CAN */
Perijah 0:ecc3925d3f8c 61 {0, 0}, /* EM */
Perijah 0:ecc3925d3f8c 62 {0, 0}, /* SUB */
Perijah 0:ecc3925d3f8c 63 {0, 0}, /* ESC */
Perijah 0:ecc3925d3f8c 64 {0, 0}, /* FS */
Perijah 0:ecc3925d3f8c 65 {0, 0}, /* GS */
Perijah 0:ecc3925d3f8c 66 {0, 0}, /* RS */
Perijah 0:ecc3925d3f8c 67 {0, 0}, /* US */
Perijah 0:ecc3925d3f8c 68 {0x2c, 0}, /* */
Perijah 0:ecc3925d3f8c 69 {0x1e, KEY_SHIFT}, /* ! */
Perijah 0:ecc3925d3f8c 70 {0x34, KEY_SHIFT}, /* " */
Perijah 0:ecc3925d3f8c 71 {0x20, KEY_SHIFT}, /* # */
Perijah 0:ecc3925d3f8c 72 {0x21, KEY_SHIFT}, /* $ */
Perijah 0:ecc3925d3f8c 73 {0x22, KEY_SHIFT}, /* % */
Perijah 0:ecc3925d3f8c 74 {0x24, KEY_SHIFT}, /* & */
Perijah 0:ecc3925d3f8c 75 {0x34, 0}, /* ' */
Perijah 0:ecc3925d3f8c 76 {0x26, KEY_SHIFT}, /* ( */
Perijah 0:ecc3925d3f8c 77 {0x27, KEY_SHIFT}, /* ) */
Perijah 0:ecc3925d3f8c 78 {0x25, KEY_SHIFT}, /* * */
Perijah 0:ecc3925d3f8c 79 {0x2e, KEY_SHIFT}, /* + */
Perijah 0:ecc3925d3f8c 80 {0x36, 0}, /* , */
Perijah 0:ecc3925d3f8c 81 {0x2d, 0}, /* - */
Perijah 0:ecc3925d3f8c 82 {0x37, 0}, /* . */
Perijah 0:ecc3925d3f8c 83 {0x38, 0}, /* / */
Perijah 0:ecc3925d3f8c 84 {0x27, 0}, /* 0 */
Perijah 0:ecc3925d3f8c 85 {0x1e, 0}, /* 1 */
Perijah 0:ecc3925d3f8c 86 {0x1f, 0}, /* 2 */
Perijah 0:ecc3925d3f8c 87 {0x20, 0}, /* 3 */
Perijah 0:ecc3925d3f8c 88 {0x21, 0}, /* 4 */
Perijah 0:ecc3925d3f8c 89 {0x22, 0}, /* 5 */
Perijah 0:ecc3925d3f8c 90 {0x23, 0}, /* 6 */
Perijah 0:ecc3925d3f8c 91 {0x24, 0}, /* 7 */
Perijah 0:ecc3925d3f8c 92 {0x25, 0}, /* 8 */
Perijah 0:ecc3925d3f8c 93 {0x26, 0}, /* 9 */
Perijah 0:ecc3925d3f8c 94 {0x33, KEY_SHIFT}, /* : */
Perijah 0:ecc3925d3f8c 95 {0x33, 0}, /* ; */
Perijah 0:ecc3925d3f8c 96 {0x36, KEY_SHIFT}, /* < */
Perijah 0:ecc3925d3f8c 97 {0x2e, 0}, /* = */
Perijah 0:ecc3925d3f8c 98 {0x37, KEY_SHIFT}, /* > */
Perijah 0:ecc3925d3f8c 99 {0x38, KEY_SHIFT}, /* ? */
Perijah 0:ecc3925d3f8c 100 {0x1f, KEY_SHIFT}, /* @ */
Perijah 0:ecc3925d3f8c 101 {0x04, KEY_SHIFT}, /* A */
Perijah 0:ecc3925d3f8c 102 {0x05, KEY_SHIFT}, /* B */
Perijah 0:ecc3925d3f8c 103 {0x06, KEY_SHIFT}, /* C */
Perijah 0:ecc3925d3f8c 104 {0x07, KEY_SHIFT}, /* D */
Perijah 0:ecc3925d3f8c 105 {0x08, KEY_SHIFT}, /* E */
Perijah 0:ecc3925d3f8c 106 {0x09, KEY_SHIFT}, /* F */
Perijah 0:ecc3925d3f8c 107 {0x0a, KEY_SHIFT}, /* G */
Perijah 0:ecc3925d3f8c 108 {0x0b, KEY_SHIFT}, /* H */
Perijah 0:ecc3925d3f8c 109 {0x0c, KEY_SHIFT}, /* I */
Perijah 0:ecc3925d3f8c 110 {0x0d, KEY_SHIFT}, /* J */
Perijah 0:ecc3925d3f8c 111 {0x0e, KEY_SHIFT}, /* K */
Perijah 0:ecc3925d3f8c 112 {0x0f, KEY_SHIFT}, /* L */
Perijah 0:ecc3925d3f8c 113 {0x10, KEY_SHIFT}, /* M */
Perijah 0:ecc3925d3f8c 114 {0x11, KEY_SHIFT}, /* N */
Perijah 0:ecc3925d3f8c 115 {0x12, KEY_SHIFT}, /* O */
Perijah 0:ecc3925d3f8c 116 {0x13, KEY_SHIFT}, /* P */
Perijah 0:ecc3925d3f8c 117 {0x14, KEY_SHIFT}, /* Q */
Perijah 0:ecc3925d3f8c 118 {0x15, KEY_SHIFT}, /* R */
Perijah 0:ecc3925d3f8c 119 {0x16, KEY_SHIFT}, /* S */
Perijah 0:ecc3925d3f8c 120 {0x17, KEY_SHIFT}, /* T */
Perijah 0:ecc3925d3f8c 121 {0x18, KEY_SHIFT}, /* U */
Perijah 0:ecc3925d3f8c 122 {0x19, KEY_SHIFT}, /* V */
Perijah 0:ecc3925d3f8c 123 {0x1a, KEY_SHIFT}, /* W */
Perijah 0:ecc3925d3f8c 124 {0x1b, KEY_SHIFT}, /* X */
Perijah 0:ecc3925d3f8c 125 {0x1c, KEY_SHIFT}, /* Y */
Perijah 0:ecc3925d3f8c 126 {0x1d, KEY_SHIFT}, /* Z */
Perijah 0:ecc3925d3f8c 127 {0x2f, 0}, /* [ */
Perijah 0:ecc3925d3f8c 128 {0x31, 0}, /* \ */
Perijah 0:ecc3925d3f8c 129 {0x30, 0}, /* ] */
Perijah 0:ecc3925d3f8c 130 {0x23, KEY_SHIFT}, /* ^ */
Perijah 0:ecc3925d3f8c 131 {0x2d, KEY_SHIFT}, /* _ */
Perijah 0:ecc3925d3f8c 132 {0x35, 0}, /* ` */
Perijah 0:ecc3925d3f8c 133 {0x04, 0}, /* a */
Perijah 0:ecc3925d3f8c 134 {0x05, 0}, /* b */
Perijah 0:ecc3925d3f8c 135 {0x06, 0}, /* c */
Perijah 0:ecc3925d3f8c 136 {0x07, 0}, /* d */
Perijah 0:ecc3925d3f8c 137 {0x08, 0}, /* e */
Perijah 0:ecc3925d3f8c 138 {0x09, 0}, /* f */
Perijah 0:ecc3925d3f8c 139 {0x0a, 0}, /* g */
Perijah 0:ecc3925d3f8c 140 {0x0b, 0}, /* h */
Perijah 0:ecc3925d3f8c 141 {0x0c, 0}, /* i */
Perijah 0:ecc3925d3f8c 142 {0x0d, 0}, /* j */
Perijah 0:ecc3925d3f8c 143 {0x0e, 0}, /* k */
Perijah 0:ecc3925d3f8c 144 {0x0f, 0}, /* l */
Perijah 0:ecc3925d3f8c 145 {0x10, 0}, /* m */
Perijah 0:ecc3925d3f8c 146 {0x11, 0}, /* n */
Perijah 0:ecc3925d3f8c 147 {0x12, 0}, /* o */
Perijah 0:ecc3925d3f8c 148 {0x13, 0}, /* p */
Perijah 0:ecc3925d3f8c 149 {0x14, 0}, /* q */
Perijah 0:ecc3925d3f8c 150 {0x15, 0}, /* r */
Perijah 0:ecc3925d3f8c 151 {0x16, 0}, /* s */
Perijah 0:ecc3925d3f8c 152 {0x17, 0}, /* t */
Perijah 0:ecc3925d3f8c 153 {0x18, 0}, /* u */
Perijah 0:ecc3925d3f8c 154 {0x19, 0}, /* v */
Perijah 0:ecc3925d3f8c 155 {0x1a, 0}, /* w */
Perijah 0:ecc3925d3f8c 156 {0x1b, 0}, /* x */
Perijah 0:ecc3925d3f8c 157 {0x1c, 0}, /* y */
Perijah 0:ecc3925d3f8c 158 {0x1d, 0}, /* z */
Perijah 0:ecc3925d3f8c 159 {0x2f, KEY_SHIFT}, /* { */
Perijah 0:ecc3925d3f8c 160 {0x31, KEY_SHIFT}, /* | */
Perijah 0:ecc3925d3f8c 161 {0x30, KEY_SHIFT}, /* } */
Perijah 0:ecc3925d3f8c 162 {0x35, KEY_SHIFT}, /* ~ */
Perijah 0:ecc3925d3f8c 163 {0,0}, /* DEL */
Perijah 0:ecc3925d3f8c 164
Perijah 0:ecc3925d3f8c 165 {0x3a, 0}, /* F1 */
Perijah 0:ecc3925d3f8c 166 {0x3b, 0}, /* F2 */
Perijah 0:ecc3925d3f8c 167 {0x3c, 0}, /* F3 */
Perijah 0:ecc3925d3f8c 168 {0x3d, 0}, /* F4 */
Perijah 0:ecc3925d3f8c 169 {0x3e, 0}, /* F5 */
Perijah 0:ecc3925d3f8c 170 {0x3f, 0}, /* F6 */
Perijah 0:ecc3925d3f8c 171 {0x40, 0}, /* F7 */
Perijah 0:ecc3925d3f8c 172 {0x41, 0}, /* F8 */
Perijah 0:ecc3925d3f8c 173 {0x42, 0}, /* F9 */
Perijah 0:ecc3925d3f8c 174 {0x43, 0}, /* F10 */
Perijah 0:ecc3925d3f8c 175 {0x44, 0}, /* F11 */
Perijah 0:ecc3925d3f8c 176 {0x45, 0}, /* F12 */
Perijah 0:ecc3925d3f8c 177
Perijah 0:ecc3925d3f8c 178 {0x46, 0}, /* PRINT_SCREEN */
Perijah 0:ecc3925d3f8c 179 {0x47, 0}, /* SCROLL_LOCK */
Perijah 0:ecc3925d3f8c 180 {0x39, 0}, /* CAPS_LOCK */
Perijah 0:ecc3925d3f8c 181 {0x53, 0}, /* NUM_LOCK */
Perijah 0:ecc3925d3f8c 182 {0x49, 0}, /* INSERT */
Perijah 0:ecc3925d3f8c 183 {0x4a, 0}, /* HOME */
Perijah 0:ecc3925d3f8c 184 {0x4b, 0}, /* PAGE_UP */
Perijah 0:ecc3925d3f8c 185 {0x4e, 0}, /* PAGE_DOWN */
Perijah 0:ecc3925d3f8c 186
Perijah 0:ecc3925d3f8c 187 {0x4f, 0}, /* RIGHT_ARROW */
Perijah 0:ecc3925d3f8c 188 {0x50, 0}, /* LEFT_ARROW */
Perijah 0:ecc3925d3f8c 189 {0x51, 0}, /* DOWN_ARROW */
Perijah 0:ecc3925d3f8c 190 {0x52, 0}, /* UP_ARROW */
Perijah 0:ecc3925d3f8c 191 };
Perijah 0:ecc3925d3f8c 192
Perijah 0:ecc3925d3f8c 193 #else
Perijah 0:ecc3925d3f8c 194 /* UK keyboard */
Perijah 0:ecc3925d3f8c 195 #define KEYMAP_SIZE (152)
Perijah 0:ecc3925d3f8c 196 const KEYMAP keymap[KEYMAP_SIZE] = {
Perijah 0:ecc3925d3f8c 197 {0, 0}, /* NUL */
Perijah 0:ecc3925d3f8c 198 {0, 0}, /* SOH */
Perijah 0:ecc3925d3f8c 199 {0, 0}, /* STX */
Perijah 0:ecc3925d3f8c 200 {0, 0}, /* ETX */
Perijah 0:ecc3925d3f8c 201 {0, 0}, /* EOT */
Perijah 0:ecc3925d3f8c 202 {0, 0}, /* ENQ */
Perijah 0:ecc3925d3f8c 203 {0, 0}, /* ACK */
Perijah 0:ecc3925d3f8c 204 {0, 0}, /* BEL */
Perijah 0:ecc3925d3f8c 205 {0x2a, 0}, /* BS */ /* Keyboard Delete (Backspace) */
Perijah 0:ecc3925d3f8c 206 {0x2b, 0}, /* TAB */ /* Keyboard Tab */
Perijah 0:ecc3925d3f8c 207 {0x28, 0}, /* LF */ /* Keyboard Return (Enter) */
Perijah 0:ecc3925d3f8c 208 {0, 0}, /* VT */
Perijah 0:ecc3925d3f8c 209 {0, 0}, /* FF */
Perijah 0:ecc3925d3f8c 210 {0, 0}, /* CR */
Perijah 0:ecc3925d3f8c 211 {0, 0}, /* SO */
Perijah 0:ecc3925d3f8c 212 {0, 0}, /* SI */
Perijah 0:ecc3925d3f8c 213 {0, 0}, /* DEL */
Perijah 0:ecc3925d3f8c 214 {0, 0}, /* DC1 */
Perijah 0:ecc3925d3f8c 215 {0, 0}, /* DC2 */
Perijah 0:ecc3925d3f8c 216 {0, 0}, /* DC3 */
Perijah 0:ecc3925d3f8c 217 {0, 0}, /* DC4 */
Perijah 0:ecc3925d3f8c 218 {0, 0}, /* NAK */
Perijah 0:ecc3925d3f8c 219 {0, 0}, /* SYN */
Perijah 0:ecc3925d3f8c 220 {0, 0}, /* ETB */
Perijah 0:ecc3925d3f8c 221 {0, 0}, /* CAN */
Perijah 0:ecc3925d3f8c 222 {0, 0}, /* EM */
Perijah 0:ecc3925d3f8c 223 {0, 0}, /* SUB */
Perijah 0:ecc3925d3f8c 224 {0, 0}, /* ESC */
Perijah 0:ecc3925d3f8c 225 {0, 0}, /* FS */
Perijah 0:ecc3925d3f8c 226 {0, 0}, /* GS */
Perijah 0:ecc3925d3f8c 227 {0, 0}, /* RS */
Perijah 0:ecc3925d3f8c 228 {0, 0}, /* US */
Perijah 0:ecc3925d3f8c 229 {0x2c, 0}, /* */
Perijah 0:ecc3925d3f8c 230 {0x1e, KEY_SHIFT}, /* ! */
Perijah 0:ecc3925d3f8c 231 {0x1f, KEY_SHIFT}, /* " */
Perijah 0:ecc3925d3f8c 232 {0x32, 0}, /* # */
Perijah 0:ecc3925d3f8c 233 {0x21, KEY_SHIFT}, /* $ */
Perijah 0:ecc3925d3f8c 234 {0x22, KEY_SHIFT}, /* % */
Perijah 0:ecc3925d3f8c 235 {0x24, KEY_SHIFT}, /* & */
Perijah 0:ecc3925d3f8c 236 {0x34, 0}, /* ' */
Perijah 0:ecc3925d3f8c 237 {0x26, KEY_SHIFT}, /* ( */
Perijah 0:ecc3925d3f8c 238 {0x27, KEY_SHIFT}, /* ) */
Perijah 0:ecc3925d3f8c 239 {0x25, KEY_SHIFT}, /* * */
Perijah 0:ecc3925d3f8c 240 {0x2e, KEY_SHIFT}, /* + */
Perijah 0:ecc3925d3f8c 241 {0x36, 0}, /* , */
Perijah 0:ecc3925d3f8c 242 {0x2d, 0}, /* - */
Perijah 0:ecc3925d3f8c 243 {0x37, 0}, /* . */
Perijah 0:ecc3925d3f8c 244 {0x38, 0}, /* / */
Perijah 0:ecc3925d3f8c 245 {0x27, 0}, /* 0 */
Perijah 0:ecc3925d3f8c 246 {0x1e, 0}, /* 1 */
Perijah 0:ecc3925d3f8c 247 {0x1f, 0}, /* 2 */
Perijah 0:ecc3925d3f8c 248 {0x20, 0}, /* 3 */
Perijah 0:ecc3925d3f8c 249 {0x21, 0}, /* 4 */
Perijah 0:ecc3925d3f8c 250 {0x22, 0}, /* 5 */
Perijah 0:ecc3925d3f8c 251 {0x23, 0}, /* 6 */
Perijah 0:ecc3925d3f8c 252 {0x24, 0}, /* 7 */
Perijah 0:ecc3925d3f8c 253 {0x25, 0}, /* 8 */
Perijah 0:ecc3925d3f8c 254 {0x26, 0}, /* 9 */
Perijah 0:ecc3925d3f8c 255 {0x33, KEY_SHIFT}, /* : */
Perijah 0:ecc3925d3f8c 256 {0x33, 0}, /* ; */
Perijah 0:ecc3925d3f8c 257 {0x36, KEY_SHIFT}, /* < */
Perijah 0:ecc3925d3f8c 258 {0x2e, 0}, /* = */
Perijah 0:ecc3925d3f8c 259 {0x37, KEY_SHIFT}, /* > */
Perijah 0:ecc3925d3f8c 260 {0x38, KEY_SHIFT}, /* ? */
Perijah 0:ecc3925d3f8c 261 {0x34, KEY_SHIFT}, /* @ */
Perijah 0:ecc3925d3f8c 262 {0x04, KEY_SHIFT}, /* A */
Perijah 0:ecc3925d3f8c 263 {0x05, KEY_SHIFT}, /* B */
Perijah 0:ecc3925d3f8c 264 {0x06, KEY_SHIFT}, /* C */
Perijah 0:ecc3925d3f8c 265 {0x07, KEY_SHIFT}, /* D */
Perijah 0:ecc3925d3f8c 266 {0x08, KEY_SHIFT}, /* E */
Perijah 0:ecc3925d3f8c 267 {0x09, KEY_SHIFT}, /* F */
Perijah 0:ecc3925d3f8c 268 {0x0a, KEY_SHIFT}, /* G */
Perijah 0:ecc3925d3f8c 269 {0x0b, KEY_SHIFT}, /* H */
Perijah 0:ecc3925d3f8c 270 {0x0c, KEY_SHIFT}, /* I */
Perijah 0:ecc3925d3f8c 271 {0x0d, KEY_SHIFT}, /* J */
Perijah 0:ecc3925d3f8c 272 {0x0e, KEY_SHIFT}, /* K */
Perijah 0:ecc3925d3f8c 273 {0x0f, KEY_SHIFT}, /* L */
Perijah 0:ecc3925d3f8c 274 {0x10, KEY_SHIFT}, /* M */
Perijah 0:ecc3925d3f8c 275 {0x11, KEY_SHIFT}, /* N */
Perijah 0:ecc3925d3f8c 276 {0x12, KEY_SHIFT}, /* O */
Perijah 0:ecc3925d3f8c 277 {0x13, KEY_SHIFT}, /* P */
Perijah 0:ecc3925d3f8c 278 {0x14, KEY_SHIFT}, /* Q */
Perijah 0:ecc3925d3f8c 279 {0x15, KEY_SHIFT}, /* R */
Perijah 0:ecc3925d3f8c 280 {0x16, KEY_SHIFT}, /* S */
Perijah 0:ecc3925d3f8c 281 {0x17, KEY_SHIFT}, /* T */
Perijah 0:ecc3925d3f8c 282 {0x18, KEY_SHIFT}, /* U */
Perijah 0:ecc3925d3f8c 283 {0x19, KEY_SHIFT}, /* V */
Perijah 0:ecc3925d3f8c 284 {0x1a, KEY_SHIFT}, /* W */
Perijah 0:ecc3925d3f8c 285 {0x1b, KEY_SHIFT}, /* X */
Perijah 0:ecc3925d3f8c 286 {0x1c, KEY_SHIFT}, /* Y */
Perijah 0:ecc3925d3f8c 287 {0x1d, KEY_SHIFT}, /* Z */
Perijah 0:ecc3925d3f8c 288 {0x2f, 0}, /* [ */
Perijah 0:ecc3925d3f8c 289 {0x64, 0}, /* \ */
Perijah 0:ecc3925d3f8c 290 {0x30, 0}, /* ] */
Perijah 0:ecc3925d3f8c 291 {0x23, KEY_SHIFT}, /* ^ */
Perijah 0:ecc3925d3f8c 292 {0x2d, KEY_SHIFT}, /* _ */
Perijah 0:ecc3925d3f8c 293 {0x35, 0}, /* ` */
Perijah 0:ecc3925d3f8c 294 {0x04, 0}, /* a */
Perijah 0:ecc3925d3f8c 295 {0x05, 0}, /* b */
Perijah 0:ecc3925d3f8c 296 {0x06, 0}, /* c */
Perijah 0:ecc3925d3f8c 297 {0x07, 0}, /* d */
Perijah 0:ecc3925d3f8c 298 {0x08, 0}, /* e */
Perijah 0:ecc3925d3f8c 299 {0x09, 0}, /* f */
Perijah 0:ecc3925d3f8c 300 {0x0a, 0}, /* g */
Perijah 0:ecc3925d3f8c 301 {0x0b, 0}, /* h */
Perijah 0:ecc3925d3f8c 302 {0x0c, 0}, /* i */
Perijah 0:ecc3925d3f8c 303 {0x0d, 0}, /* j */
Perijah 0:ecc3925d3f8c 304 {0x0e, 0}, /* k */
Perijah 0:ecc3925d3f8c 305 {0x0f, 0}, /* l */
Perijah 0:ecc3925d3f8c 306 {0x10, 0}, /* m */
Perijah 0:ecc3925d3f8c 307 {0x11, 0}, /* n */
Perijah 0:ecc3925d3f8c 308 {0x12, 0}, /* o */
Perijah 0:ecc3925d3f8c 309 {0x13, 0}, /* p */
Perijah 0:ecc3925d3f8c 310 {0x14, 0}, /* q */
Perijah 0:ecc3925d3f8c 311 {0x15, 0}, /* r */
Perijah 0:ecc3925d3f8c 312 {0x16, 0}, /* s */
Perijah 0:ecc3925d3f8c 313 {0x17, 0}, /* t */
Perijah 0:ecc3925d3f8c 314 {0x18, 0}, /* u */
Perijah 0:ecc3925d3f8c 315 {0x19, 0}, /* v */
Perijah 0:ecc3925d3f8c 316 {0x1a, 0}, /* w */
Perijah 0:ecc3925d3f8c 317 {0x1b, 0}, /* x */
Perijah 0:ecc3925d3f8c 318 {0x1c, 0}, /* y */
Perijah 0:ecc3925d3f8c 319 {0x1d, 0}, /* z */
Perijah 0:ecc3925d3f8c 320 {0x2f, KEY_SHIFT}, /* { */
Perijah 0:ecc3925d3f8c 321 {0x64, KEY_SHIFT}, /* | */
Perijah 0:ecc3925d3f8c 322 {0x30, KEY_SHIFT}, /* } */
Perijah 0:ecc3925d3f8c 323 {0x32, KEY_SHIFT}, /* ~ */
Perijah 0:ecc3925d3f8c 324 {0,0}, /* DEL */
Perijah 0:ecc3925d3f8c 325
Perijah 0:ecc3925d3f8c 326 {0x3a, 0}, /* F1 */
Perijah 0:ecc3925d3f8c 327 {0x3b, 0}, /* F2 */
Perijah 0:ecc3925d3f8c 328 {0x3c, 0}, /* F3 */
Perijah 0:ecc3925d3f8c 329 {0x3d, 0}, /* F4 */
Perijah 0:ecc3925d3f8c 330 {0x3e, 0}, /* F5 */
Perijah 0:ecc3925d3f8c 331 {0x3f, 0}, /* F6 */
Perijah 0:ecc3925d3f8c 332 {0x40, 0}, /* F7 */
Perijah 0:ecc3925d3f8c 333 {0x41, 0}, /* F8 */
Perijah 0:ecc3925d3f8c 334 {0x42, 0}, /* F9 */
Perijah 0:ecc3925d3f8c 335 {0x43, 0}, /* F10 */
Perijah 0:ecc3925d3f8c 336 {0x44, 0}, /* F11 */
Perijah 0:ecc3925d3f8c 337 {0x45, 0}, /* F12 */
Perijah 0:ecc3925d3f8c 338
Perijah 0:ecc3925d3f8c 339 {0x46, 0}, /* PRINT_SCREEN */
Perijah 0:ecc3925d3f8c 340 {0x47, 0}, /* SCROLL_LOCK */
Perijah 0:ecc3925d3f8c 341 {0x39, 0}, /* CAPS_LOCK */
Perijah 0:ecc3925d3f8c 342 {0x53, 0}, /* NUM_LOCK */
Perijah 0:ecc3925d3f8c 343 {0x49, 0}, /* INSERT */
Perijah 0:ecc3925d3f8c 344 {0x4a, 0}, /* HOME */
Perijah 0:ecc3925d3f8c 345 {0x4b, 0}, /* PAGE_UP */
Perijah 0:ecc3925d3f8c 346 {0x4e, 0}, /* PAGE_DOWN */
Perijah 0:ecc3925d3f8c 347
Perijah 0:ecc3925d3f8c 348 {0x4f, 0}, /* RIGHT_ARROW */
Perijah 0:ecc3925d3f8c 349 {0x50, 0}, /* LEFT_ARROW */
Perijah 0:ecc3925d3f8c 350 {0x51, 0}, /* DOWN_ARROW */
Perijah 0:ecc3925d3f8c 351 {0x52, 0}, /* UP_ARROW */
Perijah 0:ecc3925d3f8c 352 };
Perijah 0:ecc3925d3f8c 353 #endif
Perijah 0:ecc3925d3f8c 354
Perijah 0:ecc3925d3f8c 355 uint8_t * USBKeyboard::reportDesc() {
Perijah 0:ecc3925d3f8c 356 static uint8_t reportDescriptor[] = {
Perijah 0:ecc3925d3f8c 357 USAGE_PAGE(1), 0x01, // Generic Desktop
Perijah 0:ecc3925d3f8c 358 USAGE(1), 0x06, // Keyboard
Perijah 0:ecc3925d3f8c 359 COLLECTION(1), 0x01, // Application
Perijah 0:ecc3925d3f8c 360 REPORT_ID(1), REPORT_ID_KEYBOARD,
Perijah 0:ecc3925d3f8c 361
Perijah 0:ecc3925d3f8c 362 USAGE_PAGE(1), 0x07, // Key Codes
Perijah 0:ecc3925d3f8c 363 USAGE_MINIMUM(1), 0xE0,
Perijah 0:ecc3925d3f8c 364 USAGE_MAXIMUM(1), 0xE7,
Perijah 0:ecc3925d3f8c 365 LOGICAL_MINIMUM(1), 0x00,
Perijah 0:ecc3925d3f8c 366 LOGICAL_MAXIMUM(1), 0x01,
Perijah 0:ecc3925d3f8c 367 REPORT_SIZE(1), 0x01,
Perijah 0:ecc3925d3f8c 368 REPORT_COUNT(1), 0x08,
Perijah 0:ecc3925d3f8c 369 INPUT(1), 0x02, // Data, Variable, Absolute
Perijah 0:ecc3925d3f8c 370 REPORT_COUNT(1), 0x01,
Perijah 0:ecc3925d3f8c 371 REPORT_SIZE(1), 0x08,
Perijah 0:ecc3925d3f8c 372 INPUT(1), 0x01, // Constant
Perijah 0:ecc3925d3f8c 373
Perijah 0:ecc3925d3f8c 374
Perijah 0:ecc3925d3f8c 375 REPORT_COUNT(1), 0x05,
Perijah 0:ecc3925d3f8c 376 REPORT_SIZE(1), 0x01,
Perijah 0:ecc3925d3f8c 377 USAGE_PAGE(1), 0x08, // LEDs
Perijah 0:ecc3925d3f8c 378 USAGE_MINIMUM(1), 0x01,
Perijah 0:ecc3925d3f8c 379 USAGE_MAXIMUM(1), 0x05,
Perijah 0:ecc3925d3f8c 380 OUTPUT(1), 0x02, // Data, Variable, Absolute
Perijah 0:ecc3925d3f8c 381 REPORT_COUNT(1), 0x01,
Perijah 0:ecc3925d3f8c 382 REPORT_SIZE(1), 0x03,
Perijah 0:ecc3925d3f8c 383 OUTPUT(1), 0x01, // Constant
Perijah 0:ecc3925d3f8c 384
Perijah 0:ecc3925d3f8c 385
Perijah 0:ecc3925d3f8c 386 REPORT_COUNT(1), 0x06,
Perijah 0:ecc3925d3f8c 387 REPORT_SIZE(1), 0x08,
Perijah 0:ecc3925d3f8c 388 LOGICAL_MINIMUM(1), 0x00,
Perijah 0:ecc3925d3f8c 389 LOGICAL_MAXIMUM(1), 0x65,
Perijah 0:ecc3925d3f8c 390 USAGE_PAGE(1), 0x07, // Key Codes
Perijah 0:ecc3925d3f8c 391 USAGE_MINIMUM(1), 0x00,
Perijah 0:ecc3925d3f8c 392 USAGE_MAXIMUM(1), 0x65,
Perijah 0:ecc3925d3f8c 393 INPUT(1), 0x00, // Data, Array
Perijah 0:ecc3925d3f8c 394 END_COLLECTION(0),
Perijah 0:ecc3925d3f8c 395
Perijah 0:ecc3925d3f8c 396 // Media Control
Perijah 0:ecc3925d3f8c 397 USAGE_PAGE(1), 0x0C,
Perijah 0:ecc3925d3f8c 398 USAGE(1), 0x01,
Perijah 0:ecc3925d3f8c 399 COLLECTION(1), 0x01,
Perijah 0:ecc3925d3f8c 400 REPORT_ID(1), REPORT_ID_VOLUME,
Perijah 0:ecc3925d3f8c 401 USAGE_PAGE(1), 0x0C,
Perijah 0:ecc3925d3f8c 402 LOGICAL_MINIMUM(1), 0x00,
Perijah 0:ecc3925d3f8c 403 LOGICAL_MAXIMUM(1), 0x01,
Perijah 0:ecc3925d3f8c 404 REPORT_SIZE(1), 0x01,
Perijah 0:ecc3925d3f8c 405 REPORT_COUNT(1), 0x07,
Perijah 0:ecc3925d3f8c 406 USAGE(1), 0xB5, // Next Track
Perijah 0:ecc3925d3f8c 407 USAGE(1), 0xB6, // Previous Track
Perijah 0:ecc3925d3f8c 408 USAGE(1), 0xB7, // Stop
Perijah 0:ecc3925d3f8c 409 USAGE(1), 0xCD, // Play / Pause
Perijah 0:ecc3925d3f8c 410 USAGE(1), 0xE2, // Mute
Perijah 0:ecc3925d3f8c 411 USAGE(1), 0xE9, // Volume Up
Perijah 0:ecc3925d3f8c 412 USAGE(1), 0xEA, // Volume Down
Perijah 0:ecc3925d3f8c 413 INPUT(1), 0x02, // Input (Data, Variable, Absolute)
Perijah 0:ecc3925d3f8c 414 REPORT_COUNT(1), 0x01,
Perijah 0:ecc3925d3f8c 415 INPUT(1), 0x01,
Perijah 0:ecc3925d3f8c 416 END_COLLECTION(0),
Perijah 0:ecc3925d3f8c 417 };
Perijah 0:ecc3925d3f8c 418 reportLength = sizeof(reportDescriptor);
Perijah 0:ecc3925d3f8c 419 return reportDescriptor;
Perijah 0:ecc3925d3f8c 420 }
Perijah 0:ecc3925d3f8c 421
Perijah 0:ecc3925d3f8c 422
Perijah 0:ecc3925d3f8c 423 bool USBKeyboard::EP1_OUT_callback() {
Perijah 0:ecc3925d3f8c 424 uint32_t bytesRead = 0;
Perijah 0:ecc3925d3f8c 425 uint8_t led[65];
Perijah 0:ecc3925d3f8c 426 USBDevice::readEP(EPINT_OUT, led, &bytesRead, MAX_HID_REPORT_SIZE);
Perijah 0:ecc3925d3f8c 427
Perijah 0:ecc3925d3f8c 428 // we take led[1] because led[0] is the report ID
Perijah 0:ecc3925d3f8c 429 lock_status = led[1] & 0x07;
Perijah 0:ecc3925d3f8c 430
Perijah 0:ecc3925d3f8c 431 // We activate the endpoint to be able to recceive data
Perijah 0:ecc3925d3f8c 432 if (!readStart(EPINT_OUT, MAX_HID_REPORT_SIZE))
Perijah 0:ecc3925d3f8c 433 return false;
Perijah 0:ecc3925d3f8c 434 return true;
Perijah 0:ecc3925d3f8c 435 }
Perijah 0:ecc3925d3f8c 436
Perijah 0:ecc3925d3f8c 437 uint8_t USBKeyboard::lockStatus() {
Perijah 0:ecc3925d3f8c 438 return lock_status;
Perijah 0:ecc3925d3f8c 439 }
Perijah 0:ecc3925d3f8c 440
Perijah 0:ecc3925d3f8c 441 int USBKeyboard::_putc(int c) {
Perijah 0:ecc3925d3f8c 442 return keyCode(c, keymap[c].modifier);
Perijah 0:ecc3925d3f8c 443 }
Perijah 0:ecc3925d3f8c 444
Perijah 0:ecc3925d3f8c 445 bool USBKeyboard::keyCode(uint8_t key,uint8_t key1 ,uint8_t key2 ,uint8_t key3 ,uint8_t key4 ,uint8_t key5 , uint8_t modifier) {
Perijah 0:ecc3925d3f8c 446 // Send a simulated keyboard keypress. Returns true if successful.
Perijah 0:ecc3925d3f8c 447 HID_REPORT report;
Perijah 0:ecc3925d3f8c 448
Perijah 0:ecc3925d3f8c 449 report.data[0] = REPORT_ID_KEYBOARD;
Perijah 0:ecc3925d3f8c 450 report.data[1] = modifier;
Perijah 0:ecc3925d3f8c 451 report.data[2] = 0;
Perijah 0:ecc3925d3f8c 452 report.data[3] = keymap[key].usage;
Perijah 0:ecc3925d3f8c 453 report.data[4] = keymap[key1].usage;
Perijah 0:ecc3925d3f8c 454 report.data[5] = keymap[key2].usage;
Perijah 0:ecc3925d3f8c 455 report.data[6] = keymap[key3].usage;
Perijah 0:ecc3925d3f8c 456 report.data[7] = keymap[key4].usage;
Perijah 0:ecc3925d3f8c 457 report.data[8] = keymap[key5].usage;
Perijah 0:ecc3925d3f8c 458
Perijah 0:ecc3925d3f8c 459 report.length = 9;
Perijah 0:ecc3925d3f8c 460
Perijah 0:ecc3925d3f8c 461 if (!send(&report)) {
Perijah 0:ecc3925d3f8c 462 return false;
Perijah 0:ecc3925d3f8c 463 }
Perijah 0:ecc3925d3f8c 464
Perijah 0:ecc3925d3f8c 465 /* report.data[1] = 0;
Perijah 0:ecc3925d3f8c 466 report.data[3] = 0;
Perijah 0:ecc3925d3f8c 467 report.data[4] = 0;
Perijah 0:ecc3925d3f8c 468 report.data[5] = 0;
Perijah 0:ecc3925d3f8c 469 report.data[6] = 0;
Perijah 0:ecc3925d3f8c 470 report.data[7] = 0;
Perijah 0:ecc3925d3f8c 471 report.data[8] = 0;
Perijah 0:ecc3925d3f8c 472
Perijah 0:ecc3925d3f8c 473 if (!send(&report)) {
Perijah 0:ecc3925d3f8c 474 return false;
Perijah 0:ecc3925d3f8c 475 }*/
Perijah 0:ecc3925d3f8c 476
Perijah 0:ecc3925d3f8c 477 return true;
Perijah 0:ecc3925d3f8c 478
Perijah 0:ecc3925d3f8c 479 }
Perijah 0:ecc3925d3f8c 480
Perijah 0:ecc3925d3f8c 481
Perijah 0:ecc3925d3f8c 482 bool USBKeyboard::mediaControl(MEDIA_KEY key) {
Perijah 0:ecc3925d3f8c 483 HID_REPORT report;
Perijah 0:ecc3925d3f8c 484
Perijah 0:ecc3925d3f8c 485 report.data[0] = REPORT_ID_VOLUME;
Perijah 0:ecc3925d3f8c 486 report.data[1] = (1 << key) & 0x7f;
Perijah 0:ecc3925d3f8c 487
Perijah 0:ecc3925d3f8c 488 report.length = 2;
Perijah 0:ecc3925d3f8c 489
Perijah 0:ecc3925d3f8c 490 if (!send(&report)) {
Perijah 0:ecc3925d3f8c 491 return false;
Perijah 0:ecc3925d3f8c 492 }
Perijah 0:ecc3925d3f8c 493
Perijah 0:ecc3925d3f8c 494 report.data[0] = REPORT_ID_VOLUME;
Perijah 0:ecc3925d3f8c 495 report.data[1] = 0;
Perijah 0:ecc3925d3f8c 496
Perijah 0:ecc3925d3f8c 497 report.length = 2;
Perijah 0:ecc3925d3f8c 498
Perijah 0:ecc3925d3f8c 499 return send(&report);
Perijah 0:ecc3925d3f8c 500 }
Perijah 0:ecc3925d3f8c 501
Perijah 0:ecc3925d3f8c 502
Perijah 0:ecc3925d3f8c 503 #define DEFAULT_CONFIGURATION (1)
Perijah 0:ecc3925d3f8c 504 #define TOTAL_DESCRIPTOR_LENGTH ((1 * CONFIGURATION_DESCRIPTOR_LENGTH) \
Perijah 0:ecc3925d3f8c 505 + (1 * INTERFACE_DESCRIPTOR_LENGTH) \
Perijah 0:ecc3925d3f8c 506 + (1 * HID_DESCRIPTOR_LENGTH) \
Perijah 0:ecc3925d3f8c 507 + (2 * ENDPOINT_DESCRIPTOR_LENGTH))
Perijah 0:ecc3925d3f8c 508
Perijah 0:ecc3925d3f8c 509 uint8_t * USBKeyboard::configurationDesc() {
Perijah 0:ecc3925d3f8c 510 static uint8_t configurationDescriptor[] = {
Perijah 0:ecc3925d3f8c 511 CONFIGURATION_DESCRIPTOR_LENGTH,// bLength
Perijah 0:ecc3925d3f8c 512 CONFIGURATION_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 513 LSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (LSB)
Perijah 0:ecc3925d3f8c 514 MSB(TOTAL_DESCRIPTOR_LENGTH), // wTotalLength (MSB)
Perijah 0:ecc3925d3f8c 515 0x01, // bNumInterfaces
Perijah 0:ecc3925d3f8c 516 DEFAULT_CONFIGURATION, // bConfigurationValue
Perijah 0:ecc3925d3f8c 517 0x00, // iConfiguration
Perijah 0:ecc3925d3f8c 518 C_RESERVED | C_SELF_POWERED, // bmAttributes
Perijah 0:ecc3925d3f8c 519 C_POWER(0), // bMaxPowerHello World from Mbed
Perijah 0:ecc3925d3f8c 520
Perijah 0:ecc3925d3f8c 521 INTERFACE_DESCRIPTOR_LENGTH, // bLength
Perijah 0:ecc3925d3f8c 522 INTERFACE_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 523 0x00, // bInterfaceNumber
Perijah 0:ecc3925d3f8c 524 0x00, // bAlternateSetting
Perijah 0:ecc3925d3f8c 525 0x02, // bNumEndpoints
Perijah 0:ecc3925d3f8c 526 HID_CLASS, // bInterfaceClass
Perijah 0:ecc3925d3f8c 527 1, // bInterfaceSubClass
Perijah 0:ecc3925d3f8c 528 1, // bInterfaceProtocol (keyboard)
Perijah 0:ecc3925d3f8c 529 0x00, // iInterface
Perijah 0:ecc3925d3f8c 530
Perijah 0:ecc3925d3f8c 531 HID_DESCRIPTOR_LENGTH, // bLength
Perijah 0:ecc3925d3f8c 532 HID_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 533 LSB(HID_VERSION_1_11), // bcdHID (LSB)
Perijah 0:ecc3925d3f8c 534 MSB(HID_VERSION_1_11), // bcdHID (MSB)
Perijah 0:ecc3925d3f8c 535 0x00, // bCountryCode
Perijah 0:ecc3925d3f8c 536 0x01, // bNumDescriptors
Perijah 0:ecc3925d3f8c 537 REPORT_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 538 LSB(reportDescLength()), // wDescriptorLength (LSB)
Perijah 0:ecc3925d3f8c 539 MSB(reportDescLength()), // wDescriptorLength (MSB)
Perijah 0:ecc3925d3f8c 540
Perijah 0:ecc3925d3f8c 541 ENDPOINT_DESCRIPTOR_LENGTH, // bLength
Perijah 0:ecc3925d3f8c 542 ENDPOINT_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 543 PHY_TO_DESC(EPINT_IN), // bEndpointAddress
Perijah 0:ecc3925d3f8c 544 E_INTERRUPT, // bmAttributes
Perijah 0:ecc3925d3f8c 545 LSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (LSB)
Perijah 0:ecc3925d3f8c 546 MSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (MSB)
Perijah 0:ecc3925d3f8c 547 1, // bInterval (milliseconds)
Perijah 0:ecc3925d3f8c 548
Perijah 0:ecc3925d3f8c 549 ENDPOINT_DESCRIPTOR_LENGTH, // bLength
Perijah 0:ecc3925d3f8c 550 ENDPOINT_DESCRIPTOR, // bDescriptorType
Perijah 0:ecc3925d3f8c 551 PHY_TO_DESC(EPINT_OUT), // bEndpointAddress
Perijah 0:ecc3925d3f8c 552 E_INTERRUPT, // bmAttributes
Perijah 0:ecc3925d3f8c 553 LSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (LSB)
Perijah 0:ecc3925d3f8c 554 MSB(MAX_PACKET_SIZE_EPINT), // wMaxPacketSize (MSB)
Perijah 0:ecc3925d3f8c 555 1, // bInterval (milliseconds)
Perijah 0:ecc3925d3f8c 556 };
Perijah 0:ecc3925d3f8c 557 return configurationDescriptor;
Perijah 0:ecc3925d3f8c 558 }