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

7 Commits

Author SHA1 Message Date
ee23af0cb9 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).
2018-02-20 10:29:45 +02:00
13904345f5 Reverted #84 initial refactoring, removing #define HAS_CUSTOM_BAUD 2018-01-16 00:49:35 +01:00
6ebb8c56fc #84: custom baudrate support for OpenBsd, and Dragonfly (but not NetBsd) 2018-01-15 23:30:30 +01:00
f9e0b4c8a2 Small refactoring in term.c for bsd improvements
Introduced `#define HAS_CUSTOM_BAUD` for platforms which have appropriate implementation.

Moving that `#if defined(__linux__) && defined(USE_CUSTOM_BAUD)` ... stuff out of `term.c`and put it to `termios2.h` / `custbaud_bsd.h` headers.
Moving that platform specific `#ifdefs` to the platform specific headers helps removing duplicate complex `#ifdef` constructs.
The both platform specific headers then do `#define HAS_CUSTOM_BAUD` to signal that custom baudrate support is implemented for the target platform.
I'd tested all above mentioned platforms with both USE_CUSTOM_BAUD unset and set to check if that refactoring don't raises unexpected issues.
2018-01-15 19:47:46 +01:00
4e9f42f686 Just updated some comments 2017-12-31 07:42:00 +01:00
b78410aa04 #77: added custom baudrate support for FreeBSD 2017-12-31 07:32:23 +01:00
78abf75112 renamed custbaud_osx to custbaud_bsd 2017-12-31 06:52:30 +01:00