libkipr  1.0.0
digital.hpp
Go to the documentation of this file.
1 #ifndef _KIPR_DIGITAL_DIGITAL_HPP_
2 #define _KIPR_DIGITAL_DIGITAL_HPP_
3 
4 #include "kipr/sensor/sensor.hpp"
5 
6 namespace kipr
7 {
8  namespace digital
9  {
10  class Digital : public sensor::Sensor<bool>
11  {
12  public:
13  Digital(unsigned char port);
14 
15  void setValue(bool value);
16 
17  void setOutput(bool output);
18 
19  bool isOutput() const;
20 
21  void setPullup(bool pullup);
22 
23  bool pullup() const;
24 
25  virtual bool value() const;
26 
27  private:
28  unsigned char m_port;
29  };
30  }
31 }
32 
33 #endif
Definition: digital.hpp:11
void setOutput(bool output)
Digital(unsigned char port)
virtual bool value() const
void setPullup(bool pullup)
void setValue(bool value)
Definition: sensor.hpp:23
int digital(int port)
Definition: accel.hpp:7