mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-21 23:45:49 +08:00
Revert "Merge branch 'M17_AX25_FM'"
This reverts commite1427e3e37, reversing changes made tobcdba292eb.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2002-2004,2007-2009,2011-2013,2015-2017,2020 by Jonathan Naylor G4KLX
|
||||
* Copyright (C) 2002-2004,2007-2009,2011-2013,2015-2017 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,9 +28,21 @@
|
||||
#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, unsigned int speed, bool assertRTS = false);
|
||||
CSerialController(const std::string& device, SERIAL_SPEED speed, bool assertRTS = false);
|
||||
virtual ~CSerialController();
|
||||
|
||||
virtual bool open();
|
||||
@@ -46,10 +58,8 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
CSerialController(unsigned int speed, bool assertRTS = false);
|
||||
|
||||
std::string m_device;
|
||||
unsigned int m_speed;
|
||||
SERIAL_SPEED m_speed;
|
||||
bool m_assertRTS;
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
HANDLE m_handle;
|
||||
@@ -61,7 +71,6 @@ protected:
|
||||
int readNonblock(unsigned char* buffer, unsigned int length);
|
||||
#else
|
||||
bool canWrite();
|
||||
bool setRaw();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user