X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fcli.h;fp=test_src%2Fcli.h;h=018c4dad1f0b7251af4229b3d75fb8d90502bee3;hb=5fe96fa58fee8907778ba3388b65d779a1a47c97;hp=acb68521c44dafd55e9d2ec2db5997dbeb9514d6;hpb=d3db763eeb456ce00849ecf658782f95b9f5634c;p=avr-crypto-lib.git diff --git a/test_src/cli.h b/test_src/cli.h index acb6852..018c4da 100644 --- a/test_src/cli.h +++ b/test_src/cli.h @@ -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);