MBNG_FILE_L

Data Structures

struct  mbng_file_l_info_t

Defines

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

Functions

s32 MBNG_FILE_L_Init (u32 mode)
s32 MBNG_FILE_L_Load (char *filename)
s32 MBNG_FILE_L_Unload (void)
s32 MBNG_FILE_L_Valid (void)
s32 readBinFileMD5 (char *filepath, u8 md5_checksum[16])
s32 parseBinFile (char *filepath)
s32 generateNglFileMD5 (char *filepath, u8 md5_checksum[16])
s32 MBNG_FILE_L_Read (char *filename)
s32 MBNG_FILE_L_Write (char *filename)
s32 MBNG_FILE_L_Debug (void)
const char * MBNG_FILE_L_GetLabel (char *label, u16 value)

Variables

char mbng_file_l_patch_name [MBNG_FILE_L_FILENAME_LEN+1]
char filepath [MAX_PATH]

Detailed Description

Label 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 BIN_FILE_FORMAT_NUMBER   0
#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


Function Documentation

s32 generateNglFileMD5 ( char *  filepath,
u8  md5_checksum[16] 
)

creates the MD5 checksum over the .NGL file

Returns:
< 0 on errors

Here is the call graph for this function:

s32 MBNG_FILE_L_Debug ( void   ) 

sends label data to debug terminal

Returns:
< 0 on errors
const char* MBNG_FILE_L_GetLabel ( char *  label,
u16  value 
)
Returns:
the content of a label for a given value SDCARD mutex handled automatically if SD Card really has to be accessed

Here is the call graph for this function:

s32 MBNG_FILE_L_Init ( u32  mode  ) 

Initialisation

Here is the call graph for this function:

s32 MBNG_FILE_L_Load ( char *  filename  ) 

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

Returns:
< 0 on errors

Here is the call graph for this function:

s32 MBNG_FILE_L_Read ( char *  filename  ) 

Here is the call graph for this function:

s32 MBNG_FILE_L_Unload ( void   ) 

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

Returns:
< 0 on errors
s32 MBNG_FILE_L_Valid ( void   ) 
Returns:
1 if current label file valid
0 if current label file not valid
s32 MBNG_FILE_L_Write ( char *  filename  ) 

writes data into label file

Returns:
< 0 on errors (error codes are documented in seq_file.h)

Here is the call graph for this function:

s32 parseBinFile ( char *  filepath  ) 

parse the .BIN file for labels < 0 on errors

Here is the call graph for this function:

s32 readBinFileMD5 ( char *  filepath,
u8  md5_checksum[16] 
)

read the .BIN file and checks if it is valid md5_checksum_binfile[16] contains the expected MD5 checksum of the .NGL file if valid

Returns:
< 0 on errors

Here is the call graph for this function:


Variable Documentation

char filepath[MAX_PATH]

reads the label file content (again)

Returns:
< 0 on errors (error codes are documented in mbng_file.h)
char mbng_file_l_patch_name[MBNG_FILE_L_FILENAME_LEN+1]

Global variables


Generated on 22 Jan 2016 for MIDIboxNG by  doxygen 1.6.1