AVR-Ada Wiki
Ada cross compiler and libraries for AVR µCs
Status: Beta
Brought to you by:
rolf_ebert
There is no direct support within fatfs but one is easily derived from using the text I/O facilities. The general procedure for writing a binary record is as follows:
procedure Open_File(File : out TFCB_Type; Dir_Entry : Dir_Entry_Type; OK : out Boolean); procedure Open_File(File : out TFCB_Type; Dir : in out DCB_Type; Name : String; OK : out Boolean); procedure Rewind_File(File : in out TFCB_Type); procedure Read(File : in out TFCB_Type; Buffer : out U8_Array; Count : out Unsigned_16; OK : out Boolean); procedure Read(File : in out TFCB_Type; Data : out Unsigned_8; OK : out Boolean); procedure Read(File : in out TFCB_Type; Data : out Unsigned_16; OK : out Boolean); procedure Read(File : in out TFCB_Type; Data : out Unsigned_32; OK : out Boolean); procedure Close_File(File : in out TFCB_Type);
procedure Open_File(File : out TWCB_Type; Dir : in out DCB_Type; Name : String; OK : out Boolean); procedure Create_File(File : out TWCB_Type; Dir : in out DCB_Type; Name : String; OK : out Boolean); procedure Write(File : in out TWCB_Type; Buffer : U8_Array; OK : out Boolean); procedure Write(File : in out TWCB_Type; Data : Unsigned_8; OK : out Boolean); procedure Write(File : in out TWCB_Type; Data : Unsigned_16; OK : out Boolean); procedure Write(File : in out TWCB_Type; Data : Unsigned_32; OK : out Boolean); procedure Sync_File(File : in out TWCB_Type; OK : out Boolean); procedure Close_File(File : in out TWCB_Type; OK : out Boolean);