diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2016-03-12 12:01:27 +0100 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2016-03-12 12:01:27 +0100 |
commit | 54805eb0409bb9fda8cef33b9a5ae513d430999b (patch) | |
tree | 9f8e51317e931b43c56504ef6a51dbf5dc743846 /src/usb-device.c | |
parent | 7b3e9bcf000551ceb64a8607138e6d0125aea6c6 (diff) | |
download | 0xFFFF-54805eb0409bb9fda8cef33b9a5ae513d430999b.tar.bz2 |
mkii: Define MKII_UPDATE_MODE instead hardcoded constant
Diffstat (limited to 'src/usb-device.c')
-rw-r--r-- | src/usb-device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usb-device.c b/src/usb-device.c index e0c4074..895e56f 100644 --- a/src/usb-device.c +++ b/src/usb-device.c @@ -377,7 +377,7 @@ void usb_switch_to_update(struct usb_device_info * dev) { leave_cold_flash(dev); else if ( dev->flash_device->protocol == FLASH_NOLO ) nolo_boot_device(dev, "update"); - else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & ( 1UL << 31 ) ) ) + else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & MKII_UPDATE_MODE ) ) mkii_reboot_device(dev); else if ( dev->flash_device->protocol == FLASH_DISK ) printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again"); @@ -394,7 +394,7 @@ void usb_switch_to_disk(struct usb_device_info * dev) { nolo_boot_device(dev, NULL); printf_and_wait("Wait until device start, choose USB Mass Storage Mode and press ENTER"); } else if ( dev->flash_device->protocol == FLASH_MKII ) { - if ( dev->data & ( 1UL << 31 ) ) + if ( dev->data & MKII_UPDATE_MODE ) mkii_reboot_device(dev); else printf_and_wait("Unplug USB cable, plug again, choose USB Mass Storage Mode and press ENTER"); |