/* Task to manage an enumerated USB Android Accessory device once connected, to print received data from the device to the serial port.  */
void AOAHost_Task(void)
/* Task to manage an enumerated USB Android Accessory device once connected, to print received data from the device to the serial port.  */
void AOAHost_Task(void)
{
	if (USB_HostState != HOST_STATE_Configured)
	  return;
	if (AOA_Host_BytesReceived(&AndroidDevice_AOA_Interface))
	{
		int16_t ReceivedByte = AOA_Host_ReceiveByte(&AndroidDevice_AOA_Interface);
		if (!(ReceivedByte < 0))
		{
			LEDs_ChangeLEDs(LEDS_LED1, ReceivedByte ? LEDS_LED1 : LEDS_NO_LEDS);
			putchar(ReceivedByte);
		}
	}
}