Fixed LowLevel Keyboard demo not saving the issued report only after it has been written to the endpoint.

Added support for multiple keyboard keycodes in a single report to the LowLevel and ClassDriver Keyboard demos.
This commit is contained in:
Dean Camera 2009-11-20 04:39:41 +00:00
parent d753512cca
commit 7ef58eef7a
12 changed files with 68 additions and 36 deletions

View file

@ -268,9 +268,6 @@ void SendNextReport(void)
if ((MouseReportData.Y != 0) || (MouseReportData.X != 0))
SendReport = true;
/* Save the current report data for later comparison to check for changes */
PrevMouseReportData = MouseReportData;
/* Check if the idle period is set and has elapsed */
if ((IdleCount != HID_IDLE_CHANGESONLY) && (!(IdleMSRemaining)))
{
@ -286,7 +283,10 @@ void SendNextReport(void)
/* Check if Mouse Endpoint Ready for Read/Write and if we should send a new report */
if (Endpoint_IsReadWriteAllowed() && SendReport)
{
{
/* Save the current report data for later comparison to check for changes */
PrevMouseReportData = MouseReportData;
/* Write Mouse Report Data */
Endpoint_Write_Stream_LE(&MouseReportData, sizeof(MouseReportData));