mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-02-13 10:43:01 +08:00
FIX: 'hf 15' timouts bugs when wait is set == 0...
thanks @lnv42 for fix 84cb4f6bbf
This commit is contained in:
parent
3943f87c30
commit
5939164635
1 changed files with 3 additions and 6 deletions
|
@ -228,7 +228,6 @@ static void TransmitTo15693Tag(const uint8_t *cmd, int len, int *samples, int *w
|
|||
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_READER_TX);
|
||||
|
||||
if (wait) {
|
||||
if (*wait < 10) { *wait = 10; }
|
||||
for (c = 0; c < *wait;) {
|
||||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {
|
||||
AT91C_BASE_SSC->SSC_THR = 0x00; // For exact timing!
|
||||
|
@ -242,9 +241,7 @@ static void TransmitTo15693Tag(const uint8_t *cmd, int len, int *samples, int *w
|
|||
}
|
||||
|
||||
c = 0;
|
||||
for(;;) {
|
||||
WDT_HIT();
|
||||
|
||||
for(;;) {
|
||||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {
|
||||
AT91C_BASE_SSC->SSC_THR = cmd[c];
|
||||
if( ++c >= len) break;
|
||||
|
@ -252,6 +249,7 @@ static void TransmitTo15693Tag(const uint8_t *cmd, int len, int *samples, int *w
|
|||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
||||
r = AT91C_BASE_SSC->SSC_RHR; (void)r;
|
||||
}
|
||||
WDT_HIT();
|
||||
}
|
||||
|
||||
if (samples) {
|
||||
|
@ -271,7 +269,6 @@ static void TransmitTo15693Reader(const uint8_t *cmd, int len, int *samples, int
|
|||
FpgaWriteConfWord(FPGA_MAJOR_MODE_HF_SIMULATOR|FPGA_HF_SIMULATOR_MODULATE_424K);
|
||||
|
||||
if (wait) {
|
||||
if (*wait < 10) { *wait = 10; }
|
||||
for (c = 0; c < *wait;) {
|
||||
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {
|
||||
AT91C_BASE_SSC->SSC_THR = 0x00; // For exact timing!
|
||||
|
@ -286,7 +283,6 @@ static void TransmitTo15693Reader(const uint8_t *cmd, int len, int *samples, int
|
|||
|
||||
c = 0;
|
||||
for(;;) {
|
||||
WDT_HIT();
|
||||
if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_TXRDY)) {
|
||||
AT91C_BASE_SSC->SSC_THR = cmd[c];
|
||||
if( ++c >= len) break;
|
||||
|
@ -294,6 +290,7 @@ static void TransmitTo15693Reader(const uint8_t *cmd, int len, int *samples, int
|
|||
if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
||||
r = AT91C_BASE_SSC->SSC_RHR; (void)r;
|
||||
}
|
||||
WDT_HIT();
|
||||
}
|
||||
if (samples) {
|
||||
if (wait)
|
||||
|
|
Loading…
Reference in a new issue