Skip to content

Commit 7054a0e

Browse files
committed
Scan the drives on every USB reset, not just on power on.
1 parent 6105e16 commit 7054a0e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

FluxEngine.cydsn/main.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,6 @@ int main(void)
905905
USBFS_Start(0, USBFS_DWR_VDDD_OPERATION);
906906
USBFS_DisableOutEP(FLUXENGINE_DATA_OUT_EP_NUM);
907907

908-
detect_drives();
909908
CyWdtStart(CYWDT_1024_TICKS, CYWDT_LPMODE_DISABLED);
910909

911910
for (;;)
@@ -926,6 +925,8 @@ int main(void)
926925
CyWdtClear();
927926
print("USB ready");
928927
USBFS_EnableOutEP(FLUXENGINE_CMD_OUT_EP_NUM);
928+
print("Scanning drives...");
929+
detect_drives();
929930
}
930931

931932
if (USBFS_GetEPState(FLUXENGINE_CMD_OUT_EP_NUM) == USBFS_OUT_BUFFER_FULL)

0 commit comments

Comments
 (0)