On this page
article
peary/hardware/components/ADS7828.hpp
peary/hardware/components/ADS7828.hpp
ADS7828 Component Class. More…
Namespaces
| Name |
|---|
| peary |
| peary::component |
Classes
| Name | |
|---|---|
| class | peary::component::ADS7828 ADS7828 8-Channel 12-Bit A/D Converter Component. |
Detailed Description
ADS7828 Component Class.
Copyright: Copyright (c) 2016-2025 CERN and the Peary Caribou authors. This software is distributed under the terms of the LGPL-3.0-only License, copied verbatim in the file “LICENSE.md”. SPDX-License-Identifier: LGPL-3.0-only
Source code
#pragma once
#include <cstdint>
#include <string>
#include "peary/hal/Components.hpp"
#include "peary/interfaces/I2C/i2c.hpp"
namespace peary::component {
class ADS7828 : public hal::Component {
public:
// Channel addresses
enum class Channel { //
CHO = 0x00,
CH1 = 0x40,
CH2 = 0x10,
CH3 = 0x50,
CH4 = 0x20,
CH5 = 0x60,
CH6 = 0x30,
CH7 = 0x70
};
using enum Channel;
ADS7828(const std::string& i2c_bus, uint8_t device_address, double vref);
double readSingleEnded(Channel channel);
private:
std::string _bus;
uint8_t _address;
double _vref;
};
} // namespace peary::component
Updated on 2025-11-14 at 11:31:23 +0100