changeset 1:cfc9524cca2c

Add 430600 and 921600 baud rates to serial shim Add 430600 and 921600 baud rates to the serial shim. Also guard references to B230400, B460800, and B921600 with #ifdef in case they happen not to be supported by a given system. B115200 is not guarded because it is a required rate for the bitbanger implementations on the coco3.
author William Astle <lost@l-w.ca>
date Sun, 08 May 2016 13:45:40 -0600
parents bef2801ac83e
children 2f2cbd2d2561
files src/lwwire-serial.c
diffstat 1 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/lwwire-serial.c	Sun May 08 12:56:39 2016 -0600
+++ b/src/lwwire-serial.c	Sun May 08 13:45:40 2016 -0600
@@ -81,12 +81,28 @@
 		cfsetispeed(&io_mod, B115200);
 		cfsetospeed(&io_mod, B115200);
 		break;
-	
+
+#ifdef B230400	
 	case 230400:
 		cfsetispeed(&io_mod, B230400);
 		cfsetospeed(&io_mod, B230400);
 		break;
-		
+#endif
+
+#ifdef B460800
+	case 460800:
+		cfsetispeed(&io_mod, B460800);
+		cfsetospeed(&io_mod, B460800);
+		break;
+#endif
+
+#ifdef B921600
+	case 921600:
+		cfsetispeed(&io_mod, B921600);
+		cfsetospeed(&io_mod, B921600);
+		break;
+#endif
+
 	default:
 		fprintf(stderr, "Unrecognzied speed %d on port %s; using 38400\n", speed, port);
 		cfsetispeed(&io_mod, B38400);