Add new MIDI Host Class driver to the library, and new MIDIHost ClassDriver demo.
Make MouseHost and KeyboardHost ClassDriver demos use the HID Class driver's structures for the boot protocol Mouse/Keyboard report data, rather than rolling their own.
This commit is contained in:
parent
664a292181
commit
c7bc3ec391
24 changed files with 3014 additions and 79 deletions
|
@ -161,13 +161,13 @@ void ReadNextReport(void)
|
|||
char PressedKey = 0;
|
||||
|
||||
/* Retrieve pressed key character if alphanumeric */
|
||||
if ((KeyboardReport.KeyCode >= 0x04) && (KeyboardReport.KeyCode <= 0x1D))
|
||||
PressedKey = (KeyboardReport.KeyCode - 0x04) + 'A';
|
||||
else if ((KeyboardReport.KeyCode >= 0x1E) && (KeyboardReport.KeyCode <= 0x27))
|
||||
PressedKey = (KeyboardReport.KeyCode - 0x1E) + '0';
|
||||
else if (KeyboardReport.KeyCode == 0x2C)
|
||||
if ((KeyboardReport.KeyCode[0] >= 0x04) && (KeyboardReport.KeyCode[0] <= 0x1D))
|
||||
PressedKey = (KeyboardReport.KeyCode[0] - 0x04) + 'A';
|
||||
else if ((KeyboardReport.KeyCode[0] >= 0x1E) && (KeyboardReport.KeyCode[0] <= 0x27))
|
||||
PressedKey = (KeyboardReport.KeyCode[0] - 0x1E) + '0';
|
||||
else if (KeyboardReport.KeyCode[0] == 0x2C)
|
||||
PressedKey = ' ';
|
||||
else if (KeyboardReport.KeyCode == 0x28)
|
||||
else if (KeyboardReport.KeyCode[0] == 0x28)
|
||||
PressedKey = '\n';
|
||||
|
||||
/* Print the pressed key character out through the serial port if valid */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue