+int reconfig_serial_device(t_lpc *lpc) {
+
+ struct termios term;
+ int ret;
+
+ /* reconfigure the serial device for our lousy loader tool */
+
+ tcgetattr(lpc->sfd,&term);
+
+ // disable flow control
+
+ term.c_iflag&=~(IXON|IXOFF|IXANY|INLCR|ICRNL);
+
+ // change baudrate
+
+ cfsetispeed(&term,B115200);
+ cfsetospeed(&term,B115200);
+
+ ret=tcsetattr(lpc->sfd,TCSANOW,&term);
+
+ return ret;
+}
+