mirror of
https://github.com/g4klx/MMDVMHost.git
synced 2026-04-05 14:35:31 +00:00
Allow the modem to host a serial display.
This commit is contained in:
parent
7503d314e0
commit
178e104d44
21 changed files with 342 additions and 106 deletions
|
|
@ -20,6 +20,8 @@
|
|||
#ifndef SerialController_H
|
||||
#define SerialController_H
|
||||
|
||||
#include "SerialPort.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
|
|
@ -38,17 +40,18 @@ enum SERIAL_SPEED {
|
|||
SERIAL_230400 = 230400
|
||||
};
|
||||
|
||||
class CSerialController {
|
||||
class CSerialController : public ISerialPort {
|
||||
public:
|
||||
CSerialController(const std::string& device, SERIAL_SPEED speed, bool assertRTS = false);
|
||||
~CSerialController();
|
||||
virtual ~CSerialController();
|
||||
|
||||
bool open();
|
||||
virtual bool open();
|
||||
|
||||
int read(unsigned char* buffer, unsigned int length);
|
||||
int write(const unsigned char* buffer, unsigned int length);
|
||||
virtual int read(unsigned char* buffer, unsigned int length);
|
||||
|
||||
void close();
|
||||
virtual int write(const unsigned char* buffer, unsigned int length);
|
||||
|
||||
virtual void close();
|
||||
|
||||
private:
|
||||
std::string m_device;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue