X-Git-Url: https://git.cryptolib.org/?a=blobdiff_plain;f=test_src%2Fnessie_common.h;h=65b05b6b190cf8abe58fe785daad1b858814f114;hb=8bc6b638fc9d866778dc4d3664c3650b40616ed8;hp=0d1754b96c9ce36d0d6592c3d85564a8022b91e5;hpb=572b35bb7409fb362441e0812cb62eab9f2411f0;p=avr-crypto-lib.git diff --git a/test_src/nessie_common.h b/test_src/nessie_common.h index 0d1754b..65b05b6 100644 --- a/test_src/nessie_common.h +++ b/test_src/nessie_common.h @@ -29,9 +29,32 @@ #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 +# error "direct uart output removed for nessie" +#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);