Flash wasn't unlocked for USB access

This commit is contained in:
Andre Bernet
2014-04-12 23:22:06 +02:00
parent db419fd459
commit e8565b49e0
4 changed files with 9 additions and 2 deletions
+8
View File
@@ -550,6 +550,10 @@ int main()
if (state != ST_USB) {
if (usbPlugged()) {
state = ST_USB;
if (!unlocked) {
unlocked = 1;
unlockFlash();
}
usbPluggedIn();
}
}
@@ -584,6 +588,10 @@ int main()
lcd_putsLeft(4*FH, "\026USB Connected");
if (usbPlugged() == 0) {
vpos = 0;
if (unlocked) {
lockFlash();
unlocked = 0;
}
state = ST_START;
}
#if defined(PCBSKY9X)