MBNG_FILE_S

Data Structures

struct  mbng_file_s_info_t

Defines

#define DEBUG_VERBOSE_LEVEL   1
#define NGS_FILE_FORMAT_NUMBER   0
#define MBNG_FILES_PATH   "/"

Functions

s32 MBNG_FILE_S_Init (u32 mode)
s32 MBNG_FILE_S_Load (char *filename, int snapshot)
s32 MBNG_FILE_S_Unload (void)
s32 MBNG_FILE_S_Valid (void)
s32 MBNG_FILE_S_SnapshotGet (void)
s32 MBNG_FILE_S_SnapshotSet (u8 snapshot)
s32 MBNG_FILE_S_Read (char *filename, int snapshot)
s32 MBNG_FILE_S_Write (char *filename, int snapshot)
s32 MBNG_FILE_S_RequestDelayedSnapshot (u8 delay_s)
s32 MBNG_FILE_S_Periodic_1s (u8 force)

Variables

char mbng_file_s_patch_name [MBNG_FILE_S_FILENAME_LEN+1]

Detailed Description

Snapshot File access functions

NOTE: before accessing the SD Card, the upper level function should synchronize with the SD Card semaphore! MUTEX_SDCARD_TAKE; // to take the semaphore MUTEX_SDCARD_GIVE; // to release the semaphore


Define Documentation

#define DEBUG_VERBOSE_LEVEL   1

Include files for optional debugging messages via DEBUG_MSG (defined in mios32_config.h)

#define MBNG_FILES_PATH   "/"

Local definitions

#define NGS_FILE_FORMAT_NUMBER   0

Function Documentation

s32 MBNG_FILE_S_Init ( u32  mode  ) 

Initialisation

Here is the call graph for this function:

s32 MBNG_FILE_S_Load ( char *  filename,
int  snapshot 
)

Loads snapshot file Called from MBNG_FILE_CheckSDCard() when the SD card has been connected

Parameters:
filename the filename which should be read
snapshot if < 0: load last snapshot, if >= 0: load given snapshot
Returns:
< 0 on errors

Here is the call graph for this function:

s32 MBNG_FILE_S_Periodic_1s ( u8  force  ) 

Should be called periodically each second to check for a delayed snapshot

Parameters:
force if set to != 0, an ongoing request will be enforced
Returns:
< 0 on errors (error codes are documented in seq_file.h)

Here is the call graph for this function:

s32 MBNG_FILE_S_Read ( char *  filename,
int  snapshot 
)

reads the snapshot file content (again)

Parameters:
filename the filename which should be read
snapshot if < 0: load last snapshot, if >= 0: load given snapshot
Returns:
< 0 on errors (error codes are documented in mbng_file.h)
0 if snapshot not in file
1 if snapshot loaded from file

Here is the call graph for this function:

s32 MBNG_FILE_S_RequestDelayedSnapshot ( u8  delay_s  ) 

Requests a delayed snapshot

Parameters:
delay_s the delay in seconds - will be take if there is no ongoing request
Returns:
< 0 on errors (error codes are documented in seq_file.h)
s32 MBNG_FILE_S_SnapshotGet ( void   ) 
Returns:
current snapshot
s32 MBNG_FILE_S_SnapshotSet ( u8  snapshot  ) 

Sets the current snapshot (but doesn't load it!)
Used by SCS

s32 MBNG_FILE_S_Unload ( void   ) 

Unloads snapshot file Called from MBNG_FILE_CheckSDCard() when the SD card has been disconnected

Returns:
< 0 on errors
s32 MBNG_FILE_S_Valid ( void   ) 
Returns:
1 if current snapshot file valid
0 if current snapshot file not valid
s32 MBNG_FILE_S_Write ( char *  filename,
int  snapshot 
)

writes data into snapshot file

Parameters:
filename the filename which should be written
snapshot if < 0: generate new file, if >= 0: write into given snapshot
Returns:
< 0 on errors (error codes are documented in seq_file.h)

Here is the call graph for this function:


Variable Documentation

char mbng_file_s_patch_name[MBNG_FILE_S_FILENAME_LEN+1]

Global variables


Generated on 22 Jan 2016 for MIDIboxNG by  doxygen 1.6.1