Skip to content

Commit

Permalink
Fixed incorrect return value for EEPROM.put/get. Thanks to Yves from …
Browse files Browse the repository at this point in the history
  • Loading branch information
p0lyg0n1 committed Aug 11, 2023
1 parent 4cc301a commit 2ff9abb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hardware/arduino/zunoG2/cores/EEPROM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

int EEPROMClass::put(uint32_t address, void *value, uint16_t val_size)
{
return (int)zunoSysCall(ZUNO_SYSFUNC_EEPROM_IO, 4, true, address, val_size, value);
return (int)(zunoSysCall(ZUNO_SYSFUNC_EEPROM_IO, 4, true, address, val_size, value) == 0);
}

int EEPROMClass::get(uint32_t address, void *value, uint16_t val_size)
{
return (int)zunoSysCall(ZUNO_SYSFUNC_EEPROM_IO, 4, false, address, val_size, value);
return (int)(zunoSysCall(ZUNO_SYSFUNC_EEPROM_IO, 4, false, address, val_size, value) == 0);
}

byte EEPROMClass::read(uint32_t address)
Expand Down

0 comments on commit 2ff9abb

Please sign in to comment.