]> git.cryptolib.org Git - avr-crypto-lib.git/blobdiff - performance_test.c
+ noekeon
[avr-crypto-lib.git] / performance_test.c
index 91d4f1cdb5c7164e1ca01ce5a697acd3d152aacc..0728827cf75a9f085c5b8c708901074fba9181ba 100644 (file)
@@ -1,15 +1,25 @@
 /*
+ * author: Daniel Otte
+ * email:  daniel.otte@rub.de
+ * license: GPLv3
  * 
  * 
- * 
- */
-
+ **/
+#include "config.h"
 #include <stdint.h>
 #include <stdlib.h>
 #include <avr/io.h>
 #include <avr/interrupt.h>
 #include "performance_test.h"
 
+
+#ifdef ATMEGA644
+       #define TIMSK TIMSK1
+#endif
+
+
+
 uint32_t ovfcounter;
 
 uint16_t const_overhead=0;
@@ -37,7 +47,7 @@ void startTimer(uint8_t granularity){
        ovfcounter = 0;
        TCCR1A = 0x00;
        TIMSK &= 0xC3;
-       TIMSK |= _BV(2); /* enable TOIE1 */
+       TIMSK |= _BV(TOIE1); /* enable TOIE1 */
        TCCR1B = granularity & 0x7;     /* start timer */
 }