DUDS
Distributed Update of Data from Something
I2c.hpp
Go to the documentation of this file.
1 /*
2  * This file is part of the DUDS project. It is subject to the BSD-style
3  * license terms in the LICENSE file found in the top-level directory of this
4  * distribution and at https://github.com/jjackowski/duds/blob/master/LICENSE.
5  * No part of DUDS, including this file, may be copied, modified, propagated,
6  * or distributed except according to the terms contained in the LICENSE file.
7  *
8  * Copyright (C) 2017 Jeff Jackowski
9  */
10 #ifndef I2C_HPP
11 #define I2C_HPP
12 
13 #include <boost/noncopyable.hpp>
15 
16 namespace duds { namespace hardware { namespace interface {
17 
22 class I2c : public Conversationalist, boost::noncopyable {
23 public:
65  virtual void converse(Conversation &conv) = 0;
70  virtual int address() const = 0;
71 };
72 
73 } } }
74 
75 #endif // #ifndef I2C_HPP
virtual void converse(Conversation &conv)=0
Conducts I2C communication with a device.
virtual int address() const =0
Returns the address of the device that this object will attempt to communicate with.
Allows a common interface for using Conversation objects for communication.
static std::wstring_convert< std::codecvt_utf8< char32_t >, char32_t > conv
String converter; UTF-8 to/from UTF-32.
Definition: BppFont.cpp:165
A basic I2C interface.
Definition: I2c.hpp:22
Represents a two-way conversation with a device.