diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-21 20:30:55 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-10-21 20:30:55 -0400 |
commit | 8d5361044e84cb3e80d83e35f1946fb4f37a3079 (patch) | |
tree | fa829cbf16062800b3efc15a494ba458a33b070e /bootloaders/nuevo_diskloader/src | |
parent | b9eece6584577968a7bcd04249039408a68ba4be (diff) |
more attempts to get parameter sending to work
Diffstat (limited to 'bootloaders/nuevo_diskloader/src')
-rw-r--r-- | bootloaders/nuevo_diskloader/src/DiskLoader.cpp | 34 |
1 files changed, 10 insertions, 24 deletions
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<send; i++) { -// Serial.write(pgm[i]); -// } -// Serial.write(0x01); -// u8 i; -// for (i=0; i<send; i++) { -// Serial.write(); -// } - -// if (send > 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<send; i++) { +// Serial.write(0xFF); // this works +// Serial.write(*pgm + i); // this doesn't + Serial.write(pgm[i]); + } + } // Send ok // Serial.write(STK_OK); |