licheedev / Android-SerialPort-API

Fork自Google开源的Android串口通信Demo,修改成Android Studio项目
https://code.google.com/archive/p/android-serialport-api/
Apache License 2.0
1.3k stars 374 forks source link

mark/space parity and custom baudrates #47

Open perrypetiet opened 1 year ago

perrypetiet commented 1 year ago

Added mark and space parity using the CMSPAR flag in combination with the PARODD flag. Added custom baudrate using the termios2 structure instead of the termios header. Added function to change the parity of a port given the device File and the parity. Added constants to set parity easier (example.. Parity_Even instead of 2).

I don't think it will conflict with the sample application, but maybe you can do something with these changes