libkovan
1
The kovan standard library
servo.hpp
Go to the documentation of this file.
1
/**************************************************************************
2
* Copyright 2012 KISS Institute for Practical Robotics *
3
* *
4
* This file is part of libkovan. *
5
* *
6
* libkovan is free software: you can redistribute it and/or modify *
7
* it under the terms of the GNU General Public License as published by *
8
* the Free Software Foundation, either version 2 of the License, or *
9
* (at your option) any later version. *
10
* *
11
* libkovan is distributed in the hope that it will be useful, *
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14
* GNU General Public License for more details. *
15
* *
16
* You should have received a copy of the GNU General Public License *
17
* along with libkovan. Check the LICENSE file in the project root. *
18
* If not, see <http://www.gnu.org/licenses/>. *
19
**************************************************************************/
20
29
#ifndef _SERVOS_HPP_
30
#define _SERVOS_HPP_
31
32
#include "
port.hpp
"
33
#include "
export.h
"
34
40
class
EXPORT_SYM
Servo
41
{
42
public
:
43
typedef
unsigned
int
ticks_t
;
44
49
Servo
(
port_t
port);
50
58
void
setPosition(ticks_t position);
59
73
ticks_t position()
const
;
74
75
void
disable();
76
void
enable();
77
void
setEnabled(
const
bool
&enabled);
78
bool
isEnabled()
const
;
79
private
:
80
port_t
m_port;
81
};
82
83
#endif
export.h
port.hpp
Servo::ticks_t
unsigned int ticks_t
Definition:
servo.hpp:43
port_t
int port_t
Definition:
port.hpp:14
Servo
Encapsulates the concept of a servo motor.
Definition:
servo.hpp:40
EXPORT_SYM
#define EXPORT_SYM
Definition:
export.h:7
include
kovan
servo.hpp
Generated on Tue Aug 30 2016 08:52:43 for libkovan by
1.8.9.1