Bayley Wang
/
flash_configuration
flash based config testing
CommandProcessor/CommandProcessor.h@3:82c00c8e2cb4, 2017-03-07 (annotated)
- Committer:
- bwang
- Date:
- Tue Mar 07 08:06:39 2017 +0000
- Revision:
- 3:82c00c8e2cb4
- Parent:
- 2:cfc39b0843ae
lot's more commands
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bwang | 1:df6bbacb7bb9 | 1 | #ifndef __COMMAND_PROCESSOR_H |
bwang | 1:df6bbacb7bb9 | 2 | #define __COMMAND_PROCESSOR_H |
bwang | 1:df6bbacb7bb9 | 3 | |
bwang | 1:df6bbacb7bb9 | 4 | #include "mbed.h" |
bwang | 1:df6bbacb7bb9 | 5 | #include "PreferenceWriter.h" |
bwang | 1:df6bbacb7bb9 | 6 | |
bwang | 3:82c00c8e2cb4 | 7 | void processCmd(Serial *pc, PreferenceWriter *pref, char *buf); |
bwang | 1:df6bbacb7bb9 | 8 | |
bwang | 3:82c00c8e2cb4 | 9 | /*---variable loading, setting, and flashing---*/ |
bwang | 1:df6bbacb7bb9 | 10 | void cmd_ls(Serial *pc); |
bwang | 1:df6bbacb7bb9 | 11 | void cmd_ls2(Serial *pc, char *buf); |
bwang | 3:82c00c8e2cb4 | 12 | void cmd_set(Serial *pc, char *buf, char *val); |
bwang | 1:df6bbacb7bb9 | 13 | void cmd_defaults(Serial *pc); |
bwang | 1:df6bbacb7bb9 | 14 | void cmd_reload(Serial *pc, PreferenceWriter *pref); |
bwang | 1:df6bbacb7bb9 | 15 | void cmd_flush(Serial *pc, PreferenceWriter *pref); |
bwang | 3:82c00c8e2cb4 | 16 | |
bwang | 3:82c00c8e2cb4 | 17 | /*---mode switching---*/ |
bwang | 3:82c00c8e2cb4 | 18 | void cmd_setp(Serial *pc, char *buf); |
bwang | 3:82c00c8e2cb4 | 19 | void cmd_mode(Serial *pc, char *buf); |
bwang | 3:82c00c8e2cb4 | 20 | void cmd_src(Serial *pc, char *buf); |
bwang | 3:82c00c8e2cb4 | 21 | void cmd_op(Serial *pc, char *buf); |
bwang | 3:82c00c8e2cb4 | 22 | |
bwang | 3:82c00c8e2cb4 | 23 | /*---variable commands---*/ |
bwang | 2:cfc39b0843ae | 24 | void cmd_exit(Serial *pc); |
bwang | 1:df6bbacb7bb9 | 25 | |
bwang | 3:82c00c8e2cb4 | 26 | /*---internal functions---*/ |
bwang | 1:df6bbacb7bb9 | 27 | int tokenize(char *buf, char **out, int max); |
bwang | 3:82c00c8e2cb4 | 28 | float *checkf(char *s); |
bwang | 3:82c00c8e2cb4 | 29 | int *checkn(char *s); |
bwang | 3:82c00c8e2cb4 | 30 | char *mode_to_str(int n); |
bwang | 3:82c00c8e2cb4 | 31 | int str_to_mode(char *buf); |
bwang | 3:82c00c8e2cb4 | 32 | char *src_to_str(int n); |
bwang | 3:82c00c8e2cb4 | 33 | int str_to_src(char *buf); |
bwang | 3:82c00c8e2cb4 | 34 | char *op_to_str(int n); |
bwang | 3:82c00c8e2cb4 | 35 | int str_to_op(char *buf); |
bwang | 1:df6bbacb7bb9 | 36 | |
bwang | 1:df6bbacb7bb9 | 37 | #endif |