Skip to content

Commit

Permalink
Merge pull request #5 from DeqingSun/addRC
Browse files Browse the repository at this point in the history
add busywait for fuse program
  • Loading branch information
ladyada authored Apr 12, 2021
2 parents 3769683 + 5de3056 commit e43f660
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Adafruit_AVRProg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ bool Adafruit_AVRProg::programFuses(const byte *fuses) {
return false;
}
}
busyWait();
f = pgm_read_byte(&fuses[FUSE_LOW]);
if (f) {
Serial.print(F("\tSet Low Fuse to: "));
Expand All @@ -202,6 +203,7 @@ bool Adafruit_AVRProg::programFuses(const byte *fuses) {
return false;
}
}
busyWait();
f = pgm_read_byte(&fuses[FUSE_HIGH]);
if (f) {
Serial.print(F("\tSet High Fuse to: "));
Expand All @@ -210,6 +212,7 @@ bool Adafruit_AVRProg::programFuses(const byte *fuses) {
return false;
}
}
busyWait();
f = pgm_read_byte(&fuses[FUSE_EXT]);
if (f) {
Serial.print(F("\tSet Ext Fuse to: "));
Expand All @@ -218,6 +221,7 @@ bool Adafruit_AVRProg::programFuses(const byte *fuses) {
return false;
}
}
busyWait();
Serial.println();
endProgramMode();
return true;
Expand Down

0 comments on commit e43f660

Please sign in to comment.