diff options
author | root <root@fedora-arm.domain.avtechpulse.com> | 1999-12-31 19:33:28 -0500 |
---|---|---|
committer | root <root@fedora-arm.domain.avtechpulse.com> | 1999-12-31 19:33:28 -0500 |
commit | c7f023c4d7e5544002f68583889f4acb0eb91847 (patch) | |
tree | c088ea6975bd4e599310b0166b03bc2a911af55d /instr-daemon.c | |
parent | 6d29a3599123e2aaa6f3cc0b416b59197e6599d5 (diff) |
first attempt at gpib listening - may not be functional
Diffstat (limited to 'instr-daemon.c')
-rw-r--r-- | instr-daemon.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/instr-daemon.c b/instr-daemon.c index f1b1a6d..093b2f7 100644 --- a/instr-daemon.c +++ b/instr-daemon.c @@ -8,6 +8,9 @@ #include "nicutils.h" #include "monitor.h" #include "menus.h" +#include "gpib.h" +#include "parser.h" + #include <stdlib.h> #include <ctype.h> #include <glib.h> @@ -222,7 +225,7 @@ int main(int argc, char **argv) LCD_write(2,0,message); g_free (message); - // FIXME - init RS232 + GPIB_initialize(); IO_Setup_RS232( globals.Flash.baud, globals.Flash.parity, @@ -317,5 +320,16 @@ static gboolean periodic_poll (void) Menu_Check_Buttons (); + // FIXME - gpib input - should have it's own thread? + GPIB_check_for_device_clear_signal(); + if (GPIB_check_for_messages(globals.Registers.gpib_buffer)) { + if (GPIB_handle_new_input(globals.Registers.gpib_buffer)) { + // check_for_ctrl_mode_changes(); /* update rem/loc settings */ + Parser_main(globals.Registers.gpib_buffer, 0, NULL, NULL); + } + } + GPIB_check_for_device_clear_signal(); + + return TRUE; } |