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 eda6fa406c0062e659ea0403f7faefeff925b78a..c602edfb571c63ac717bd0f1e60849c578c51261 100644 (file)
Binary files a/parts.ods and b/parts.ods differ
index b2c321c98d5e120732199deae9cf815fccc64fb4..8ad6dade2671c4ce7f44024ad7e7e9cd00e61573 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 3583c2ac444043b739af483f45d6c37ec9f9df6e..42fe714dda8bbf46d3909577d5af415caa3c8677 100755 (executable)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cydwr and b/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cydwr differ
index 3fa62028e1af012546dc5ec73f52103b525110dd..fc745ec5d73105d39b25e8838fcead42ec4d7e08 100644 (file)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cyfit and b/software/SCSI2SD/v4/SCSI2SD.cydsn/SCSI2SD.cyfit differ
index 20dd8d77fd220a114bac8bbb450baed3ac024e19..0a5400e3f4f48b965b34716b49102c1870c5fda5 100755 (executable)
Binary files a/software/SCSI2SD/v4/SCSI2SD.cydsn/TopDesign/TopDesign.cysch and b/software/SCSI2SD/v4/SCSI2SD.cydsn/TopDesign/TopDesign.cysch differ