Merge pull request #6168 from dhalbert/ReloadException-in-repl

fix ReloadException when in REPL
This commit is contained in:
Dan Halbert 2022-03-16 14:33:52 -04:00 committed by GitHub
commit 66fa923699
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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