add high speed serial mode

This commit is contained in:
John
2022-04-10 16:37:54 +02:00
parent 5777af8b03
commit aa50e2388c
3 changed files with 12 additions and 5 deletions
+7 -2
View File
@@ -346,10 +346,12 @@ class SerialDevice : public Device {
* @param readOnly whether to allow read access to the device only.
* @param initialSend whether to send an initial @a ESC symbol in @a open().
* @param enhancedProto whether to use the ebusd enhanced protocol.
* @param enhancedHighSpeed whether to use ebusd enhanced protocol in high speed mode.
*/
SerialDevice(const char* name, bool checkDevice, unsigned int extraLatency, bool readOnly, bool initialSend,
bool enhancedProto = false)
: Device(name, checkDevice, extraLatency, readOnly, initialSend, enhancedProto) {}
bool enhancedProto = false, bool enhancedHighSpeed = false)
: Device(name, checkDevice, extraLatency, readOnly, initialSend, enhancedProto), m_enhancedHighSpeed(enhancedHighSpeed) {
}
// @copydoc
result_t open() override;
@@ -364,6 +366,9 @@ class SerialDevice : public Device {
private:
/** whether to use ebusd enhanced protocol in high speed mode. */
bool m_enhancedHighSpeed;
/** the previous settings of the device for restoring. */
termios m_oldSettings;
};