libwallaby  v23
The wallaby standard library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
servo.hpp
Go to the documentation of this file.
1 /*
2  * servo.hpp
3  *
4  * Created on: Nov 5, 2015
5  * Author: Joshua Southerland
6  */
7 
8 #ifndef INCLUDE_WALLABY_SERVO_HPP_
9 #define INCLUDE_WALLABY_SERVO_HPP_
10 
11 class Servo
12 {
13 public:
14  typedef unsigned int ticks_t;
15 
16  Servo(int port);
17 
18  void setPosition(ticks_t position);
19 
20  ticks_t position() const;
21 
22  void disable();
23  void enable();
24  void setEnabled(bool enabled);
25  bool isEnabled() const;
26 private:
27  int m_port;
28 };
29 
30 #endif /* INCLUDE_WALLABY_SERVO_HPP_ */
void setEnabled(bool enabled)
Servo(int port)
unsigned int ticks_t
Definition: servo.hpp:14
Definition: servo.hpp:11
ticks_t position() const
bool isEnabled() const
void enable()
void disable()
void setPosition(ticks_t position)