PIDUINO
Loading...
Searching...
No Matches
max7311.h
1/* Copyright © 2018-2025 Pascal JEAN, All rights reserved.
2 This file is part of the Piduino Library.
3
4 The Piduino Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 3 of the License, or (at your option) any later version.
8
9 The Piduino Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Lesser General Public License for more details.
13
14 You should have received a copy of the GNU Lesser General Public License
15 along with the Piduino Library; if not, see <http://www.gnu.org/licenses/>.
16*/
17#pragma once
18
19#include <piduino/converter.h>
20#include <piduino/i2cdev.h>
21
22namespace Piduino {
23
36 class Max7311 : public Converter {
37
38 public:
49 Max7311 (int busId = I2cDev::Info::defaultBus().id(), int address = 0x20);
50
57 virtual ~Max7311();
58
73 Max7311 (const std::string &parameters);
74
86 static std::string registeredName() {
87 return "max7311";
88 }
89
90
100 bool busTimeout() const;
101
112 bool setBusTimeout (bool enable);
113
114 protected:
122 class Private;
123
134
135 private:
144 };
145} // namespace Piduino
146/* ========================================================================== */
The Converter class provides an interface for analog-to-digital and digital-to-analog converters.
Definition converter.h:34
static Info defaultBus()
Gets information about the default I2C bus on the system.
I2C GPIO expander controller for the MAX7311 device.
Definition max7311.h:36
Max7311(int busId=I2cDev::Info::defaultBus().id(), int address=0x20)
Constructs a Max7311 object for the specified I2C bus and device address.
Max7311(Private &dd)
Protected constructor for internal use with PIMPL pattern.
bool setBusTimeout(bool enable)
Sets the bus timeout enable/disable state.
Max7311(const std::string &parameters)
Constructs a Max7311 object from a parameter string.
bool busTimeout() const
Gets the current bus timeout setting.
static std::string registeredName()
Returns the registered name for this converter type.
Definition max7311.h:86
virtual ~Max7311()
Virtual destructor that properly cleans up the Max7311 object.
Internal implementation class for GpioDevice.
#define PIMP_DECLARE_PRIVATE(Class)
PIMP_DECLARE_PRIVATE.
Definition global.h:82
Global namespace for Piduino.
Definition board.h:28