Keyboard.c 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. /*
  2. MNT Reform v2 Keyboard Firmware
  3. Copyright 2019 Lukas F. Hartmann / MNT Research GmbH, Berlin
  4. lukas@mntmn.com
  5. */
  6. /*
  7. LUFA Library
  8. Copyright (C) Dean Camera, 2018.
  9. dean [at] fourwalledcubicle [dot] com
  10. www.lufa-lib.org
  11. */
  12. /*
  13. Copyright 2018 Dean Camera (dean [at] fourwalledcubicle [dot] com)
  14. Permission to use, copy, modify, distribute, and sell this
  15. software and its documentation for any purpose is hereby granted
  16. without fee, provided that the above copyright notice appear in
  17. all copies and that both that the copyright notice and this
  18. permission notice and warranty disclaimer appear in supporting
  19. documentation, and that the name of the author not be used in
  20. advertising or publicity pertaining to distribution of the
  21. software without specific, written prior permission.
  22. The author disclaims all warranties with regard to this
  23. software, including all implied warranties of merchantability
  24. and fitness. In no event shall the author be liable for any
  25. special, indirect or consequential damages or any damages
  26. whatsoever resulting from loss of use, data or profits, whether
  27. in an action of contract, negligence or other tortious action,
  28. arising out of or in connection with the use or performance of
  29. this software.
  30. */
  31. #include "Config/LUFAConfig.h"
  32. #include "Keyboard.h"
  33. #include <avr/io.h>
  34. #include "LUFA/Drivers/Peripheral/Serial.h"
  35. #include "ssd1306.h"
  36. #include "scancodes.h"
  37. #include <stdlib.h>
  38. /** Buffer to hold the previously generated Keyboard HID report, for comparison purposes inside the HID class driver. */
  39. static uint8_t PrevKeyboardHIDReportBuffer[sizeof(USB_KeyboardReport_Data_t)];
  40. /** LUFA HID Class driver interface configuration and state information. This structure is
  41. * passed to all HID Class driver functions, so that multiple instances of the same class
  42. * within a device can be differentiated from one another.
  43. */
  44. USB_ClassInfo_HID_Device_t Keyboard_HID_Interface =
  45. {
  46. .Config =
  47. {
  48. .InterfaceNumber = INTERFACE_ID_Keyboard,
  49. .ReportINEndpoint =
  50. {
  51. .Address = KEYBOARD_EPADDR,
  52. .Size = KEYBOARD_EPSIZE,
  53. .Banks = 1,
  54. },
  55. .PrevReportINBuffer = PrevKeyboardHIDReportBuffer,
  56. .PrevReportINBufferSize = sizeof(PrevKeyboardHIDReportBuffer),
  57. },
  58. };
  59. #define output_low(port,pin) port &= ~(1<<pin)
  60. #define output_high(port,pin) port |= (1<<pin)
  61. #define set_input(portdir,pin) portdir &= ~(1<<pin)
  62. #define set_output(portdir,pin) portdir |= (1<<pin)
  63. const uint8_t matrix[15*6] = {
  64. KEY_ESCAPE, KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, KEY_F9, KEY_F10, KEY_F11, KEY_F12, HID_KEYBOARD_SC_EXSEL, HID_KEYBOARD_SC_EXSEL,
  65. KEY_GRAVE_ACCENT_AND_TILDE, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS_AND_UNDERSCORE, KEY_EQUAL_AND_PLUS, KEY_BACKSPACE, 0,
  66. KEY_TAB, KEY_Q, KEY_W, KEY_E, KEY_R, KEY_T, KEY_Y, KEY_U, KEY_I, KEY_O, KEY_P, KEY_OPENING_BRACKET_AND_OPENING_BRACE, KEY_CLOSING_BRACKET_AND_CLOSING_BRACE, KEY_BACKSLASH_AND_PIPE, 0,
  67. HID_KEYBOARD_SC_LEFT_CONTROL, KEY_F13, KEY_A, KEY_S, KEY_D, KEY_F, KEY_G, KEY_H, KEY_J, KEY_K, KEY_L, KEY_SEMICOLON_AND_COLON, KEY_APOSTROPHE_AND_QUOTE, KEY_ENTER, 0,
  68. HID_KEYBOARD_SC_LEFT_SHIFT, KEY_DELETE, KEY_Z, KEY_X, KEY_C, KEY_V, KEY_B, KEY_N, KEY_M, HID_KEYBOARD_SC_COMMA_AND_LESS_THAN_SIGN, HID_KEYBOARD_SC_DOT_AND_GREATER_THAN_SIGN, KEY_SLASH_AND_QUESTION_MARK, HID_KEYBOARD_SC_UP_ARROW, HID_KEYBOARD_SC_RIGHT_SHIFT, 0,
  69. HID_KEYBOARD_SC_EXSEL, HID_KEYBOARD_SC_LEFT_GUI, HID_KEYBOARD_SC_LEFT_CONTROL, KEY_SPACE, HID_KEYBOARD_SC_LEFT_ALT, HID_KEYBOARD_SC_RIGHT_ALT, KEY_SPACE, HID_KEYBOARD_SC_PAGE_UP, HID_KEYBOARD_SC_PAGE_DOWN, HID_KEYBOARD_SC_LEFT_ARROW, HID_KEYBOARD_SC_DOWN_ARROW, HID_KEYBOARD_SC_RIGHT_ARROW, 0,0,0
  70. };
  71. // f8 = sleep
  72. // 49 = mute
  73. // 84 = scroll lock
  74. char r_inbuf[10];
  75. void gfx_clear(void) {
  76. for (int y=0; y<4; y++) {
  77. for (int x=0; x<21; x++) {
  78. gfx_poke(x,y,' ');
  79. }
  80. }
  81. }
  82. void empty_serial(void) {
  83. int clock = 0;
  84. while (Serial_ReceiveByte()>=0 && clock<1000) {
  85. // flush serial
  86. clock++;
  87. }
  88. }
  89. int term_x = 0;
  90. int term_y = 0;
  91. char response[64];
  92. int remote_receive_string(int print) {
  93. char done = 0;
  94. int32_t clock = 0;
  95. int res_x = 0;
  96. response[0] = 0;
  97. while (!done) {
  98. int16_t chr = -1;
  99. clock = 0;
  100. while (chr==-1 || chr==0) {
  101. chr=Serial_ReceiveByte();
  102. clock++;
  103. if (clock>100000) goto timeout;
  104. }
  105. int poke_chr = chr;
  106. if (chr=='\n') poke_chr=' ';
  107. if (chr!='\r') {
  108. if (print) {
  109. gfx_poke(term_x,term_y,poke_chr);
  110. gfx_poke(term_x+1,term_y,' ');
  111. term_x++;
  112. if (term_x>=20) {
  113. term_x=0;
  114. term_y++;
  115. if (term_y>=3) {
  116. term_y=0;
  117. }
  118. }
  119. }
  120. if (res_x<63) {
  121. response[res_x++] = chr;
  122. response[res_x] = 0;
  123. }
  124. }
  125. if (chr=='\r') done = 1;
  126. }
  127. timeout:
  128. if (!done && print) gfx_poke(20,0,'T');
  129. empty_serial();
  130. if (print) {
  131. iota_gfx_flush();
  132. }
  133. return done;
  134. }
  135. void anim_hello(void) {
  136. gfx_clear();
  137. iota_gfx_on();
  138. for (int y=0; y<3; y++) {
  139. for (int x=0; x<12; x++) {
  140. gfx_poke(x+4,y+1,(5+y)*32+x);
  141. iota_gfx_flush();
  142. }
  143. }
  144. for (int y=0; y<0xff; y++) {
  145. iota_gfx_contrast(y);
  146. Delay_MS(2);
  147. }
  148. for (int y=0; y<0xff; y++) {
  149. iota_gfx_contrast(0xff-y);
  150. Delay_MS(2);
  151. }
  152. }
  153. void anim_goodbye(void) {
  154. gfx_clear();
  155. iota_gfx_on();
  156. for (int y=0; y<3; y++) {
  157. for (int x=0; x<12; x++) {
  158. gfx_poke(x+4,y+1,(5+y)*32+x);
  159. }
  160. }
  161. for (int y=0; y<3; y++) {
  162. for (int x=0; x<12; x++) {
  163. gfx_poke(x+4,y+1,' ');
  164. iota_gfx_flush();
  165. }
  166. }
  167. iota_gfx_off();
  168. }
  169. float voltages[8];
  170. void insert_bat_icon(char* str, int x, float v) {
  171. char icon = 0;
  172. if (v>=3.3) {
  173. icon = 8;
  174. } else if (v>=3.1) {
  175. icon = 6;
  176. } else if (v>=3.0) {
  177. icon = 4;
  178. } else if (v>=2.9) {
  179. icon = 2;
  180. } else {
  181. icon = 0;
  182. }
  183. str[x] = 4*32+icon;
  184. str[x+1] = 4*32+icon+1;
  185. }
  186. void remote_get_voltages(void) {
  187. empty_serial();
  188. term_x = 0;
  189. term_y = 0;
  190. float bat_volts = 0;
  191. float bat_amps = 0;
  192. Serial_SendByte('V');
  193. Serial_SendByte('\r');
  194. Delay_MS(1);
  195. remote_receive_string(0);
  196. bat_volts = ((float)atoi(response))/1000.0;
  197. Serial_SendByte('a');
  198. Serial_SendByte('\r');
  199. Delay_MS(1);
  200. remote_receive_string(0);
  201. bat_amps = -((float)atoi(response))/1000.0;
  202. float sum_volts = 0;
  203. for (int i=0; i<8; i++) {
  204. // progress anim
  205. gfx_poke(0,0,32*4+((2*i)%10));
  206. gfx_poke(1,0,32*4+1+((2*i)%10));
  207. iota_gfx_flush();
  208. Serial_SendByte('0'+i);
  209. Serial_SendByte('v');
  210. Serial_SendByte('\r');
  211. Delay_MS(1);
  212. remote_receive_string(0);
  213. voltages[i] = ((float)atoi(response))/1000.0;
  214. if (voltages[i]<0 || voltages[i]>=5) voltages[i]=0;
  215. sum_volts += voltages[i];
  216. }
  217. //plot voltages
  218. gfx_clear();
  219. float percentage = ((sum_volts-23.0)/5.0)*100.0;
  220. if (percentage<0) percentage = 0;
  221. char str[32];
  222. sprintf(str,"[] %.1f [] %.1f",voltages[0],voltages[4]);
  223. insert_bat_icon(str,0,voltages[0]);
  224. insert_bat_icon(str,8,voltages[4]);
  225. gfx_poke_str(0,0,str);
  226. sprintf(str,"[] %.1f [] %.1f %d%%",voltages[1],voltages[5],(int)percentage);
  227. insert_bat_icon(str,0,voltages[1]);
  228. insert_bat_icon(str,8,voltages[5]);
  229. gfx_poke_str(0,1,str);
  230. sprintf(str,"[] %.1f [] %.1f %.2fA",voltages[2],voltages[6],bat_amps);
  231. insert_bat_icon(str,0,voltages[2]);
  232. insert_bat_icon(str,8,voltages[6]);
  233. gfx_poke_str(0,2,str);
  234. sprintf(str,"[] %.1f [] %.1f %.1fV",voltages[3],voltages[7],bat_volts);
  235. insert_bat_icon(str,0,voltages[3]);
  236. insert_bat_icon(str,8,voltages[7]);
  237. gfx_poke_str(0,3,str);
  238. iota_gfx_flush();
  239. }
  240. void remote_get_status(void) {
  241. gfx_clear();
  242. empty_serial();
  243. term_x = 0;
  244. term_y = 0;
  245. Serial_SendByte('s');
  246. Serial_SendByte('\r');
  247. Delay_MS(1);
  248. remote_receive_string(1);
  249. }
  250. void remote_get_cells(void) {
  251. gfx_clear();
  252. empty_serial();
  253. term_x = 0;
  254. term_y = 0;
  255. for (int i=0; i<8; i++) {
  256. Serial_SendByte('0'+i);
  257. Serial_SendByte('c');
  258. Serial_SendByte('\r');
  259. Delay_MS(1);
  260. remote_receive_string(1);
  261. }
  262. }
  263. void remote_get_sys_voltage(void) {
  264. gfx_clear();
  265. empty_serial();
  266. term_x = 0;
  267. term_y = 0;
  268. Serial_SendByte('V');
  269. Serial_SendByte('\r');
  270. Delay_MS(1);
  271. remote_receive_string(1);
  272. Serial_SendByte('a');
  273. Serial_SendByte('\r');
  274. Delay_MS(1);
  275. remote_receive_string(1);
  276. Serial_SendByte('C');
  277. Serial_SendByte('\r');
  278. Delay_MS(1);
  279. remote_receive_string(1);
  280. }
  281. int oledbrt=0;
  282. void oled_brightness_inc(void) {
  283. oledbrt+=10;
  284. if (oledbrt>=0xff) oledbrt = 0xff;
  285. iota_gfx_contrast(oledbrt);
  286. }
  287. void oled_brightness_dec(void) {
  288. oledbrt-=10;
  289. if (oledbrt<0) oledbrt = 0;
  290. iota_gfx_contrast(oledbrt);
  291. }
  292. int16_t pwmval = 8;
  293. void kbd_brightness_init(void) {
  294. // initial brightness
  295. OCR0A = pwmval;
  296. // clear/set, WGM1:0 set (Phase correct PWM)
  297. TCCR0A = (1 << 7) | (0 << 6) | (0<<1) | 1;
  298. // 3=WGM02, (cs02 2:0 -> clock/256 = 100)
  299. TCCR0B = /*(1 << 3) |*/ (1 << 0) | (0 << 1) | 1;
  300. }
  301. void kbd_brightness_inc(void) {
  302. pwmval+=2;
  303. if (pwmval>=10) pwmval = 10;
  304. OCR0A = pwmval;
  305. gfx_poke(0,4,'0'+pwmval/2);
  306. iota_gfx_flush();
  307. }
  308. void kbd_brightness_dec(void) {
  309. pwmval-=2;
  310. if (pwmval<0) pwmval = 0;
  311. OCR0A = pwmval;
  312. gfx_poke(0,4,'0'+pwmval/2);
  313. iota_gfx_flush();
  314. }
  315. void remote_turn_on_som(void) {
  316. gfx_clear();
  317. empty_serial();
  318. term_x = 0;
  319. term_y = 0;
  320. Serial_SendByte('1');
  321. Serial_SendByte('p');
  322. Serial_SendByte('\r');
  323. Delay_MS(1);
  324. empty_serial();
  325. //remote_receive_string();
  326. anim_hello();
  327. kbd_brightness_init();
  328. }
  329. void remote_turn_off_som(void) {
  330. anim_goodbye();
  331. empty_serial();
  332. term_x = 0;
  333. term_y = 0;
  334. Serial_SendByte('0');
  335. Serial_SendByte('p');
  336. Serial_SendByte('\r');
  337. Delay_MS(1);
  338. empty_serial();
  339. //remote_receive_string();
  340. }
  341. char metaPressed = 0;
  342. uint8_t lastMetaKey = 0;
  343. void process_keyboard(char usb_report_mode, USB_KeyboardReport_Data_t* KeyboardReport) {
  344. uint8_t metaPressedNow = 0;
  345. // how many keys are pressed this round
  346. uint8_t usedKeyCodes = 0;
  347. uint8_t totalPressed = 0;
  348. // pull ROWs low one after the other
  349. for (int y=0; y<6; y++) {
  350. switch (y) {
  351. case 0: output_low(PORTB, 6); break;
  352. case 1: output_low(PORTB, 5); break;
  353. case 2: output_low(PORTB, 4); break;
  354. case 3: output_low(PORTD, 7); break;
  355. case 4: output_low(PORTD, 6); break;
  356. case 5: output_low(PORTD, 4); break;
  357. }
  358. // check input COLs
  359. for (int x=0; x<14; x++) {
  360. uint16_t keycode = matrix[y*15+x];
  361. uint8_t pressed = 0;
  362. // column pins are all over the place
  363. switch (x) {
  364. case 0: pressed = !(PIND&(1<<5)); break;
  365. case 1: pressed = !(PINF&(1<<7)); break;
  366. case 2: pressed = !(PINE&(1<<6)); break;
  367. case 3: pressed = !(PINC&(1<<7)); break;
  368. case 4: pressed = !(PINB&(1<<3)); break;
  369. case 5: pressed = !(PINB&(1<<2)); break;
  370. case 6: pressed = !(PINB&(1<<1)); break;
  371. case 7: pressed = !(PINB&(1<<0)); break;
  372. case 8: pressed = !(PINF&(1<<0)); break;
  373. case 9: pressed = !(PINF&(1<<1)); break;
  374. case 10: pressed = !(PINF&(1<<4)); break;
  375. case 11: pressed = !(PINF&(1<<5)); break;
  376. case 12: pressed = !(PINF&(1<<6)); break;
  377. case 13: pressed = !(PINC&(1<<6)); break;
  378. }
  379. if (pressed) {
  380. totalPressed++;
  381. if (keycode == HID_KEYBOARD_SC_EXSEL) {
  382. metaPressedNow = 1;
  383. } else {
  384. if (usb_report_mode && KeyboardReport && !metaPressed) {
  385. KeyboardReport->KeyCode[usedKeyCodes++] = keycode;
  386. }
  387. if (metaPressed && lastMetaKey!=keycode) {
  388. if (keycode == KEY_0) {
  389. remote_turn_off_som();
  390. }
  391. else if (keycode == KEY_1) {
  392. remote_turn_on_som();
  393. }
  394. else if (keycode == KEY_V) {
  395. remote_get_voltages();
  396. }
  397. else if (keycode == KEY_C) {
  398. remote_get_cells();
  399. }
  400. else if (keycode == KEY_S) {
  401. remote_get_status();
  402. }
  403. else if (keycode == KEY_Y) {
  404. remote_get_sys_voltage();
  405. }
  406. else if (keycode == KEY_2) {
  407. iota_gfx_off();
  408. }
  409. else if (keycode == KEY_3) {
  410. iota_gfx_on();
  411. }
  412. else if (keycode == KEY_F1) {
  413. kbd_brightness_dec();
  414. }
  415. else if (keycode == KEY_F2) {
  416. kbd_brightness_inc();
  417. }
  418. else if (keycode == KEY_F3) {
  419. oled_brightness_dec();
  420. }
  421. else if (keycode == KEY_F4) {
  422. oled_brightness_inc();
  423. }
  424. lastMetaKey = keycode;
  425. }
  426. }
  427. }
  428. }
  429. switch (y) {
  430. case 0: output_high(PORTB, 6); break;
  431. case 1: output_high(PORTB, 5); break;
  432. case 2: output_high(PORTB, 4); break;
  433. case 3: output_high(PORTD, 7); break;
  434. case 4: output_high(PORTD, 6); break;
  435. case 5: output_high(PORTD, 4); break;
  436. }
  437. }
  438. metaPressed = metaPressedNow;
  439. if (totalPressed<2) lastMetaKey = 0;
  440. }
  441. int main(void)
  442. {
  443. SetupHardware();
  444. GlobalInterruptEnable();
  445. for (;;)
  446. {
  447. process_keyboard(0, NULL);
  448. HID_Device_USBTask(&Keyboard_HID_Interface);
  449. USB_USBTask();
  450. }
  451. }
  452. /** Configures the board hardware and chip peripherals for the demo's functionality. */
  453. void SetupHardware()
  454. {
  455. // Disable watchdog if enabled by bootloader/fuses
  456. MCUSR &= ~(1 << WDRF);
  457. wdt_disable();
  458. // Disable clock division
  459. clock_prescale_set(clock_div_1);
  460. // declare port pins as inputs (0) and outputs (1)
  461. DDRB = 0b11110000;
  462. DDRC = 0b00000000;
  463. DDRD = 0b11011001;
  464. DDRE = 0b00000000;
  465. DDRF = 0b00000000;
  466. // initial pin states
  467. PORTB = 0b10001111;
  468. PORTC = 0b11000000;
  469. PORTD = 0b00100000;
  470. PORTE = 0b01000000;
  471. PORTF = 0b11111111;
  472. // disable JTAG
  473. MCUCR |=(1<<JTD);
  474. MCUCR |=(1<<JTD);
  475. iota_gfx_init(false);
  476. anim_hello();
  477. Serial_Init(57600, false);
  478. kbd_brightness_init();
  479. USB_Init();
  480. }
  481. /** Event handler for the library USB Connection event. */
  482. void EVENT_USB_Device_Connect(void)
  483. {
  484. }
  485. /** Event handler for the library USB Disconnection event. */
  486. void EVENT_USB_Device_Disconnect(void)
  487. {
  488. }
  489. /** Event handler for the library USB Configuration Changed event. */
  490. void EVENT_USB_Device_ConfigurationChanged(void)
  491. {
  492. bool ConfigSuccess = true;
  493. ConfigSuccess &= HID_Device_ConfigureEndpoints(&Keyboard_HID_Interface);
  494. USB_Device_EnableSOFEvents();
  495. }
  496. /** Event handler for the library USB Control Request reception event. */
  497. void EVENT_USB_Device_ControlRequest(void)
  498. {
  499. HID_Device_ProcessControlRequest(&Keyboard_HID_Interface);
  500. }
  501. /** Event handler for the USB device Start Of Frame event. */
  502. void EVENT_USB_Device_StartOfFrame(void)
  503. {
  504. HID_Device_MillisecondElapsed(&Keyboard_HID_Interface);
  505. }
  506. /** HID class driver callback function for the creation of HID reports to the host.
  507. *
  508. * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
  509. * \param[in,out] ReportID Report ID requested by the host if non-zero, otherwise callback should set to the generated report ID
  510. * \param[in] ReportType Type of the report to create, either HID_REPORT_ITEM_In or HID_REPORT_ITEM_Feature
  511. * \param[out] ReportData Pointer to a buffer where the created report should be stored
  512. * \param[out] ReportSize Number of bytes written in the report (or zero if no report is to be sent)
  513. *
  514. * \return Boolean \c true to force the sending of the report, \c false to let the library determine if it needs to be sent
  515. */
  516. bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
  517. uint8_t* const ReportID,
  518. const uint8_t ReportType,
  519. void* ReportData,
  520. uint16_t* const ReportSize)
  521. {
  522. USB_KeyboardReport_Data_t* KeyboardReport = (USB_KeyboardReport_Data_t*)ReportData;
  523. process_keyboard(1, KeyboardReport);
  524. *ReportSize = sizeof(USB_KeyboardReport_Data_t);
  525. return false;
  526. }
  527. /** HID class driver callback function for the processing of HID reports from the host.
  528. *
  529. * \param[in] HIDInterfaceInfo Pointer to the HID class interface configuration structure being referenced
  530. * \param[in] ReportID Report ID of the received report from the host
  531. * \param[in] ReportType The type of report that the host has sent, either HID_REPORT_ITEM_Out or HID_REPORT_ITEM_Feature
  532. * \param[in] ReportData Pointer to a buffer where the received report has been stored
  533. * \param[in] ReportSize Size in bytes of the received HID report
  534. */
  535. void CALLBACK_HID_Device_ProcessHIDReport(USB_ClassInfo_HID_Device_t* const HIDInterfaceInfo,
  536. const uint8_t ReportID,
  537. const uint8_t ReportType,
  538. const void* ReportData,
  539. const uint16_t ReportSize)
  540. {
  541. }