FreeCalypso > hg > freecalypso-sw
diff loadtools/sercomm.c @ 9:fea204bc7674
fc-sertool compiles
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Wed, 01 May 2013 02:43:17 +0000 |
parents | aa1f6fe16fef |
children | 54392d1ea474 |
line wrap: on
line diff
--- a/loadtools/sercomm.c Tue Apr 30 21:35:14 2013 +0000 +++ b/loadtools/sercomm.c Wed May 01 02:43:17 2013 +0000 @@ -37,3 +37,13 @@ } return 0; } + +switch_baud_rate(code) +{ + cfsetispeed(&target_termios, code); + cfsetospeed(&target_termios, code); + if (tcsetattr(target_fd, TCSAFLUSH, &target_termios) < 0) { + perror("tcsetattr to switch baud rate"); + exit(1); + } +}