From f7048dc8a930d5d1fbbc30a3caaa030a85564fdc Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 12 Mar 2015 16:32:01 +0100 Subject: [PATCH] Implemented usb_poll() within LF sim. This means the LF sim will be aborted whenever something comes over the USB --- armsrc/lfops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/armsrc/lfops.c b/armsrc/lfops.c index 468f5830..16c42855 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -16,6 +16,7 @@ #include "string.h" #include "lfdemod.h" #include "lfsampling.h" +#include "usb_cdc.h" /** @@ -401,7 +402,7 @@ void SimulateTagLowFrequency(int period, int gap, int ledcontrol) for(;;) { //wait until SSC_CLK goes HIGH while(!(AT91C_BASE_PIOA->PIO_PDSR & GPIO_SSC_CLK)) { - if(BUTTON_PRESS()) { + if(BUTTON_PRESS() || usb_poll()) { DbpString("Stopped"); return; } -- 2.39.2