libwallaby  v23
The wallaby standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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_ */
virtual bool value() const
Definition: sensor.hpp:17
bool pullup() const
bool isOutput() const
void setValue(bool value)
void setOutput(bool output)
Definition: digital.hpp:13
void setPullup(bool pullup)
Digital(unsigned char port)