usb-device: Difference between Update and PC Suite mode

This commit is contained in:
Pali Rohár committed 2014-11-21 17:16:10 +01:00
1 parent 7023b4b290
commit 6372323ee8
1 file changed
+7 -3
+7 -3
View File
@@ -384,7 +384,7 @@ void usb_switch_to_update(struct usb_device_info * dev) {
leave_cold_flash(dev); leave_cold_flash(dev);
else if ( dev->flash_device->protocol == FLASH_NOLO ) else if ( dev->flash_device->protocol == FLASH_NOLO )
nolo_boot_device(dev, "update"); nolo_boot_device(dev, "update");
else if ( dev->flash_device->protocol == FLASH_MKII ) else if ( dev->flash_device->protocol == FLASH_MKII && ! ( dev->data & ( 1 << 31 ) ) )
mkii_reboot_device(dev); mkii_reboot_device(dev);
else if ( dev->flash_device->protocol == FLASH_DISK ) else if ( dev->flash_device->protocol == FLASH_DISK )
printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again"); printf_and_wait("Unplug USB cable, turn device off, press ENTER and plug USB cable again");
@@ -400,7 +400,11 @@ void usb_switch_to_disk(struct usb_device_info * dev) {
else if ( dev->flash_device->protocol == FLASH_NOLO ) { else if ( dev->flash_device->protocol == FLASH_NOLO ) {
nolo_boot_device(dev, NULL); nolo_boot_device(dev, NULL);
printf_and_wait("Wait until device start, choose USB Mass Storage Mode and press ENTER"); printf_and_wait("Wait until device start, choose USB Mass Storage Mode and press ENTER");
} else if ( dev->flash_device->protocol == FLASH_MKII ) } else if ( dev->flash_device->protocol == FLASH_MKII ) {
mkii_reboot_device(dev); if ( dev->data & ( 1 << 31 ) )
mkii_reboot_device(dev);
else
printf_and_wait("Unplug USB cable, plug again, choose USB Mass Storage Mode and press ENTER");
}
} }