Open shawnchain opened 3 years ago
@shawnchain please wait. this define is not required. at least I wrote this https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L297 and OSX (and BSD) uses https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L364 leaf. I read https://github.com/st3fan/osx-10.9/blob/master/xnu-2422.1.72/bsd/sys/termios.h and I know OSX (and BSD) need to pass raw value to cfsetospeed() / cfsetispeed().
@shawnchain ping
@shawnchain ping
sorry for the late reply! yes, you're correct.
https://github.com/g4klx/MMDVMHost/blob/b57b781ab8a4fad4fe47d1e530dfa609bf87436b/UARTController.cpp#L353
this change may break the high baudrate support under macos.
B460800 is not defined in macos' posix header file, but macos does support that speed. Pass the the number 460800 to cfsetospeed() / cfsetispeed() instead.