Skip to content

Read / write byte or objects (structure, array, float...) from / into an external I2C EEPROM

License

Notifications You must be signed in to change notification settings

wEPac/I2C_ExtEEPROM

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

I2C_ExtEEPROM (Arduino)

Read / write byte or objects (structure, array, float...) from / into an external I2C EEPROM.

There is no checking here, the deal is to reduce code size.


Basic settings:

  • ExtEEPROM.setClock(int clockFrequency), set the I2C clock (400 => 400kHz)
  • ExtEEPROM.setID(byte addr_ID), set the ID address of the device (by default, this is 0x50)

Work on a single byte:

  • byte data = ExtEEPROM.read(int addr), return the byte from the EEPROM
  • ExtEEPROM.write(int addr, byte data), write the byte 'data' into the EEPROM
  • ExtEEPROM.check(int addr, byte data), same than 'write', but only if the byte into the EEPROM is different

Work on any object (structure, array, float...):

  • ExtEEPROM.get(int addr, object), read from the EEPROM to fill the object
  • ExtEEPROM.put(int addr, const object), write into EEPROM the content of the object
  • ExtEEPROM.update(int addr, const object), same than 'put', but only if the byte into the EEPROM is different

About

Read / write byte or objects (structure, array, float...) from / into an external I2C EEPROM

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages