cueOS  2.4
cueOS - Universal Show Control OS for ARM
File System

Data Structures

struct  fs_s
 filesystem object More...
 

Macros

#define FS_DEFAULT   {FS_LINKSTATUS_UNLINKED, FS_UNMOUNTED}
 file system instance default values More...
 

Enumerations

enum  fs_err_e {
  FS_OK ,
  FS_CANNOT_LINK_SD ,
  FS_CANNOT_MOUNT_SD ,
  FS_ALREADY_MOUNTED
}
 file system error constants definition More...
 
enum  fs_link_status_e {
  FS_LINKSTATUS_UNLINKED = 1 ,
  FS_LINKSTATUS_LINKED = 0
}
 Conveys information relative to whether the filesystem driver has been linked or not. More...
 
enum  fs_mount_status_e {
  FS_MOUNTED ,
  FS_UNMOUNTED
}
 Actual initialisation state of the file system. More...
 

Functions

fs_err_e fs_init (void)
 Initialises the file system. More...
 
fs_mount_status_e fs_get_mount_status (void)
 Returns the file system's current state. More...
 

Detailed Description

High level File system interface abstraction layer for FatFS. Media types supported include:

Macro Definition Documentation

◆ FS_DEFAULT

#define FS_DEFAULT   {FS_LINKSTATUS_UNLINKED, FS_UNMOUNTED}

file system instance default values

Used during initialisation of file system, it lowers the risk of conflicts by ensuring that every parameters which will be set are correctly initialised.

Definition at line 22 of file fs.h.

Enumeration Type Documentation

◆ fs_err_e

enum fs_err_e

file system error constants definition

Series of pre-defined constant error values to be used throughout the whole file system lifecycle.

Enumerator
FS_OK 

No error

FS_CANNOT_LINK_SD 

file system link driver could not link SD card media

FS_CANNOT_MOUNT_SD 

file system could not mount SD card media

FS_ALREADY_MOUNTED 

The file system has already been initialised

Definition at line 31 of file fs.h.

◆ fs_link_status_e

Conveys information relative to whether the filesystem driver has been linked or not.

Enumerator
FS_LINKSTATUS_UNLINKED 

File system driver linking failed

FS_LINKSTATUS_LINKED 

File system driver was successfully linked

Definition at line 41 of file fs.h.

◆ fs_mount_status_e

Actual initialisation state of the file system.

Enumerator
FS_MOUNTED 

File system is initialised and media has been correctly mounted

FS_UNMOUNTED 

File system is uninitialised and media hasn't been mounted yet

Definition at line 49 of file fs.h.

Function Documentation

◆ fs_get_mount_status()

fs_mount_status_e fs_get_mount_status ( void  )

Returns the file system's current state.

Returns
fs_mount_status_e returns 0 if mounted 1 otherwise
See also
fs.h for fs_mount_status_e error enumeration

Definition at line 61 of file fs.c.

◆ fs_init()

fs_err_e fs_init ( void  )

Initialises the file system.

Returns
fs_err_e returns 0 in case of succes, negative value otherwise
See also
fs.h for fs_err_e error enumeration

Definition at line 33 of file fs.c.