mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07:00
MERGED: @holimans changes
MERGED: @piwi changes MERGED: @marshmellows changes. I'm not even gonna try write up all that stuff.. ADD: changed some commands inside the "Hf 14a sim" on deviceside. ADD: @mobeius "two nonce" version for mfkey32. It is also inside the "hf 14a sim" with the "x" parameter.
This commit is contained in:
parent
f445df401e
commit
7838f4beba
37 changed files with 488 additions and 105 deletions
|
@ -293,6 +293,22 @@ bool usb_poll()
|
|||
return (pUdp->UDP_CSR[AT91C_EP_OUT] & btReceiveBank);
|
||||
}
|
||||
|
||||
/**
|
||||
In github PR #129, some users appears to get a false positive from
|
||||
usb_poll, which returns true, but the usb_read operation
|
||||
still returns 0.
|
||||
This check is basically the same as above, but also checks
|
||||
that the length available to read is non-zero, thus hopefully fixes the
|
||||
bug.
|
||||
**/
|
||||
bool usb_poll_validate_length()
|
||||
{
|
||||
|
||||
if (!usb_check()) return false;
|
||||
if (!(pUdp->UDP_CSR[AT91C_EP_OUT] & btReceiveBank)) return false;
|
||||
return (pUdp->UDP_CSR[AT91C_EP_OUT] >> 16) > 0;
|
||||
}
|
||||
|
||||
//*----------------------------------------------------------------------------
|
||||
//* \fn usb_read
|
||||
//* \brief Read available data from Endpoint OUT
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue