mirror of
https://github.com/g4klx/MMDVMHost
synced 2025-12-24 01:25:41 +08:00
Restore the branch
This commit is contained in:
@@ -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
|
||||
@@ -20,11 +20,15 @@
|
||||
#ifndef I2CController_H
|
||||
#define I2CController_H
|
||||
|
||||
#include "SerialController.h"
|
||||
#if defined(__linux__)
|
||||
|
||||
class CI2CController : public CSerialController {
|
||||
#include "SerialPort.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
class CI2CController : public ISerialPort {
|
||||
public:
|
||||
CI2CController(const std::string& device, SERIAL_SPEED speed, unsigned int address = 0x22U, bool assertRTS = false);
|
||||
CI2CController(const std::string& device, unsigned int address = 0x22U);
|
||||
virtual ~CI2CController();
|
||||
|
||||
virtual bool open();
|
||||
@@ -33,8 +37,14 @@ public:
|
||||
|
||||
virtual int write(const unsigned char* buffer, unsigned int length);
|
||||
|
||||
virtual void close();
|
||||
|
||||
private:
|
||||
std::string m_device;
|
||||
unsigned int m_address;
|
||||
int m_fd;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user