Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
refs #17 Add VishayTherm.
Browse files Browse the repository at this point in the history
Arbitrary name for now. Vishay is the manufacturer of the thermistor I'm
testing this with.
  • Loading branch information
yoos committed Feb 10, 2015
1 parent 1529ae7 commit 4403b95
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/drivers/vishaytherm.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "drivers/vishaytherm.hpp"

#include "unit_config.hpp"

void VishayTherm::init() {
}

ThermistorReading VishayTherm::readTherm() {
ThermistorReading reading;

reading.celsius = 2.345f;

return reading;
}
19 changes: 19 additions & 0 deletions src/drivers/vishaytherm.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef VISHAYTHERM_HPP_
#define VISHAYTHERM_HPP_

#include <cstdint>

#include "hal.h"

#include "drivers/adc_device.hpp"
#include "sensor/thermistor.hpp"

class VishayTherm : protected ADCDevice<2, 4>, public Thermistor {
public:
using ADCDevice::ADCDevice;

void init() override;
ThermistorReading readTherm() override;
};

#endif

0 comments on commit 4403b95

Please sign in to comment.