mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-18 03:00:58 +08:00
chg:i2c...
This commit is contained in:
parent
aef053879c
commit
bda57d3818
1 changed files with 3 additions and 2 deletions
|
@ -134,6 +134,7 @@ bool WaitSCL_L_300ms(void){
|
|||
volatile uint16_t delay = 300;
|
||||
while ( delay-- ) {
|
||||
|
||||
// exit on SCL LOW
|
||||
if (!SCL_read) {
|
||||
if ( MF_DBGLEVEL > 3 ) Dbprintf(" 300ms SCL delay counter %d", delay);
|
||||
return true;
|
||||
|
@ -531,13 +532,13 @@ bool GetATR(smart_card_atr_t *card_ptr) {
|
|||
I2C_WriteCmd(I2C_DEVICE_CMD_GENERATE_ATR, I2C_DEVICE_ADDRESS_MAIN);
|
||||
|
||||
// variable delay here.
|
||||
if (!WaitSCL_300ms()) {
|
||||
if (!WaitSCL_L_300ms()) {
|
||||
if ( MF_DBGLEVEL > 3 ) DbpString(" 300ms SCL delay - timed out");
|
||||
return false;
|
||||
}
|
||||
|
||||
// 8051 speaks with smart card.
|
||||
// 1000*50*3.07 = 1530.5ms
|
||||
// 1000*50*3.07 = 153.5ms
|
||||
if (!WaitSCL_H_delay(1000*50) ) {
|
||||
if ( MF_DBGLEVEL > 3 ) DbpString("wait for SCL HIGH - timed out");
|
||||
return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue