Skip to content

Commit 9560d08

Browse files
authored
Set unmounted on configuration reset
1 parent 5cf9423 commit 9560d08

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/device/usbd.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -965,7 +965,14 @@ static bool process_set_config(uint8_t rhport, uint8_t cfg_num)
965965
}
966966

967967
// invoke callback
968-
if (tud_mount_cb) tud_mount_cb();
968+
if (cfg_num)
969+
{
970+
if (tud_mount_cb) tud_mount_cb();
971+
}
972+
else
973+
{
974+
if (tud_umount_cb) tud_umount_cb();
975+
}
969976

970977
return true;
971978
}

0 commit comments

Comments
 (0)