/* performance_test.c */
/*
- 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
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/pgmspace.h>
-#include "uart.h"
+#include "cli.h"
#include "performance_test.h"
void print_time_P(PGM_P s, uint64_t t){
char sv[16];
uint8_t c;
- uart_putstr_P(PSTR("\r\n"));
- uart_putstr_P(s);
+ cli_putstr_P(PSTR("\r\n"));
+ cli_putstr_P(s);
ultoa((unsigned long)t, sv, 10);
for(c=strlen(sv); c<11; ++c){
- uart_putc(' ');
+ cli_putc(' ');
}
- uart_putstr(sv);
+ cli_putstr(sv);
}
void print_overhead(void){
char str[16];
- uart_putstr_P(PSTR("\r\n\r\n=== benchmark ==="));
+ cli_putstr_P(PSTR("\r\n\r\n=== benchmark ==="));
utoa(const_overhead, str, 10);
- uart_putstr_P(PSTR("\r\n\tconst overhead: "));
- uart_putstr(str);
+ cli_putstr_P(PSTR("\r\n\tconst overhead: "));
+ cli_putstr(str);
utoa(int_overhead, str, 10);
- uart_putstr_P(PSTR("\r\n\tinterrupt overhead: "));
- uart_putstr(str);
+ cli_putstr_P(PSTR("\r\n\tinterrupt overhead: "));
+ cli_putstr(str);
}