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:
3
Makefile
3
Makefile
@ -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
|
||||
|
10
picocom.c
10
picocom.c
@ -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
|
||||
|
Reference in New Issue
Block a user