Make the modem speed dynamic with a default of 115200.

This commit is contained in:
Jonathan Naylor
2020-05-23 13:03:55 +01:00
parent 9d08f1605c
commit 303a0163d3
13 changed files with 746 additions and 746 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 2002-2004,2007-2009,2011-2013,2015-2017 by Jonathan Naylor G4KLX
* Copyright (C) 2002-2004,2007-2009,2011-2013,2015-2017,2020 by Jonathan Naylor G4KLX
* Copyright (C) 1999-2001 by Thomas Sailor HB9JNX
*
* This program is free software; you can redistribute it and/or modify
@@ -28,21 +28,9 @@
#include <windows.h>
#endif
enum SERIAL_SPEED {
SERIAL_1200 = 1200,
SERIAL_2400 = 2400,
SERIAL_4800 = 4800,
SERIAL_9600 = 9600,
SERIAL_19200 = 19200,
SERIAL_38400 = 38400,
SERIAL_76800 = 76800,
SERIAL_115200 = 115200,
SERIAL_230400 = 230400
};
class CSerialController : public ISerialPort {
public:
CSerialController(const std::string& device, SERIAL_SPEED speed, bool assertRTS = false);
CSerialController(const std::string& device, unsigned int speed, bool assertRTS = false);
virtual ~CSerialController();
virtual bool open();
@@ -59,7 +47,7 @@ public:
protected:
std::string m_device;
SERIAL_SPEED m_speed;
unsigned int m_speed;
bool m_assertRTS;
#if defined(_WIN32) || defined(_WIN64)
HANDLE m_handle;