From 8d5361044e84cb3e80d83e35f1946fb4f37a3079 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Fri, 21 Oct 2011 20:30:55 -0400 Subject: more attempts to get parameter sending to work --- bootloaders/nuevo_diskloader/src/DiskLoader.cpp | 34 ++++++++----------------- 1 file changed, 10 insertions(+), 24 deletions(-) (limited to 'bootloaders/nuevo_diskloader/src') diff --git a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp index 4f9c793..86d62e4 100644 --- a/bootloaders/nuevo_diskloader/src/DiskLoader.cpp +++ b/bootloaders/nuevo_diskloader/src/DiskLoader.cpp @@ -123,9 +123,9 @@ int main() for (;;) { while (Serial.available() <= 0) - ; - + ; u8 cmd = Serial.read(); + // Read packet contents u8 len; const u8* rs = _readSize; @@ -184,28 +184,14 @@ int main() // Serial.write(STK_INSYNC); USB_Send(CDC_TX, &_inSync, 1); -// u8 i; -// for (i=0; i 0) -// USB_Send(CDC_TX, pgm, send); - -// if (send) { -//// USB_Send(CDC_TX|TRANSFER_PGM, pgm, send); -// u8 _foo; -// _foo = 0x01; -// USB_Send(CDC_TX|TRANSFER_PGM, &_foo, 1); -// -// } - if (send) - Serial.write(0x01); + if (send) { + u8 i; + for (i=0; i