libkipr  1.0.0
analog.hpp
Go to the documentation of this file.
1 #ifndef _KIPR_ANALOG_ANALOG_HPP_
2 #define _KIPR_ANALOG_ANALOG_HPP_
3 
4 #include "kipr/sensor/sensor.hpp"
5 
6 namespace kipr
7 {
8  namespace analog
9  {
10  class Analog : public sensor::Sensor<unsigned short>
11  {
12  public:
13  Analog(unsigned char port);
14  virtual ~Analog();
15 
16  virtual unsigned short value() const;
17 
18  virtual void setPullup(bool pullup);
19  bool pullup() const;
20 
21  unsigned char port() const;
22 
23  private:
24  unsigned char m_port;
25  };
26 
27  class Analog8 : public Analog
28  {
29  public:
30  Analog8(unsigned char port);
31  virtual ~Analog8();
32 
33  unsigned short value() const;
34  };
35 
36  class Analog10 : public Analog
37  {
38  public:
39  Analog10(unsigned char port);
40  virtual ~Analog10();
41 
42  virtual unsigned short value() const;
43  };
44  }
45 }
46 
47 #endif
Definition: analog.hpp:37
virtual unsigned short value() const
Analog10(unsigned char port)
Definition: analog.hpp:28
Analog8(unsigned char port)
unsigned short value() const
Definition: analog.hpp:11
Analog(unsigned char port)
virtual unsigned short value() const
bool pullup() const
unsigned char port() const
virtual void setPullup(bool pullup)
Definition: sensor.hpp:23
int analog(int port)
Definition: accel.hpp:7