mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-19 19:38:52 +08:00
chg: testing another loop style
This commit is contained in:
parent
a8334d6ab3
commit
269b89373d
1 changed files with 2 additions and 4 deletions
|
@ -146,7 +146,6 @@ void iso14a_set_ATS_timeout(uint8_t *ats) {
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Generate the parity value for a byte sequence
|
// Generate the parity value for a byte sequence
|
||||||
//
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
void GetParity(const uint8_t *pbtCmd, uint16_t iLen, uint8_t *par) {
|
void GetParity(const uint8_t *pbtCmd, uint16_t iLen, uint8_t *par) {
|
||||||
uint16_t paritybit_cnt = 0;
|
uint16_t paritybit_cnt = 0;
|
||||||
|
@ -777,11 +776,9 @@ int GetIso14443aCommandFromReader(uint8_t *received, uint8_t *parity, int *len)
|
||||||
// clear RXRDY:
|
// clear RXRDY:
|
||||||
uint8_t b = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
uint8_t b = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
||||||
|
|
||||||
for(;;) {
|
while (!BUTTON_PRESS()) {
|
||||||
WDT_HIT();
|
WDT_HIT();
|
||||||
|
|
||||||
if(BUTTON_PRESS()) return false;
|
|
||||||
|
|
||||||
if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
if(AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
|
||||||
b = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
b = (uint8_t)AT91C_BASE_SSC->SSC_RHR;
|
||||||
if(MillerDecoding(b, 0)) {
|
if(MillerDecoding(b, 0)) {
|
||||||
|
@ -790,6 +787,7 @@ int GetIso14443aCommandFromReader(uint8_t *received, uint8_t *parity, int *len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool prepare_tag_modulation(tag_response_info_t* response_info, size_t max_buffer_size) {
|
bool prepare_tag_modulation(tag_response_info_t* response_info, size_t max_buffer_size) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue