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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user