Restore the branch

This commit is contained in:
Jonathan Naylor
2020-12-15 16:21:07 +00:00
parent 135fd04e0d
commit d77e2a00ce
126 changed files with 12881 additions and 8106 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
@@ -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