Fixed external LED detection
authorMichael McMaster <michael@codesrc.com>
Sun, 13 Jul 2014 10:15:28 +0000 (20:15 +1000)
committerMichael McMaster <michael@codesrc.com>
Sun, 13 Jul 2014 10:15:28 +0000 (20:15 +1000)
Updated parts list for the V4 boards.

parts.ods
software/SCSI2SD/src/led.c
software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cydwr
software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cyfit
software/SCSI2SD/v4/SCSI2SD.cydsn/TopDesign/TopDesign.cysch

index eda6fa4..c602edf 100644 (file)
Binary files a/parts.ods and b/parts.ods differ
index b2c321c..8ad6dad 100755 (executable)
@@ -31,7 +31,10 @@ static int enable_EXTLED = 0;
 void ledInit()
 {
 #ifdef HAVE_EXTLED
-       EXTLED_SetDriveMode(EXTLED_DM_DIG_HIZ | EXTLED_DM_RES_UP);
+       EXTLED_SetDriveMode(EXTLED_DM_RES_UP);
+       EXTLED_Write(1); // Will pull-up through resistor.
+
+       CyDelayUs(1);
        int val = EXTLED_Read();
        if (val)
        {
@@ -68,10 +71,7 @@ void ledOff()
        LED1_Write(1);
 
 #ifdef HAVE_EXTLED
-       if (enable_EXTLED)
-       {
-               EXTLED_Write(0);
-       }
+       EXTLED_Write(0);
 #endif
 }
 
index 3583c2a..42fe714 100755 (executable)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cydwr and b/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cydwr differ
index 3fa6202..fc745ec 100644 (file)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cyfit and b/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cyfit differ
index 20dd8d7..0a5400e 100755 (executable)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/TopDesign/TopDesign.cysch and b/software/SCSI2SD/v4/SCSI2SD.cydsn/TopDesign/TopDesign.cysch differ