/* Task to read in and processes the next report from the attached device, displaying the report contents on the board LEDs and via the serial port.  */
void KeyboardHost_Task(void)
/* Task to read in and processes the next report from the attached device, displaying the report contents on the board LEDs and via the serial port.  */
void KeyboardHost_Task(void)
{
	if (USB_HostState != HOST_STATE_Configured)
	  return;
	Pipe_SelectPipe(KEYBOARD_DATA_IN_PIPE);
	Pipe_Unfreeze();
	if (Pipe_IsINReceived())
	{
		if (Pipe_IsReadWriteAllowed())
		{
			uint8_t KeyboardReport[Pipe_BytesInPipe()];
			Pipe_Read_Stream_LE(KeyboardReport, Pipe_BytesInPipe(), NULL);
			ProcessKeyboardReport(KeyboardReport);
		}
		Pipe_ClearIN();
	}
	Pipe_Freeze();
}