AVR-Ada Wiki
Ada cross compiler and libraries for AVR µCs
Status: Beta
Brought to you by:
rolf_ebert
Package AVR.Programspace provides access to constants stored in program memory.
with System;
package AVR.Programspace is
pragma Preelaborate;
subtype Program_Address is System.Address;
type Far_Program_Address is mod 2 ** 32;
-- read bytes (8bit), Unsigned_16s (16bit) or double words (32bit) from
-- an address in programm memory (flash).
function Get_Byte (Addr : Program_Address) return Unsigned_8;
function Get (Addr : Program_Address) return Unsigned_8 renames Get_Byte;
function Get_Char (Addr : Program_Address) return Character;
function Get (Addr : Program_Address) return Character renames Get_Char;
function Get_Word (Addr : Program_Address) return Unsigned_16;
function Get (Addr : Program_Address) return Unsigned_16 renames Get_Word;
function Get_DWord (Addr : Program_Address) return Unsigned_32;
function Get (Addr : Program_Address) return Unsigned_32 renames Get_DWord;
function Get (Addr : Far_Program_Address) return Unsigned_8;
function Get (Addr : Far_Program_Address) return Unsigned_16;
function Get (Addr : Far_Program_Address) return Unsigned_32;
procedure Inc (Addr : in out Program_Address); -- increment address by 1
procedure Dec (Addr : in out Program_Address); -- decrement address by 1
end AVR.Programspace;