summaryrefslogtreecommitdiff
path: root/instr-daemon.c
diff options
context:
space:
mode:
Diffstat (limited to 'instr-daemon.c')
-rw-r--r--instr-daemon.c16
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;
}