mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-22 05:00:29 +08:00
translation
This commit is contained in:
parent
3bd145652b
commit
04536a3564
1 changed files with 2 additions and 3 deletions
|
@ -26,7 +26,8 @@
|
||||||
|
|
||||||
volatile unsigned long c;
|
volatile unsigned long c;
|
||||||
|
|
||||||
// 直接使用循环来延时,一个循环 6 条指令,48M, Delay=1 大概为 200kbps
|
// Direct use the loop to delay. 6 instructions loop, Masterclock 48Mhz,
|
||||||
|
// delay=1 is about 200kbps
|
||||||
// timer.
|
// timer.
|
||||||
// I2CSpinDelayClk(4) = 12.31us
|
// I2CSpinDelayClk(4) = 12.31us
|
||||||
// I2CSpinDelayClk(1) = 3.07us
|
// I2CSpinDelayClk(1) = 3.07us
|
||||||
|
@ -89,11 +90,9 @@ void I2C_init(void) {
|
||||||
AT91C_BASE_PIOA->PIO_OER |= (GPIO_SCL | GPIO_SDA | GPIO_RST);
|
AT91C_BASE_PIOA->PIO_OER |= (GPIO_SCL | GPIO_SDA | GPIO_RST);
|
||||||
AT91C_BASE_PIOA->PIO_PER |= (GPIO_SCL | GPIO_SDA | GPIO_RST);
|
AT91C_BASE_PIOA->PIO_PER |= (GPIO_SCL | GPIO_SDA | GPIO_RST);
|
||||||
|
|
||||||
|
|
||||||
bool isok = (SCL_read && SDA_read);
|
bool isok = (SCL_read && SDA_read);
|
||||||
if (!isok)
|
if (!isok)
|
||||||
I2C_recovery();
|
I2C_recovery();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// set the reset state
|
// set the reset state
|
||||||
|
|
Loading…
Add table
Reference in a new issue