Set unmounted on configuration reset

This commit is contained in:
Rocky04 2023-08-02 15:25:08 +02:00 committed by GitHub
parent 5cf94234d2
commit 9560d0813f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -965,7 +965,14 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
}
// invoke callback
if (tud_mount_cb) tud_mount_cb();
if (cfg_num)
{
if (tud_mount_cb) tud_mount_cb();
}
else
{
if (tud_umount_cb) tud_umount_cb();
}
return true;
}