fix: lf sim - if called with empty graphbuffer all strange things happend, like turning on HF field

This commit is contained in:
iceman1001 2019-05-23 10:51:19 -04:00
commit 0564931450
3 changed files with 38 additions and 26 deletions

View file

@ -587,7 +587,7 @@ void SimulateTagLowFrequencyEx(int period, int gap, int ledcontrol, int numcycle
AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;
AT91C_BASE_PIOA->PIO_ODR = GPIO_SSC_CLK;
uint16_t check = 1;
uint16_t check = 0;
for (;;) {
@ -621,6 +621,8 @@ void SimulateTagLowFrequencyEx(int period, int gap, int ledcontrol, int numcycle
else
SHORT_COIL();
check = 0;
//wait until SSC_CLK goes LOW
while (AT91C_BASE_PIOA->PIO_PDSR & GPIO_SSC_CLK) {
WDT_HIT();