X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fnessie_common.h;h=b2d2b14cb516cd6884c214d2e82949e47355d99c;hb=052cd5b12044286abbb0076ecff6956a02ac9325;hp=4090e32ea97d25c99df65f0fc9bc76b6d10fcf7b;hpb=2159c273c9d3361571a6ff1ab63d9bc76582fbab;p=avr-crypto-lib.git diff --git a/test_src/nessie_common.h b/test_src/nessie_common.h index 4090e32..b2d2b14 100644 --- a/test_src/nessie_common.h +++ b/test_src/nessie_common.h @@ -1,6 +1,6 @@ /* nessie_common.h */ /* - This file is part of the Crypto-avr-lib/microcrypt-lib. + This file is part of the AVR-Crypto-Lib. Copyright (C) 2008 Daniel Otte (daniel.otte@rub.de) This program is free software: you can redistribute it and/or modify @@ -29,9 +29,35 @@ #ifndef NESSIE_COMMON_H_ #define NESSIE_COMMON_H_ +#define NESSIE_ALIVE_CHAR 0x06 +#define NESSIE_ALIVE +#define NESSIE_USE_CLI #include +#ifdef NESSIE_ALIVE +#define NESSIE_SEND_ALIVE nessie_send_alive() +void nessie_send_alive(void); +#define NESSIE_SEND_ALIVE_A(i) nessie_send_alive_a(i) +void nessie_send_alive_a(uint16_t i); +#else +#define NESSIE_SEND_ALIVE +#define NESSIE_SEND_ALIVE_A(i) +#endif + + +#ifdef NESSIE_USE_CLI +#include "cli.h" +#define NESSIE_PUTC cli_putc +#define NESSIE_PUTSTR cli_putstr +#define NESSIE_PUTSTR_P cli_putstr_P +#else +#include "uart.h" +#define NESSIE_PUTC uart_putc +#define NESSIE_PUTSTR uart_putstr +#define NESSIE_PUTSTR_P uart_putstr_P +#endif + void nessie_print_block(uint8_t* block, uint16_t blocksize_bit); void nessie_print_item(char* name, uint8_t* buffer, uint16_t size_B); void nessie_print_set_vector(uint8_t set, uint16_t vector);