X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-threefish-test.c;h=a1e0a63596d92b326bb2f476f58e4de7d2e30390;hb=4128060fcc4585ab8f40d01486baa4248b499160;hp=799d40f7286c97cac12b9f523e8b2d3381988251;hpb=d1181933dc28db92d787cf5604e2fc96ab0d8f9f;p=avr-crypto-lib.git diff --git a/test_src/main-threefish-test.c b/test_src/main-threefish-test.c index 799d40f..a1e0a63 100644 --- a/test_src/main-threefish-test.c +++ b/test_src/main-threefish-test.c @@ -21,13 +21,10 @@ * */ -#include "config.h" -#include "uart_i.h" -#include "debug.h" +#include "main-test-common.h" #include "threefish.h" -#include "cli.h" #include "performance_test.h" #include "bcal-performance.h" #include "bcal-nessie.h" @@ -35,13 +32,9 @@ #include "bcal_threefish512.h" #include "bcal_threefish1024.h" -#include -#include -#include - char* algo_name = "Threefish"; -const bcdesc_t* algolist[] PROGMEM = { +const bcdesc_t* const algolist[] PROGMEM = { (bcdesc_t*)&threefish256_desc, (bcdesc_t*)&threefish512_desc, (bcdesc_t*)&threefish1024_desc, @@ -254,7 +247,7 @@ const char inittest_str[] PROGMEM = "inittest"; 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_threefish}, { test_str, NULL, testrun_stdtest_threefish}, { test256_str, NULL, testrun_stdtest_threefish256}, @@ -267,14 +260,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; - 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); + main_setup(); + + for(;;){ + welcome_msg(algo_name); + cmd_interface(cmdlist); } }