mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
CHG: appmain now calls cmd_recieve as it should
CHG: flasher - removed unneeded parameter to function CHG: flasher - increased limit to fpga-files that can be loaded FIX: main client, wrong windows define fixed. CHG: device side - recieve usb command does not always get 544 bytes. usb packages can be incomplete. CHG: usb_cdc.c also got piwi's changes. CHG: uart_posix.c removed a debug value CHG: uart_win32.c clean up.
This commit is contained in:
parent
77103e71cf
commit
16028f7d33
9 changed files with 279 additions and 252 deletions
|
@ -1161,20 +1161,12 @@ void __attribute__((noreturn)) AppMain(void) {
|
|||
#endif
|
||||
|
||||
byte_t rx[sizeof(UsbCommand)];
|
||||
size_t rx_len = 0;
|
||||
|
||||
for(;;) {
|
||||
|
||||
// Check if there is a usb packet available
|
||||
if ( usb_poll_validate_length() ) {
|
||||
|
||||
// Try to retrieve the available command frame
|
||||
rx_len = usb_read(rx, sizeof(UsbCommand));
|
||||
|
||||
// Check if the transfer was complete
|
||||
if (rx_len == sizeof(UsbCommand))
|
||||
UsbPacketReceived(rx, rx_len);
|
||||
}
|
||||
if ( cmd_receive( (UsbCommand*)rx ) )
|
||||
UsbPacketReceived(rx, sizeof(UsbCommand) );
|
||||
|
||||
WDT_HIT();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue