Skip to content

Commit

Permalink
Merge pull request #18 from tyeth/bump-version-2023-11-14-20-20-15
Browse files Browse the repository at this point in the history
Update version number to 1.4.7
  • Loading branch information
tyeth authored Nov 29, 2023
2 parents 5b01b5d + f227a4a commit 2ec0aa6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
3 changes: 2 additions & 1 deletion Adafruit_AVRProg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,8 @@ bool Adafruit_AVRProg::verifyImage(const byte *hextext) {
Serial.print(":0x");
Serial.print(b, HEX);
Serial.print(", ");
if (lineaddr % 16 == 0) Serial.println();
if (lineaddr % 16 == 0)
Serial.println();

#endif

Expand Down
2 changes: 1 addition & 1 deletion Adafruit_AVRProg.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef struct image {
///< datasheet!
#if defined(__SAMD21G18A__) || defined(__SAMD21E18A__) || \
defined(TEENSYDUINO) || defined(ESP8266) || defined(ESP32) || \
defined(__SAMD51__) || defined(ARDUINO_ARCH_RP2040)
defined(__SAMD51__) || defined(ARDUINO_ARCH_RP2040)
byte image_hexcode[80000]; ///< Max buffer for intel hex format image (text)
#else
byte image_hexcode[10000]; ///< Max buffer for intel hex format image (text)
Expand Down
14 changes: 5 additions & 9 deletions Adafruit_UPDIProg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -615,7 +615,7 @@ bool Adafruit_AVRProg::updi_run_tasks(uint16_t tasks, uint8_t *data,

// Write flash from hex file
if (tasks & UPDI_TASK_WRITE_FLASH) {
Serial.printf("delta: %d millis\n", millis() - start);
Serial.printf("delta: %lu millis\n", millis() - start);
int16_t flashpagesize = g_updi.config->flash_pagesize;
int32_t remainingsize = size;

Expand Down Expand Up @@ -853,16 +853,13 @@ void Adafruit_AVRProg::updi_leave_progmode() {
*/
/**************************************************************************/
bool Adafruit_AVRProg::UPDIunlock(void) {
bool success;

updi_init(true);

if (!updi_check()) {
DEBUG_TASK("UPDI not initialised\n");

if (!updi_device_force_reset()) {
DEBUG_TASK("double BREAK reset failed\n");
success = false;
return false;
}
updi_init(false); // re-init the UPDI interface
Expand All @@ -872,7 +869,6 @@ bool Adafruit_AVRProg::UPDIunlock(void) {
// TODO find out why these are not already correct
g_updi.initialized = false;
g_updi.unlocked = false;
success = false;
return false;
} else {
DEBUG_PHYSICAL("UPDI INITIALISED\n");
Expand Down Expand Up @@ -1092,7 +1088,7 @@ bool Adafruit_AVRProg::updi_read_page(uint16_t address, uint16_t bufsize,
return false;
}
if (bufsize > AVR_PAGESIZE_MAX) {
Serial.printf("Chip buffer %d bytes exceeds %s byte maximum\n", bufsize,
Serial.printf("Chip buffer %d bytes exceeds %d byte maximum\n", bufsize,
AVR_PAGESIZE_MAX);
return false;
}
Expand Down Expand Up @@ -1139,7 +1135,7 @@ bool Adafruit_AVRProg::updi_write_page(uint16_t address, uint16_t pagesize,

// Serial.println(F("Is in prog mode"));
if (pagesize > AVR_PAGESIZE_MAX) {
Serial.printf("Chip pagesize %d bytes exceeds %s byte maximum\n", pagesize,
Serial.printf("Chip pagesize %d bytes exceeds %d byte maximum\n", pagesize,
AVR_PAGESIZE_MAX);
return false;
}
Expand All @@ -1148,14 +1144,14 @@ bool Adafruit_AVRProg::updi_write_page(uint16_t address, uint16_t pagesize,
address); // deliberately no LF; the start + progress + finish
// messages are all combined

Serial.printf("before write: %d millis\n", millis() - t);
Serial.printf("before write: %lu millis\n", millis() - t);
t = millis();
if (!updi_write_nvm(address, pagedata, pagesize,
UPDI_NVMCTRL_CTRLA_updi_write_PAGE, true)) {
Serial.printf(" Failed\n");
return false;
}
Serial.printf("updi_write_nvm: %d millis\n", millis() - t);
Serial.printf("updi_write_nvm: %lu millis\n", millis() - t);

// Serial.printf("Finished\n");
return true;
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Adafruit AVRProg
version=1.4.5
version=1.4.7
author=Adafruit
maintainer=Adafruit <[email protected]>
sentence=Arduino library for programming AVR chips from Arduino
Expand Down

0 comments on commit 2ec0aa6

Please sign in to comment.