libwallaby  v24
The wallaby standard library
analog.hpp
Go to the documentation of this file.
1 /*
2  * analog.hpp
3  *
4  * Created on: Nov 3, 2015
5  * Author: Joshua Southerland
6  */
7 
8 #ifndef INCLUDE_WALLABY_ANALOG_HPP_
9 #define INCLUDE_WALLABY_ANALOG_HPP_
10 
11 #include "sensor.hpp"
12 
13 class Analog : public Sensor<unsigned short>
14 {
15 public:
16  Analog(unsigned char port);
17  virtual ~Analog();
18 
19  virtual unsigned short value() const;
20 
21  virtual void setPullup(bool pullup);
22  bool pullup() const;
23 
24  unsigned char port() const;
25 private:
26  unsigned char m_port;
27 };
28 
29 class Analog8 : public Analog
30 {
31 public:
32  Analog8(unsigned char port);
33  virtual ~Analog8();
34 
35  unsigned short value() const;
36 };
37 
38 class Analog10 : public Analog
39 {
40 public:
41  Analog10(unsigned char port);
42  virtual ~Analog10();
43 
44  virtual unsigned short value() const;
45 };
46 
47 
48 #endif /* INCLUDE_WALLABY_ANALOG_HPP_ */
Analog::value
virtual unsigned short value() const
Analog10
Definition: analog.hpp:38
Analog::~Analog
virtual ~Analog()
Analog::pullup
bool pullup() const
Analog8::~Analog8
virtual ~Analog8()
Analog::setPullup
virtual void setPullup(bool pullup)
Analog::port
unsigned char port() const
Analog10::Analog10
Analog10(unsigned char port)
Analog8::Analog8
Analog8(unsigned char port)
sensor.hpp
Analog8::value
unsigned short value() const
Analog
Definition: analog.hpp:13
Analog8
Definition: analog.hpp:29
Analog10::value
virtual unsigned short value() const
Analog10::~Analog10
virtual ~Analog10()
Analog::Analog
Analog(unsigned char port)
Sensor
Definition: sensor.hpp:17