midibox_ng_v1/src/mbng_file_r.c File Reference

#include <mios32.h>
#include <string.h>
#include <uip_task.h>
#include <midi_port.h>
#include "tasks.h"
#include "file.h"
#include "mbng_file.h"
#include "mbng_file_r.h"
#include "mbng_patch.h"
#include "mbng_event.h"
#include "mbng_lcd.h"

Data Structures

struct  mbng_file_r_info_t
union  mbng_file_r_req_t
struct  mbng_file_r_var_t
union  mbng_file_r_item_id_t

Defines

#define DEBUG_VERBOSE_LEVEL   1
#define DEBUG_FILE_HANDLER_PERFORMANCE   0
#define NGR_TOKENIZED   0
#define IF_MAX_NESTING_LEVEL   16
#define TOKEN_MATH_BEGIN   TOKEN_MATH_PLUS
#define TOKEN_MATH_END   TOKEN_MATH_XOR
#define MBNG_FILES_PATH   "/"
#define STREAM_MAX_SIZE   256

Enumerations

enum  ngr_token_t {
  TOKEN_NOP = 0, TOKEN_EXIT = 0x01, TOKEN_DELAY_MS = 0x02, TOKEN_LCD = 0x03,
  TOKEN_LOG = 0x04, TOKEN_SEND = 0x05, TOKEN_EXEC_META = 0x06, TOKEN_SET = 0x07,
  TOKEN_CHANGE = 0x08, TOKEN_TRIGGER = 0x09, TOKEN_SET_RGB = 0x0a, TOKEN_SET_HSV = 0x0b,
  TOKEN_SET_LOCK = 0x0c, TOKEN_SET_ACTIVE = 0x0d, TOKEN_SET_NO_DUMP = 0x0e, TOKEN_SET_MIN = 0x0f,
  TOKEN_SET_MAX = 0x10, TOKEN_IF = 0x80, TOKEN_ELSE = 0x81, TOKEN_ELSEIF = 0x82,
  TOKEN_ENDIF = 0x84, TOKEN_COND_EQ = 0x90, TOKEN_COND_NE = 0x91, TOKEN_COND_GTEQ = 0x92,
  TOKEN_COND_LTEQ = 0x93, TOKEN_COND_GT = 0x94, TOKEN_COND_LT = 0x95
}

Functions

s32 MBNG_FILE_R_Init (u32 mode)
s32 MBNG_FILE_R_Load (char *filename)
s32 MBNG_FILE_R_Unload (void)
s32 MBNG_FILE_R_Valid (void)
s32 MBNG_FILE_R_TokenizedNgrSet (u8 enable)
s32 MBNG_FILE_R_TokenizedNgrGet (void)
s32 MBNG_FILE_R_TokenMemPrint (void)
s32 MBNG_FILE_R_VarSectionSet (u8 section)
s32 MBNG_FILE_R_VarSectionGet ()
s32 MBNG_FILE_R_VarValueSet (u8 value)
s32 MBNG_FILE_R_VarValueGet ()
s32 lineIsEmpty (char *line)
s32 parseCondition (u32 line, char *command, char **brkt, u8 tokenize_req)
s32 sendTokenized (mios32_midi_port_t port, mbng_event_type_t event_type, u8 *stream, u32 stream_size)
s32 parseSend (u32 line, char *command, char **brkt, u8 tokenize_req)
s32 parseExecMeta (u32 line, char *command, char **brkt, u8 tokenize_req)
s32 setTokenizedValue (ngr_token_t token, u16 id, s32 value, s32(*exec_function)(mbng_event_item_t *item, s32 value), s32(*exec_virtual_function)(mbng_event_item_id_t id, s32 value))
s32 parseCommand (u32 line, char *command, char **brkt, u8 tokenize_req, ngr_token_t command_token, s32(*exec_function)(mbng_event_item_t *item, s32 value), s32(*exec_virtual_function)(mbng_event_item_id_t id, s32 value))
s32 parseDelay (u32 line, char *command, char **brkt, u8 tokenize_req)
s32 parseLoad (u32 line, char *command, char **brkt, char *load_filename, u8 tokenize_req)
s32 MBNG_FILE_R_Parser (u32 line, char *line_buffer, u8 *if_state, u8 *nesting_level, char *load_filename, u8 tokenize_req)
s32 MBNG_FILE_R_Exec (u8 cont_script, u8 determine_if_offsets)
s32 MBNG_FILE_R_Read (char *filename, u8 cont_script, u8 tokenize_req)
s32 MBNG_FILE_R_ReadRequest (char *filename, u8 section, s16 value, u8 notify_done)
s32 MBNG_FILE_R_CheckRequest (void)
s32 MBNG_FILE_R_RunStop (void)

Variables

char mbng_file_r_script_name [MBNG_FILE_R_FILENAME_LEN+1]

Define Documentation

#define STREAM_MAX_SIZE   256
#define TOKEN_MATH_BEGIN   TOKEN_MATH_PLUS
#define TOKEN_MATH_END   TOKEN_MATH_XOR

Generated on 22 Jan 2016 for MIDIboxNG by  doxygen 1.6.1