mirror of
https://github.com/UzixLS/picocom.git
synced 2025-07-19 07:21:18 +03:00
Disable custom baudrate support at runtime (Linux)
If picocom is compiled *with* custom-baudrate support (USE_CUSTOM_BAUD) for Linux, then it uses a new set of ioctl's (TCGETS2 vs TCGETS, etc) to access the serial ports. This patch allows the custom baudrate support to be disabled at runtime (without recompiling), and picocom to switch to using the old ioctl's. To disable custom baudrate support (and switch back to the "old" ioctls) simply define the environment variable NO_CUSTOM_BAUD, before starting picocom. This applies only to Linux and, obviously, only when picocom has been compiled with custom baudrate support (USE_CUSTOM_BAUD).
This commit is contained in:
@ -87,6 +87,14 @@
|
||||
|
||||
#endif /* of ndef NO_CUSTOM_BAUD else */
|
||||
|
||||
#include <termios.h>
|
||||
|
||||
int use_custom_baud();
|
||||
int cfsetispeed_custom(struct termios *tios, int speed);
|
||||
int cfsetospeed_custom(struct termios *tios, int speed);
|
||||
int cfgetispeed_custom(const struct termios *tios);
|
||||
int cfgetospeed_custom(const struct termios *tios);
|
||||
|
||||
#endif /* CUSTBAUD_H */
|
||||
|
||||
/**************************************************************************/
|
||||
|
Reference in New Issue
Block a user