aboutsummaryrefslogtreecommitdiffstats
path: root/Projects/AVRISP/Lib/ISPProtocol.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-12-02 13:42:08 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-12-02 13:42:08 +0000
commit1f8dfd0205d431351425f468627984280b21cd5a (patch)
treec4db194265aeb65ad2b1965081788fa456b84ef0 /Projects/AVRISP/Lib/ISPProtocol.c
parent5930f47bf4b9b4490daf80d44595ff14ee7ce165 (diff)
downloadlufa-1f8dfd0205d431351425f468627984280b21cd5a.tar.gz
lufa-1f8dfd0205d431351425f468627984280b21cd5a.tar.bz2
lufa-1f8dfd0205d431351425f468627984280b21cd5a.zip
Add support for unwrapping of the XMEGA PDI programming protocol to the AVRISP Programmer project.
Diffstat (limited to 'Projects/AVRISP/Lib/ISPProtocol.c')
-rw-r--r--Projects/AVRISP/Lib/ISPProtocol.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Projects/AVRISP/Lib/ISPProtocol.c b/Projects/AVRISP/Lib/ISPProtocol.c
index bfd917a09..8bfa4d4d7 100644
--- a/Projects/AVRISP/Lib/ISPProtocol.c
+++ b/Projects/AVRISP/Lib/ISPProtocol.c
@@ -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
} Write_Memory_Params; // whole page and ACK the packet as fast as possible to prevent it from aborting
- Endpoint_Read_Stream_LE(&Write_Memory_Params, sizeof(Write_Memory_Params) - sizeof(Write_Memory_Params.ProgData));
+ Endpoint_Read_Stream_LE(&Write_Memory_Params, (sizeof(Write_Memory_Params) -
+ sizeof(Write_Memory_Params.ProgData)));
+
+
Write_Memory_Params.BytesToWrite = SwapEndian_16(Write_Memory_Params.BytesToWrite);
if (Write_Memory_Params.BytesToWrite > sizeof(Write_Memory_Params.ProgData))