AVR-Ada Wiki
Ada cross compiler and libraries for AVR µCs
Status: Beta
Brought to you by:
rolf_ebert
The package AVR.EEPROM allows reading and writing of the on-chip EEPROM memory.
with System;
with AVR.MCU;
package AVR.EEprom is
pragma Preelaborate;
-- indicate, if EEprom is ready for a new read/write operation
function Is_Ready return Boolean;
-- loops until EEprom is no longer busy
procedure Busy_Wait;
subtype EEprom_Address is System.Address range 0 .. AVR.MCU.E2end;
-- read a value from the specified address
function Get (Address : EEprom_Address) return Unsigned_8;
function Get (Address : EEprom_Address) return Unsigned_16;
procedure Get (Address : EEprom_Address; Data : out Nat8_Array);
-- store a value at the address
procedure Put (Address : EEprom_Address; Data : Unsigned_8);
procedure Put (Address : EEprom_Address; Data : Unsigned_16);
procedure Put (Address : EEprom_Address; Data : Nat8_Array);
end AVR.EEprom;