mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 23:36:31 +08:00
Changing timings, this now waits for max 276 bytes while 8051 speaks with card
This commit is contained in:
parent
4c9c0b5264
commit
c5582ab7c7
14
armsrc/i2c.c
14
armsrc/i2c.c
|
@ -208,12 +208,15 @@ static bool I2C_Start(void) {
|
|||
SDA_H;
|
||||
I2C_DELAY_1CLK;
|
||||
SCL_H;
|
||||
if (!WaitSCL_H()) return false;
|
||||
if (!WaitSCL_H())
|
||||
return false;
|
||||
|
||||
I2C_DELAY_2CLK;
|
||||
|
||||
if (!SCL_read) return false;
|
||||
if (!SDA_read) return false;
|
||||
if (!SCL_read)
|
||||
return false;
|
||||
if (!SDA_read)
|
||||
return false;
|
||||
|
||||
SDA_L;
|
||||
I2C_DELAY_2CLK;
|
||||
|
@ -228,8 +231,9 @@ static bool I2C_WaitForSim(void) {
|
|||
|
||||
// 8051 speaks with smart card.
|
||||
// 1000*50*3.07 = 153.5ms
|
||||
// 1byte transfer == 1ms with max frame being 256bytes
|
||||
return WaitSCL_H_delay(1000 * 300);
|
||||
// 1000*90*3.07 = 276.3ms
|
||||
// 1byte transfer == 1ms with max frame being 256bytes
|
||||
return WaitSCL_H_delay(1000 * 90);
|
||||
}
|
||||
|
||||
// send i2c STOP
|
||||
|
|
Loading…
Reference in a new issue