X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-a5_1-test.c;h=d9d6abcf65db7dc130dcb8c5e753f412b77cab03;hb=c26c0ae7602db9d3b2d7baf6ae6fc9639539ad02;hp=6a0edc8d7db6a794f97d5330b6bf063ac07c42e5;hpb=302f07c97444e2f5f5560dc2fd9af58d4b591d45;p=avr-crypto-lib.git diff --git a/test_src/main-a5_1-test.c b/test_src/main-a5_1-test.c index 6a0edc8..d9d6abc 100644 --- a/test_src/main-a5_1-test.c +++ b/test_src/main-a5_1-test.c @@ -21,24 +21,17 @@ * */ -#include "config.h" +#include "main-test-common.h" -#include "uart_i.h" -#include "debug.h" - -#include +#include "A5_1.h" #include "nessie_stream_test.h" -#include -#include -#include "cli.h" - -char* algo_name = "A5_1"; +char *algo_name = "A5_1"; /***************************************************************************** * additional validation-functions * *****************************************************************************/ -void a51_genctx_dummy(uint8_t* key, uint16_t keysize, void* ctx){ +void a51_genctx_dummy(uint8_t *key, uint16_t keysize, void *ctx){ a5_1_init(ctx,key, keysize, NULL, 0); } @@ -68,7 +61,7 @@ const char testkey_str[] PROGMEM = "testkey"; const char performance_str[] PROGMEM = "performance"; const char echo_str[] PROGMEM = "echo"; -cmdlist_entry_t cmdlist[] PROGMEM = { +const cmdlist_entry_t cmdlist[] PROGMEM = { { nessie_str, NULL, testrun_nessie_a51, NULL}, /* { performance_str, NULL, testrun_performance_a51, NULL}, */ { echo_str, (void*)1, (void_fpt)echo_ctrl, NULL}, @@ -76,16 +69,10 @@ cmdlist_entry_t cmdlist[] PROGMEM = { }; int main (void){ - DEBUG_INIT(); - - - cli_rx = (cli_rx_fpt)uart0_getc; - cli_tx = (cli_tx_fpt)uart0_putc; + main_setup(); for(;;){ - cli_putstr_P(PSTR("\r\n\r\nCrypto-VS (")); - cli_putstr(algo_name); - cli_putstr_P(PSTR(")\r\nloaded and running\r\n")); - cmd_interface(cmdlist); + welcome_msg(algo_name); + cmd_interface(cmdlist); } }