flash based config testing

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers CommandProcessor.h Source File

CommandProcessor.h

00001 #ifndef __COMMAND_PROCESSOR_H
00002 #define __COMMAND_PROCESSOR_H
00003 
00004 #include "mbed.h"
00005 #include "PreferenceWriter.h"
00006 
00007 void processCmd(Serial *pc, PreferenceWriter *pref, char *buf);
00008 
00009 /*---variable loading, setting, and flashing---*/
00010 void cmd_ls(Serial *pc);
00011 void cmd_ls2(Serial *pc, char *buf);
00012 void cmd_set(Serial *pc, char *buf, char *val);
00013 void cmd_defaults(Serial *pc);
00014 void cmd_reload(Serial *pc, PreferenceWriter *pref);
00015 void cmd_flush(Serial *pc, PreferenceWriter *pref);
00016 
00017 /*---mode switching---*/
00018 void cmd_setp(Serial *pc, char *buf);
00019 void cmd_mode(Serial *pc, char *buf);
00020 void cmd_src(Serial *pc, char *buf);
00021 void cmd_op(Serial *pc, char *buf);
00022 
00023 /*---variable commands---*/
00024 void cmd_exit(Serial *pc);
00025 
00026 /*---internal functions---*/
00027 int tokenize(char *buf, char **out, int max);
00028 float *checkf(char *s);
00029 int *checkn(char *s);
00030 char *mode_to_str(int n);
00031 int str_to_mode(char *buf);
00032 char *src_to_str(int n);
00033 int str_to_src(char *buf);
00034 char *op_to_str(int n);
00035 int str_to_op(char *buf);
00036 
00037 #endif