16 namespace duds {
namespace hardware {
namespace devices {
namespace instruments {
35 std::unique_ptr<duds::hardware::interface::Smbus>
com;
75 std::unique_ptr<duds::hardware::interface::Smbus> &c
85 return (config & 0x100) == 0;
126 #endif // #ifndef MCP9808_HPP A container for a value and a unit to better describe the value.
bool running() const
True when the device is sampling.
char rev
Device's revision byte.
~MCP9808()
Stops sampling.
char res
The raw data for the configured resolution.
std::unique_ptr< duds::hardware::interface::Smbus > com
Communication bus.
void start()
Begin sampling.
void sample()
Reads sample data from the device.
std::uint16_t config
The configuration word.
duds::data::Quantity temperature() const
Returns the last sampled temperature.
double temp
Last temperature sample.
MCP9808(std::unique_ptr< duds::hardware::interface::Smbus > &c)
Prepares to use a MCP9808 by identifying the device and reading, but not changing, its current configuration.
double resolutionDegrees() const
Resolution resolution() const
Returns the current sampling resolution.
void resume()
Begin sampling.
void suspend()
Stop sampling.
Preliminary support for Microchip's MCP9808 temperature sensor.