Simple implementation of an command-interface. More...
#include "cmd_interface.h"
#include <stdlib.h>
#include <string.h>
#include "string_addon.h"
Functions | |
int8_t | execute_command () |
internal function which executes the commands | |
int8_t | split_command_line () |
internal function which splits the act. command line into separated components, which are separated by split signs. | |
void | cmd_interface_init () |
initialisation routine for command interface variables | |
int8_t | execute_cmd_interface (char *string) |
routine called to execute command interface | |
Variables | |
char | cmd_line [_cmd_interface_max_length+1] |
Simple implementation of an command-interface.
Target/Compiler: AVR_MEGA / GCC(WinAVR)
\
void cmd_interface_init | ( | ) |
initialisation routine for command interface variables
none |
int8_t execute_cmd_interface | ( | char * | string | ) |
routine called to execute command interface
*string | - to attach at the actual command_line buffer |
This routine has to be called to execute the command-interface It attaches the forwarded string to the internal command-line buffer and its sub-functions interprets the line before it executes the corresponding command-function given by the user
int8_t execute_command | ( | ) |
internal function which executes the commands
none |
this functions checks whether the given command exists in the command-table if it exists it executes the function referenced in the function-pointer which belongs the specific command.
int8_t split_command_line | ( | ) |
internal function which splits the act. command line into separated components, which are separated by split signs.
none |
char cmd_line[_cmd_interface_max_length+1] |
* MAIN