File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 10
10
// 8: Error - Lights up if something goes wrong (use red if that makes sense)
11
11
// 7: Programming - In communication with the slave
12
12
//
13
+ // 23 July 2011 Randall Bohn
14
+ // -Address Arduino issue 509 :: Portability of ArduinoISP
15
+ // http://code.google.com/p/arduino/issues/detail?id=509
16
+ //
13
17
// October 2010 by Randall Bohn
14
18
// - Write to EEPROM > 256 bytes
15
19
// - Better use of LEDs:
@@ -360,7 +364,8 @@ uint8_t write_eeprom_chunk(int start, int length) {
360
364
361
365
void program_page () {
362
366
char result = (char ) STK_FAILED ;
363
- int length = 256 * getch() + getch();
367
+ int length = 256 * getch();
368
+ length += getch();
364
369
char memtype = getch();
365
370
// flash memory @here, (length) bytes
366
371
if (memtype == ' F' ) {
@@ -413,7 +418,8 @@ char eeprom_read_page(int length) {
413
418
414
419
void read_page () {
415
420
char result = (char )STK_FAILED ;
416
- int length = 256 * getch() + getch();
421
+ int length = 256 * getch();
422
+ length += getch();
417
423
char memtype = getch();
418
424
if (CRC_EOP != getch()) {
419
425
error++ ;
@@ -481,7 +487,8 @@ int avrisp() {
481
487
empty_reply();
482
488
break ;
483
489
case ' U' : // set address (word)
484
- here = getch() + 256 * getch();
490
+ here = getch();
491
+ here += 256 * getch();
485
492
empty_reply();
486
493
break ;
487
494
You can’t perform that action at this time.
0 commit comments