mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-01-30 12:00:52 +08:00
CHG: bootrom flashmode, the delay wait, is already inside usb_enable() function.
This commit is contained in:
parent
e47114bd65
commit
77103e71cf
1 changed files with 4 additions and 3 deletions
|
@ -194,17 +194,18 @@ static void flash_mode(int externally_entered) {
|
||||||
size_t rx_len;
|
size_t rx_len;
|
||||||
|
|
||||||
usb_enable();
|
usb_enable();
|
||||||
for (volatile size_t i=0; i<0x100000; i++) {};
|
//for (volatile size_t i=0; i<0x100000; i++) {};
|
||||||
|
|
||||||
for(;;) {
|
for(;;) {
|
||||||
WDT_HIT();
|
|
||||||
|
|
||||||
if ( usb_poll_validate_length()) {
|
if ( usb_poll_validate_length()) {
|
||||||
rx_len = usb_read(rx, sizeof(UsbCommand));
|
rx_len = usb_read(rx, sizeof(UsbCommand));
|
||||||
if (rx_len)
|
if (rx_len == sizeof(UsbCommand))
|
||||||
UsbPacketReceived(rx, rx_len);
|
UsbPacketReceived(rx, rx_len);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WDT_HIT();
|
||||||
|
|
||||||
if (!externally_entered && !BUTTON_PRESS()) {
|
if (!externally_entered && !BUTTON_PRESS()) {
|
||||||
/* Perform a reset to leave flash mode */
|
/* Perform a reset to leave flash mode */
|
||||||
usb_disable();
|
usb_disable();
|
||||||
|
|
Loading…
Reference in a new issue