summaryrefslogtreecommitdiff
path: root/gpib.c
diff options
context:
space:
mode:
authorMichael J. Chudobiak <mjc@avtechpulse.com>2013-04-08 14:28:00 -0400
committerMichael J. Chudobiak <mjc@avtechpulse.com>2013-04-08 14:28:00 -0400
commit9bf3eecdcb6273c92e27ad233b7497624c33b792 (patch)
tree9814697641f6c9af3fce9035f24ce60c46c0e677 /gpib.c
parentdc99289acd9644a365bbe662deaac2fef1b3035f (diff)
add a dedicated pin to reset GPIB, becase SYS_RESETn is flaky
Diffstat (limited to 'gpib.c')
-rw-r--r--gpib.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gpib.c b/gpib.c
index 46b1e14..88986b4 100644
--- a/gpib.c
+++ b/gpib.c
@@ -413,6 +413,13 @@ static void TNT_Gen_Error(int code)
/*----------------------------------------------------------------------------------------------------------*/
void GPIB_initialize(void)
{
+ // The RST_GPIB pin should already be low - defaults to low at
+ // power on.
+ bus_setpin(RST_GPIB, 0);
+ g_usleep(1);
+ bus_setpin(RST_GPIB, 1);
+ g_usleep(100);
+
INTERFACE_STATUS=0; /* Initialize Globals to zero */
INTERFACE_ERROR=0;
DATA_COUNT=0;