File specific macros. More...

Macros

#define FILE_MAKE_VERSION(major, minor, patch, rc)
 Helper macro to create file version integer.
 
#define FILE_VERSION_ARGS(version)
 Helper macro to convert an integer version to arguments for a printf-like function.
 
#define ZOS_MAX_FILENAME_LEN   96
 The maximum length of a filename (including null-terminating character)
 
#define FILE_ANY_TYPE   FILE_TYPE_INVALID
 Used when searching for any file type.
 
#define ZOS_FILE_SECTOR_SIZE   4096
 The size in bytes of a file sector.
 
#define ZOS_LOG_RECORD_VALID_FLAG   0x8000
 Flag in a log record indicating if the log record data is valid.
 
#define ZOS_LOG_IS_VALID(header)   (~((zos_log_header_t)header) & ZOS_LOG_RECORD_VALID_FLAG)
 Helper to test if a log record is valid.
 
#define ZOS_LOG_GET_LENGTH(header)   (((zos_log_header_t)header) & ~ZOS_LOG_RECORD_VALID_FLAG)
 Helper to return the length of a log record.
 
#define ZOS_LOG_GET_NEXT   -1
 Used with zn_file_read_log() to read the next available log record.
 
#define ZOS_FILE_HANDLE_SECTOR(handle)   ((handle) & ~FILE_EXTENDED_OR_BULK_HANDLE_FLAG)
 Macro to return the start sector of a file. More...
 
#define ZOS_FILE_HANDLE_MEMORY(handle)
 Macro to return the zos_file_memory_t memory type of a file. More...
 

Detailed Description

File specific macros.

Macro Definition Documentation

#define ZOS_FILE_HANDLE_MEMORY (   handle)
Value:
(((handle) & FILE_BULK_HANDLE_FLAG) ? FILE_MEMORY_BULK : \
((handle) & FILE_EXTENDED_HANDLE_FLAG) ? FILE_MEMORY_EXTENDED : FILE_MEMORY_INTERNAL)
External (to Wi-Fi module) serial flash memory.
Definition: zos_file.h:170
Wi-Fi module on-board serial flash memory.
Definition: zos_file.h:169
Wi-Fi module internal MCU flash memory.
Definition: zos_file.h:168

Macro to return the zos_file_memory_t memory type of a file.

The supplied handle argument comes from zos_file_t memory_handle returned by zn_file_list(), zn_file_list() or zn_file_list_with_callback()

#define ZOS_FILE_HANDLE_SECTOR (   handle)    ((handle) & ~FILE_EXTENDED_OR_BULK_HANDLE_FLAG)

Macro to return the start sector of a file.

The supplied handle argument comes from zos_file_t memory_handle returned by zn_file_list(), zn_file_list() or zn_file_list_with_callback()

Examples:
basic/file_list/file_list.c.