X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/614da335f6e2c35ea8620cecacdde8270111e5b1..f45a6f4fb51715f8ec69dbb3df291a325e7e0ee4:/armsrc/pcf7931.c?ds=sidebyside diff --git a/armsrc/pcf7931.c b/armsrc/pcf7931.c index 4d45a69c..df8b1a96 100644 --- a/armsrc/pcf7931.c +++ b/armsrc/pcf7931.c @@ -1,15 +1,8 @@ -#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 -#define abs(x) ( ((x)<0) ? -(x) : (x) ) -#define max(x,y) ( xPIO_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 @@ -489,8 +484,6 @@ bool AddBitPCF7931(bool b, uint32_t * tab, int32_t l, int32_t p){ tab[u+2] = 24 * T0_PCF + tab[u+1] - l - p; return 0; } - - return 1; }