ADD: using @holiman's "ubs_poll_validate_length() function in some device-side functions.

-hitag2, -legicrf, HIDdemodFSK, CmDAWIDdemodFSK, CmdEM410xdemod, CmdIOdemodFSK

It should enable them to be aborted with a call to  "hw ping / hw status" instead of only button-press. Which is good when you are scripting stuff.
This commit is contained in:
iceman1001 2015-07-22 23:45:41 +02:00
commit 6427695bb4
4 changed files with 8 additions and 7 deletions

View file

@ -765,7 +765,7 @@ void SnoopHitag(uint32_t type) {
bSkip = true;
tag_sof = 4;
while(!BUTTON_PRESS()) {
while(!BUTTON_PRESS() && !usb_poll_validate_length()) {
// Watchdog hit
WDT_HIT();
@ -992,7 +992,7 @@ void SimulateHitagTag(bool tag_mem_supplied, byte_t* data) {
// Enable and reset counter
AT91C_BASE_TC1->TC_CCR = AT91C_TC_CLKEN | AT91C_TC_SWTRG;
while(!BUTTON_PRESS()) {
while(!BUTTON_PRESS() && !usb_poll_validate_length()) {
// Watchdog hit
WDT_HIT();