More explicit about eraase
This commit is contained in:
parent
a878a40269
commit
1981313dd5
Binary file not shown.
31
ram2e.c
31
ram2e.c
|
@ -335,8 +335,23 @@ int main(void)
|
||||||
case '5': mask = 0x7F; break;
|
case '5': mask = 0x7F; break;
|
||||||
case 'R': {
|
case 'R': {
|
||||||
if (reset_count > 127) {
|
if (reset_count > 127) {
|
||||||
ufm_erase();
|
// Show message about saving.
|
||||||
reset_count = 0;
|
clrscr(); // Clear screen
|
||||||
|
gotoxy(1, 8);
|
||||||
|
cputs("Resetting RAM2E settings.");
|
||||||
|
gotoxy(1, 9);
|
||||||
|
cputs("Do not turn off your Apple.");
|
||||||
|
|
||||||
|
ufm_erase(); // Reset RAM2E settings
|
||||||
|
|
||||||
|
// Wait for >= 500ms on even the fastest systems.
|
||||||
|
spin(32, 8);
|
||||||
|
|
||||||
|
// Show success message and quit
|
||||||
|
clrscr(); // Clear screen
|
||||||
|
gotoxy(1, 8);
|
||||||
|
cputs("RAM2E settings reset successfully.");
|
||||||
|
goto end;
|
||||||
} else { reset_count++; }
|
} else { reset_count++; }
|
||||||
} default: continue;
|
} default: continue;
|
||||||
}
|
}
|
||||||
|
@ -359,28 +374,26 @@ int main(void)
|
||||||
cputs("Saving RAM2E capacity setting.");
|
cputs("Saving RAM2E capacity setting.");
|
||||||
gotoxy(1, 9);
|
gotoxy(1, 9);
|
||||||
cputs("Do not turn off your Apple.");
|
cputs("Do not turn off your Apple.");
|
||||||
|
|
||||||
// Save capacity in nonvolatile memory.
|
// Save capacity in nonvolatile memory.
|
||||||
set_nvm(mask);
|
set_nvm(mask);
|
||||||
|
|
||||||
// Wait for >= 500ms on even the fastest systems.
|
// Wait for >= 500ms on even the fastest systems.
|
||||||
spin(32, 8);
|
spin(32, 8);
|
||||||
|
// Print success message
|
||||||
// Clear screen again.
|
clrscr(); // Clear screen
|
||||||
clrscr();
|
|
||||||
|
|
||||||
gotoxy(1, 8);
|
gotoxy(1, 8);
|
||||||
cputs("RAM2E capacity saved successfully.");
|
cputs("RAM2E capacity saved successfully.");
|
||||||
} else { // Print success message if not saving in NVM.
|
} else { // Print success message if not saving in NVM.
|
||||||
gotoxy(1, 8);
|
gotoxy(1, 8);
|
||||||
cputs("RAM2E capacity set successfully.");
|
cputs("RAM2E capacity set successfully.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
end:
|
||||||
|
// Show end message
|
||||||
gotoxy(1, 10);
|
gotoxy(1, 10);
|
||||||
cputs("Press any key to quit.");
|
cputs("Press any key to quit.");
|
||||||
gotoxy(1, 11);
|
gotoxy(1, 11);
|
||||||
cputs("You may also turn off your Apple.");
|
cputs("You may also turn off your Apple.");
|
||||||
cgetc();
|
cgetc();
|
||||||
|
|
||||||
// Quit
|
// Quit
|
||||||
clrscr();
|
clrscr();
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|
Loading…
Reference in New Issue