File specific macros. More...

Macros

#define GOS_FILENAME_MAX_LENGTH 95
The maximum length of a filename (including null-terminating character)
#define GOS_FILE_SECTOR_LENGTH 4096
The size in bytes of a file sector.
#define GOS_NULL_FILE_HANDLE 0
Null file handle.
#define GOS_FILE_VERSION_MAKE (major, minor, patch)
Helper macro to create file version integer. More...
#define GOS_FILE_VERSION_FMT "%u.%u.%u"
Format string for file version to use in a printf-like function.
#define GOS_FILE_VERSION_ARGS (version)
Helper macro to convert an integer version to arguments for a printf-like function.
#define GOS_FILE_HANDLE_MAKE (location, sector_number)   gos_file_make_handle(location, sector_number)
Create a file handle. More...
#define GOS_FILE_HANDLE_LOCATION (handle)   (((uint32_t)(handle)) >> 24)
Get the location part of a file handle, see gos_file_location_t .
#define GOS_FILE_HANDLE_SECTOR (handle)   (((uint32_t)(handle)) & 0x00FFFFFF)
Get the sector number part of a file handle.
#define GOS_FILE_NO_LIMIT 0
No limit number number of files to return when listing.
#define GOS_FILE_DEFAULT_USER_FILE_INFO
Default value for gos_file_t .
#define GOS_FILE_LIST_DEFAULT_PARAMS
Default value for gos_file_list_parameters_t .

Detailed Description

File specific macros.

Macro Definition Documentation

GOS_FILE_HANDLE_MAKE

#define GOS_FILE_HANDLE_MAKE ( location,
sector_number
) gos_file_make_handle(location, sector_number)

Create a file handle.

Parameters
location Memory location, see gos_file_location_t
sector_number Sector number of the handle

GOS_FILE_VERSION_MAKE

#define GOS_FILE_VERSION_MAKE ( major,
minor,
patch
)
Value:
((((uint32_t)(major)) << GOS_FILE_VERSION_MAJOR_SHIFT) | \
(((uint32_t)(minor)) << GOS_FILE_VERSION_MINOR_SHIFT) | \
(((uint32_t)(patch)) << GOS_FILE_VERSION_PATCH_SHIFT))

Helper macro to create file version integer.

Parameters
major Major version number
minor Minor version number
patch Patch version number