serial: (Trivial) add support for 4800 baud

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
This commit is contained in:
Alexandru Gagniuc 2012-10-15 01:12:53 -05:00 committed by Bert Vermeulen
parent 5fef6b9d6c
commit e8e9dcdd70
1 changed files with 6 additions and 0 deletions

View File

@ -218,6 +218,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
case 9600:
dcb.BaudRate = CBR_9600;
break;
case 4800:
dcb.BaudRate = CBR_4800;
break;
default:
/* TODO: Error handling. */
break;
@ -238,6 +241,9 @@ SR_PRIV int serial_set_params(int fd, int baudrate, int bits, int parity,
return SR_ERR;
switch (baudrate) {
case 4800:
baud = B4800;
break;
case 9600:
baud = B9600;
break;