X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fmain-entropium-test.c;h=812d2134683d4b54faa2463087381a71ead27aea;hb=deca11a7e7be5605c387aa2cd577e22925854ff8;hp=95f3fc1136fb6ef8d6fdbc1111548f092f6ab598;hpb=83d0614d8b17eac97f891f7de2bb3ef265751dea;p=avr-crypto-lib.git diff --git a/test_src/main-entropium-test.c b/test_src/main-entropium-test.c index 95f3fc1..812d213 100644 --- a/test_src/main-entropium-test.c +++ b/test_src/main-entropium-test.c @@ -21,21 +21,13 @@ * */ -#include "config.h" -#include "serial-tools.h" -#include "uart.h" -#include "debug.h" +#include "main-test-common.h" #include "entropium.h" #include "nessie_bc_test.h" -#include "cli.h" #include "performance_test.h" -#include -#include -#include - -char* algo_name = "Entropium"; +char *algo_name = "Entropium"; /***************************************************************************** * additional validation-functions * @@ -45,7 +37,7 @@ void testrun_entropium(void){ char c, str[16]; uint8_t data[32]; uint32_t i=0; - while(!uart_getc_nb(&c)){ + while('q'!=cli_getc()){ entropium_getRandomBlock(data); cli_putstr_P(PSTR("\r\n ")); ultoa(i, str, 10); @@ -95,7 +87,7 @@ const char test_str[] PROGMEM = "test"; 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_entropium}, { test_str, NULL, testrun_entropium}, { performance_str, NULL, testrun_performance_entropium}, @@ -105,14 +97,10 @@ cmdlist_entry_t cmdlist[] PROGMEM = { int main (void){ - DEBUG_INIT(); - cli_rx = uart_getc; - cli_tx = uart_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); } }