]> git.zerfleddert.de Git - proxmark3-svn/blobdiff - armsrc/pcf7931.c
Merge pull request #46 from micolous/fix-nonce
[proxmark3-svn] / armsrc / pcf7931.c
index 799167e991fc5159075f5873d2e579531d8b8aea..58fd50998495eb18773cdcc4fb0ee9dcad18a467 100644 (file)
@@ -402,7 +402,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
@@ -488,8 +488,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;
 }
 
Impressum, Datenschutz