mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -07:00
smart, loop 5 times, and shorten delay instead
This commit is contained in:
parent
ce9a6930c9
commit
31f7f17766
1 changed files with 2 additions and 3 deletions
|
@ -219,7 +219,7 @@ static bool I2C_WaitForSim(void) {
|
||||||
// 8051 speaks with smart card.
|
// 8051 speaks with smart card.
|
||||||
// 1000*50*3.07 = 153.5ms
|
// 1000*50*3.07 = 153.5ms
|
||||||
// 1byte transfer == 1ms with max frame being 256bytes
|
// 1byte transfer == 1ms with max frame being 256bytes
|
||||||
if (!WaitSCL_H_delay(10 * 1000 * 50))
|
if (!WaitSCL_H_delay(10 * 1000 * 30))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -626,7 +626,7 @@ int I2C_get_version(uint8_t *maj, uint8_t *min) {
|
||||||
// Will read response from smart card module, retries 3 times to get the data.
|
// Will read response from smart card module, retries 3 times to get the data.
|
||||||
bool sc_rx_bytes(uint8_t *dest, uint8_t *destlen) {
|
bool sc_rx_bytes(uint8_t *dest, uint8_t *destlen) {
|
||||||
|
|
||||||
uint8_t i = 3;
|
uint8_t i = 5;
|
||||||
int16_t len = 0;
|
int16_t len = 0;
|
||||||
while (i--) {
|
while (i--) {
|
||||||
|
|
||||||
|
@ -634,7 +634,6 @@ bool sc_rx_bytes(uint8_t *dest, uint8_t *destlen) {
|
||||||
|
|
||||||
len = I2C_BufferRead(dest, *destlen, I2C_DEVICE_CMD_READ, I2C_DEVICE_ADDRESS_MAIN);
|
len = I2C_BufferRead(dest, *destlen, I2C_DEVICE_CMD_READ, I2C_DEVICE_ADDRESS_MAIN);
|
||||||
|
|
||||||
|
|
||||||
LED_C_ON();
|
LED_C_ON();
|
||||||
|
|
||||||
if (len > 1) {
|
if (len > 1) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue