Diff of /serial_posix.c [57cb8e] .. [8e00c4]  Maximize  Restore

  Switch to side-by-side view

--- a/serial_posix.c
+++ b/serial_posix.c
@@ -1,7 +1,6 @@
 /*
   stm32flash - Open Source ST STM32 flash program for *nix
   Copyright (C) 2010 Geoffrey McRae <geoff@spacevs.com>
-  added DTR-Line Reset - by Georg Ottinger <g.ottinger@gmx.at>
 
   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License
@@ -26,9 +25,6 @@
 #include <stdio.h>
 #include <assert.h>
 
-#include <sys/ioctl.h>
-#include <linux/serial.h>
-
 #include "serial.h"
 
 struct serial {
@@ -56,7 +52,6 @@
 	tcgetattr(h->fd, &h->oldtio);
 	tcgetattr(h->fd, &h->newtio);
 
-
 	return h;
 }
 
@@ -74,23 +69,7 @@
 	tcflush(h->fd, TCIFLUSH);
 }
 
-void serial_dtr_reset(serial_t *h) {
-	int status;
-
-	ioctl(h->fd, TIOCMGET, &status);
-	status &= ~TIOCM_DTR;
-	ioctl(h->fd, TIOCMSET, &status);	
-	usleep(5000);
-	status |= TIOCM_DTR;
-	ioctl(h->fd, TIOCMSET, &status);	
-
-}
-
-
-
 serial_err_t serial_setup(serial_t *h, const serial_baud_t baud, const serial_bits_t bits, const serial_parity_t parity, const serial_stopbit_t stopbit) {
-	struct serial_struct serinfo;
-
 	assert(h && h->fd > -1);
 
 	speed_t		port_baud;
@@ -174,11 +153,6 @@
 	serial_flush(h);
 	if (tcsetattr(h->fd, TCSANOW, &h->newtio) != 0)
 		return SERIAL_ERR_SYSTEM;
-
-
-	ioctl (h->fd, TIOCGSERIAL, &serinfo);
-	serinfo.flags |= ASYNC_LOW_LATENCY;
-	ioctl (h->fd, TIOCSSERIAL, &serinfo);
 
 	/* confirm they were set */
 	struct termios settings;

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks