1
0
mirror of https://github.com/UzixLS/picocom.git synced 2025-07-19 07:21:18 +03:00

Enabled support for higher baudrates up to 921600. Support is

compiled-in conditionally on the HIGH_BAUD macro.

Thanks to Pavel Vymetalek
This commit is contained in:
Nick Patavalis
2010-05-28 01:12:12 +00:00
parent b208d8df0f
commit 8a48fc24aa
3 changed files with 20 additions and 1 deletions

View File

@ -2,7 +2,8 @@
VERSION=1.5
# CC = gcc
CPPFLAGS=-DVERSION_STR=\"$(VERSION)\" -DUUCP_LOCK_DIR=\"/var/lock\"
CPPFLAGS=-DVERSION_STR=\"$(VERSION)\" -DUUCP_LOCK_DIR=\"/var/lock\" \
-DHIGH_BAUD
CFLAGS = -Wall -g
# LD = gcc

View File

@ -304,8 +304,13 @@ baud_up (int baud)
baud = 57600;
else
baud = baud * 2;
#ifndef HIGH_BAUD
if ( baud > 115200 )
baud = 115200;
#else
if ( baud > 921600 )
baud = 921600;
#endif
return baud;
}
@ -313,8 +318,13 @@ baud_up (int baud)
int
baud_down (int baud)
{
#ifndef HIGH_BAUD
if ( baud > 115200 )
baud = 115200;
#else
if ( baud > 921600 )
baud = 921600;
#endif
else if ( baud == 57600 )
baud = 38400;
else

8
term.c
View File

@ -627,9 +627,17 @@ term_set_baudrate (int fd, int baudrate)
case 115200:
spd = B115200;
break;
#ifdef HIGH_BAUD
case 230400:
spd = B230400;
break;
case 460800:
spd = B460800;
break;
case 921600:
spd = B921600;
break;
#endif
default:
term_errno = TERM_EBAUD;
rval = -1;