Remove unused comments.

Change boolean for src.
This commit is contained in:
Thomas Sutter 2019-11-01 15:37:53 +01:00
commit b4c1333ac3

View file

@ -580,7 +580,7 @@ void felica_sniff(uint32_t samplesToSkip, uint32_t triggersToSkip) {
uint16_t numbts = 0; uint16_t numbts = 0;
int trigger_cnt = 0; int trigger_cnt = 0;
uint32_t timeout = iso18092_get_timeout(); uint32_t timeout = iso18092_get_timeout();
bool isTagFrame = true; bool isReaderFrame = true;
while (!BUTTON_PRESS()) { while (!BUTTON_PRESS()) {
WDT_HIT(); WDT_HIT();
if (AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY) { if (AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY) {
@ -591,23 +591,22 @@ void felica_sniff(uint32_t samplesToSkip, uint32_t triggersToSkip) {
break; break;
} }
if (FelicaFrame.state == STATE_FULL) { if (FelicaFrame.state == STATE_FULL) {
//Dbprintf("Sniffing - Got Felica Frame! Sample remaining %i", remFrames); if ((FelicaFrame.framebytes[3] % 2) == 0) {
isReaderFrame = true; // All Reader Frames are even and all Tag frames are odd
} else {
isReaderFrame = false;
}
remFrames--; remFrames--;
if (remFrames <= 0) { if (remFrames <= 0) {
Dbprintf("Stop Sniffing - samplesToSkip reached!"); Dbprintf("Stop Sniffing - samplesToSkip reached!");
break; break;
} }
if ((FelicaFrame.framebytes[3] % 2) == 0) {
isTagFrame = false; // All Reader Frames are even and all Tag frames are odd
} else {
isTagFrame = true;
}
LogTrace(FelicaFrame.framebytes, LogTrace(FelicaFrame.framebytes,
FelicaFrame.len, FelicaFrame.len,
((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER - timeout, ((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER - timeout,
((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER, ((GetCountSspClk() & 0xfffffff8) << 4) - DELAY_AIR2ARM_AS_READER,
NULL, NULL,
isTagFrame isReaderFrame
); );
numbts += FelicaFrame.len; numbts += FelicaFrame.len;
FelicaFrameReset(); FelicaFrameReset();