Add support for unwrapping of the XMEGA PDI programming protocol to the AVRISP Progra...
[pub/lufa.git] / Projects / AVRISP / Lib / ISPProtocol.c
index bfd917a..8bfa4d4 100644 (file)
@@ -136,7 +136,10 @@ void ISPProtocol_ProgramMemory(uint8_t V2Command)
                uint8_t  ProgData[256]; // Note, the Jungo driver has a very short ACK timeout period, need to buffer the\r
        } Write_Memory_Params;      // whole page and ACK the packet as fast as possible to prevent it from aborting\r
        \r
-       Endpoint_Read_Stream_LE(&Write_Memory_Params, sizeof(Write_Memory_Params) - sizeof(Write_Memory_Params.ProgData));\r
+       Endpoint_Read_Stream_LE(&Write_Memory_Params, (sizeof(Write_Memory_Params) -\r
+                                                      sizeof(Write_Memory_Params.ProgData)));\r
+\r
+\r
        Write_Memory_Params.BytesToWrite = SwapEndian_16(Write_Memory_Params.BytesToWrite);\r
        \r
        if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))\r