Fd Object

Top  Previous  Next

object_fd

This is the flash disk (fd.) object, it allows you to utilize the unused portion of your flash memory for data storage. Your flash memory's primary use is to store the firmware of your device, as well as compiled Tibbo Basic application. The firmware/application typically occupy only a part of the flash memory. Available space will be referred to as the "data area" of the flash, as it can store your application's data.

There are two methods of working with the data area of the flash:

With file-based access, you create a formatted disk that stores files.
With direct sector access, you can write and read flash sectors directly, without burdening yourself with the file system.

Both methods can be used concurrently and complement each other whenever necessary.

 

Here is what the fd. object has to offer:

Maintains up to 64 files located in a single root directory (subdirectories are not supported, but can be emulated).
Flexible file attributes -- define and store any attributes you like.
Methods to work with the file directory.
Ability to open several files at once.
Methods to write to and read from the file, also cut the file size from the beginning or end.
Fast and flexible search to locate data within files. This also includes a record-style search!
Automatic sector leveling in the "housekeeping" area of the file.
Provisions for safe recovery from power failures.
A method for firmware/application self-upgrades.