fix ReloadException when in REPL

This commit is contained in:
Dan Halbert 2022-03-16 12:36:52 -04:00
parent ff0b3a9f50
commit bf1329bb1f
2 changed files with 2 additions and 2 deletions

View File

@ -80,7 +80,7 @@ inline bool autoreload_is_enabled() {
}
void autoreload_trigger() {
if (autoreload_enabled) {
if (autoreload_enabled & !autoreload_suspended) {
last_autoreload_trigger = supervisor_ticks_ms32();
// Guard against the rare time that ticks is 0;
if (last_autoreload_trigger == 0) {

View File

@ -216,8 +216,8 @@ void tud_msc_write10_complete_cb(uint8_t lun) {
(void)lun;
// This write is complete; initiate an autoreload.
autoreload_trigger();
autoreload_resume(AUTORELOAD_SUSPEND_USB);
autoreload_trigger();
}
// Invoked when received SCSI_CMD_INQUIRY