]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - test_src/cli.h
extended HFAL
[avr-crypto-lib.git] / test_src / cli.h
index acb68521c44dafd55e9d2ec2db5997dbeb9514d6..018c4dad1f0b7251af4229b3d75fb8d90502bee3 100644 (file)
@@ -33,10 +33,18 @@ typedef void (*cli_tx_fpt)(char);
 #define CMDLIST_ENTRY_SIZE 8
 
 typedef struct {
-       PGM_P      cmd_name;      /* string containing the function name */
-       PGM_P      cmd_param_str; /* param descriptor string */
-       void_fpt   cmd_function;  /* function pointer */
-       void_fpt   options;
+       uint16_t   option_flags;
+       PGM_VOID_P options[];
+} cmdoption_t;
+
+#define CLI_OPTION_DESC 0x01
+#define CLI_OPTION_MANP 0x02
+
+typedef struct {
+       PGM_P        cmd_name;      /* string containing the function name */
+       PGM_P        cmd_param_str; /* param descriptor string */
+       void_fpt     cmd_function;  /* function pointer */
+       cmdoption_t* options;
 } cmdlist_entry_t;
 
 extern cli_rx_fpt cli_rx;
@@ -44,6 +52,7 @@ extern cli_tx_fpt cli_tx;
 extern uint8_t cli_echo;
 
 
+
 void cli_putc(char c);
 uint16_t cli_getc(void);
 uint16_t cli_getc_cecho(void);