comparison src/lwwire-serial.c @ 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
comparison
equal deleted inserted replaced
0:bef2801ac83e 1:cfc9524cca2c
79 79
80 case 115200: 80 case 115200:
81 cfsetispeed(&io_mod, B115200); 81 cfsetispeed(&io_mod, B115200);
82 cfsetospeed(&io_mod, B115200); 82 cfsetospeed(&io_mod, B115200);
83 break; 83 break;
84 84
85 #ifdef B230400
85 case 230400: 86 case 230400:
86 cfsetispeed(&io_mod, B230400); 87 cfsetispeed(&io_mod, B230400);
87 cfsetospeed(&io_mod, B230400); 88 cfsetospeed(&io_mod, B230400);
88 break; 89 break;
89 90 #endif
91
92 #ifdef B460800
93 case 460800:
94 cfsetispeed(&io_mod, B460800);
95 cfsetospeed(&io_mod, B460800);
96 break;
97 #endif
98
99 #ifdef B921600
100 case 921600:
101 cfsetispeed(&io_mod, B921600);
102 cfsetospeed(&io_mod, B921600);
103 break;
104 #endif
105
90 default: 106 default:
91 fprintf(stderr, "Unrecognzied speed %d on port %s; using 38400\n", speed, port); 107 fprintf(stderr, "Unrecognzied speed %d on port %s; using 38400\n", speed, port);
92 cfsetispeed(&io_mod, B38400); 108 cfsetispeed(&io_mod, B38400);
93 cfsetospeed(&io_mod, B38400); 109 cfsetospeed(&io_mod, B38400);
94 break; 110 break;