skm
Fork of Hello_FXOS8700Q by
cli.h@7:4c834e4dad1f, 2015-06-18 (annotated)
- Committer:
- marcus255
- Date:
- Thu Jun 18 16:25:26 2015 +0000
- Revision:
- 7:4c834e4dad1f
skm
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
marcus255 | 7:4c834e4dad1f | 1 | #ifndef CLI_H |
marcus255 | 7:4c834e4dad1f | 2 | #define CLI_H |
marcus255 | 7:4c834e4dad1f | 3 | |
marcus255 | 7:4c834e4dad1f | 4 | #include <string> |
marcus255 | 7:4c834e4dad1f | 5 | #include "mbed.h" |
marcus255 | 7:4c834e4dad1f | 6 | |
marcus255 | 7:4c834e4dad1f | 7 | extern int msDelay; |
marcus255 | 7:4c834e4dad1f | 8 | extern int threshold; |
marcus255 | 7:4c834e4dad1f | 9 | extern Serial pc; |
marcus255 | 7:4c834e4dad1f | 10 | |
marcus255 | 7:4c834e4dad1f | 11 | struct command { |
marcus255 | 7:4c834e4dad1f | 12 | string commandName; |
marcus255 | 7:4c834e4dad1f | 13 | string commandArg; |
marcus255 | 7:4c834e4dad1f | 14 | string commandValue; |
marcus255 | 7:4c834e4dad1f | 15 | }; |
marcus255 | 7:4c834e4dad1f | 16 | |
marcus255 | 7:4c834e4dad1f | 17 | void commandService (command *commandStruct); // gets text line from user and places strings in 'command' structure |
marcus255 | 7:4c834e4dad1f | 18 | void commandValidate(command *commandStruct); // validates if keywords are correct and performs proper actions |
marcus255 | 7:4c834e4dad1f | 19 | void clearConsole(void); // clears line using spaces and carriage return character |
marcus255 | 7:4c834e4dad1f | 20 | |
marcus255 | 7:4c834e4dad1f | 21 | #endif |