Fixed AVRISP-MKII Clone failing to start application firmware once a TPI programming...
[pub/USBasp.git] / Demos / Host / LowLevel / AndroidAccessoryHost / AndroidAccessoryHost.c
index 723cf50..7b2b796 100644 (file)
@@ -93,7 +93,7 @@ void AndroidHost_Task(void)
                /* Check if data is in the pipe */
                if (Pipe_IsReadWriteAllowed())
                {
-                       uint8_t NextReceivedByte = Pipe_BytesInPipe();
+                       uint8_t NextReceivedByte = Pipe_Read_8();
                        uint8_t LEDMask          = LEDS_NO_LEDS;
 
                        if (NextReceivedByte & 0x01)
@@ -183,7 +183,7 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
                }
                
                /* Validate the returned protocol version */
-               if (AndroidProtocol != ANDROID_PROTOCOL_Accessory)
+               if (AndroidProtocol != AOA_PROTOCOL_AccessoryV1)
                {
                        puts_P(PSTR(ESC_FG_RED "Accessory Mode Not Supported."));
 
@@ -192,12 +192,12 @@ void EVENT_USB_Host_DeviceEnumerationComplete(void)
                }
        
                /* Send the device strings and start the Android Accessory Mode */
-               Android_SendString(ANDROID_STRING_Manufacturer, "Dean Camera");
-               Android_SendString(ANDROID_STRING_Model,        "LUFA Android Demo");
-               Android_SendString(ANDROID_STRING_Description,  "LUFA Android Demo");
-               Android_SendString(ANDROID_STRING_Version,      "1.0");
-               Android_SendString(ANDROID_STRING_URI,          "http://www.lufa-lib.org");
-               Android_SendString(ANDROID_STRING_Serial,       "0000000012345678");
+               Android_SendString(AOA_STRING_Manufacturer, "Dean Camera");
+               Android_SendString(AOA_STRING_Model,        "LUFA Android Demo");
+               Android_SendString(AOA_STRING_Description,  "LUFA Android Demo");
+               Android_SendString(AOA_STRING_Version,      "1.0");
+               Android_SendString(AOA_STRING_URI,          "http://www.lufa-lib.org");
+               Android_SendString(AOA_STRING_Serial,       "0000000012345678");
 
                Android_StartAccessoryMode();   
                return;