]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/legicrf.c
Fix up small error in main osc startup delay and replace more custom defines with...
[proxmark3-svn] / armsrc / legicrf.c
index 86a4d5de052b188d4da4eaee65d38330539c26d7..313ac3c95c0bb4aac6d5e3564cafe4ef221345b4 100644 (file)
@@ -1,15 +1,19 @@
-/*
- * LEGIC RF simulation code
- *
- * (c) 2009 Henryk Plötz <henryk@ploetzli.ch>
- */
+//-----------------------------------------------------------------------------
+// (c) 2009 Henryk Plötz <henryk@ploetzli.ch>
+//
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
+//-----------------------------------------------------------------------------
+// LEGIC RF simulation code
+//-----------------------------------------------------------------------------
 
 #include "proxmark3.h"
-
 #include "apps.h"
-#include "legicrf.h"
-#include <stdint.h>
+#include "util.h"
+#include "string.h"
 
+#include "legicrf.h"
 #include "legic_prng.h"
 #include "crc.h"
 
@@ -30,7 +34,7 @@ static void setup_timer(void)
        AT91C_BASE_PMC->PMC_PCER = (1 << AT91C_ID_TC1);
        timer = AT91C_BASE_TC1;
        timer->TC_CCR = AT91C_TC_CLKDIS;
-       timer->TC_CMR = TC_CMR_TCCLKS_TIMER_CLOCK3;
+       timer->TC_CMR = AT91C_TC_CLKS_TIMER_DIV3_CLOCK;
        timer->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
 
 /* At TIMER_CLOCK3 (MCK/32) */
Impressum, Datenschutz