]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/pcf7931.c
FIX: since the correctionNeeded logic changed, with PR #87 (https://github.com...
[proxmark3-svn] / armsrc / pcf7931.c
index 1348907baf2fcf4d302ef079e598ac021758888b..df8b1a96a8c8175e35e1f20df5dd01f1e02a2fe4 100644 (file)
@@ -1,8 +1,4 @@
-#include "proxmark3.h"
-#include "apps.h"
-#include "lfsampling.h"
 #include "pcf7931.h"
-#include "string.h"
 
 #define T0_PCF 8 //period for the pcf7931 in us
 #define ALLOC 16
@@ -402,7 +398,7 @@ void SendCmdPCF7931(uint32_t * tab){
        AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;
 
        //initialization of the timer
-       AT91C_BASE_PMC->PMC_PCER |= (0x1 << 12) | (0x1 << 13) | (0x1 << 14);
+       AT91C_BASE_PMC->PMC_PCER |= (0x1 << AT91C_ID_TC0);
        AT91C_BASE_TCB->TCB_BMR = AT91C_TCB_TC0XC0S_NONE | AT91C_TCB_TC1XC1S_TIOA0 | AT91C_TCB_TC2XC2S_NONE;
        AT91C_BASE_TC0->TC_CCR = AT91C_TC_CLKDIS; // timer disable
        AT91C_BASE_TC0->TC_CMR = AT91C_TC_CLKS_TIMER_DIV3_CLOCK;  //clock at 48/32 MHz
Impressum, Datenschutz