diff loadtools/clmain.c @ 250:8c011177adb9

loadtools reworked to use factored-out libserial
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 21 Sep 2017 23:07:01 +0000
parents 064d4eedb3a6
children dc05170ab113
line wrap: on
line diff
--- a/loadtools/clmain.c	Thu Sep 21 21:49:07 2017 +0000
+++ b/loadtools/clmain.c	Thu Sep 21 23:07:01 2017 +0000
@@ -7,12 +7,12 @@
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
-#include <termios.h>
 #include <unistd.h>
-#include "baudrate.h"
+#include "../libserial/baudrate.h"
 #include "srecreader.h"
 
-extern char *target_ttydev;
+char *target_ttydev;
+
 extern struct srecreader iramimage;
 extern char default_loadagent_image[];
 extern struct srecreader xramimage;
@@ -92,8 +92,8 @@
 		passon_argc = argc - optind - 2;
 	}
 
-	open_target_serial();
-	perform_compal_stage(1);
+	open_serial_port(target_ttydev);
+	perform_compal_stage();
 	perform_romload();
 	/* loadagent should be running now */
 	if (tpinterf_pass_output(1) < 0)