libwallaby  v24
The wallaby standard library
digital.hpp
Go to the documentation of this file.
1 /*
2  * digital.hpp
3  *
4  * Created on: Nov 2, 2015
5  * Author: Joshua Southerland
6  */
7 
8 #ifndef INCLUDE_WALLABY_DIGITAL_HPP_
9 #define INCLUDE_WALLABY_DIGITAL_HPP_
10 
11 #include "sensor.hpp"
12 
13 class Digital : public Sensor<bool>
14 {
15 public:
16  Digital(unsigned char port);
17 
18  void setValue(bool value);
19 
20  void setOutput(bool output);
21 
22  bool isOutput() const;
23 
24  void setPullup(bool pullup);
25 
26  bool pullup() const;
27 
28  virtual bool value() const;
29 
30 private:
31  unsigned char m_port;
32 };
33 
34 
35 #endif /* INCLUDE_WALLABY_DIGITAL_HPP_ */
Digital::isOutput
bool isOutput() const
Digital::setValue
void setValue(bool value)
Digital::pullup
bool pullup() const
Digital::Digital
Digital(unsigned char port)
sensor.hpp
Digital::setPullup
void setPullup(bool pullup)
Digital::setOutput
void setOutput(bool output)
Digital::value
virtual bool value() const
Digital
Definition: digital.hpp:13
Sensor
Definition: sensor.hpp:17