Fix terrible performance
[SCSI2SD-V6.git] / src / firmware / main.c
index f418d12..67f7956 100755 (executable)
@@ -106,6 +106,9 @@ void mainLoop()
                }\r
                else\r
                {\r
+                       // TODO this hurts performance significantly! Work out why __WFI()\r
+                       // doesn't wake up immediately !\r
+#if 0\r
                        // Wait for our 1ms timer to save some power.\r
                        // There's an interrupt on the SEL signal to ensure we respond\r
                        // quickly to any SCSI commands. The selection abort time is\r
@@ -116,12 +119,13 @@ void mainLoop()
 \r
                        if (!*SCSI_STS_SELECTED)\r
                        {\r
-                               __WFI(); // Will wake on interrupt, regardless of mask\r
+                               //__WFI(); // Will wake on interrupt, regardless of mask\r
                        }\r
                        if (!interruptState)\r
                        {\r
                                __enable_irq();\r
                        }\r
+#endif\r
                }\r
        }\r
        else if (scsiDev.phase >= 0)\r