libkovan  1
The kovan standard library
motors.h
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 _MOTORS_H_
30 #define _MOTORS_H_
31 
32 #include "export.h"
33 
34 #include "vtable.h"
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
45 
50 VF EXPORT_SYM int gmpc(int motor);
51 
57 
62 VF EXPORT_SYM void cmpc(int motor);
63 
68 VF EXPORT_SYM int move_at_velocity(int motor, int velocity);
69 
75 VF EXPORT_SYM int mav(int motor, int velocity);
76 
77 VF EXPORT_SYM int move_to_position(int motor, int speed, int goal_pos);
78 
84 VF EXPORT_SYM int mtp(int motor, int speed, int goal_pos);
85 
86 VF EXPORT_SYM int move_relative_position(int motor, int speed, int delta_pos);
87 
93 VF EXPORT_SYM int mrp(int motor, int speed, int delta_pos);
94 
99 VF EXPORT_SYM void set_pid_gains(int motor, short p, short i, short d, short pd, short id, short dd);
100 
105 VF EXPORT_SYM void get_pid_gains(int motor, short *p, short *i, short *d, short *pd, short *id, short *dd);
106 
111 VF EXPORT_SYM int freeze(int motor);
112 
118 
124 
130 VF EXPORT_SYM void bmd(int motor);
131 
136 VF EXPORT_SYM int setpwm(int motor, int pwm);
137 
142 VF EXPORT_SYM int getpwm(int motor);
143 
149 VF EXPORT_SYM void fd(int motor);
150 
156 VF EXPORT_SYM void bk(int motor);
157 
166 VF EXPORT_SYM void motor(int motor, int percent);
167 
173 VF EXPORT_SYM void off(int motor);
174 
180 VF EXPORT_SYM void alloff();
181 
186 VF EXPORT_SYM void ao();
187 
188 VFL
189 
190 
191 #ifdef __cplusplus
192 }
193 #endif
194 
195 
196 #endif
VF EXPORT_SYM void bk(int motor)
VF EXPORT_SYM void fd(int motor)
VF EXPORT_SYM void ao()
VF EXPORT_SYM int get_motor_done(int motor)
VF EXPORT_SYM int mrp(int motor, int speed, int delta_pos)
VF EXPORT_SYM int getpwm(int motor)
VF EXPORT_SYM void set_pid_gains(int motor, short p, short i, short d, short pd, short id, short dd)
VF EXPORT_SYM int mav(int motor, int velocity)
VF EXPORT_SYM int setpwm(int motor, int pwm)
VF EXPORT_SYM void bmd(int motor)
VF EXPORT_SYM int freeze(int motor)
VF EXPORT_SYM int gmpc(int motor)
VF EXPORT_SYM void get_pid_gains(int motor, short *p, short *i, short *d, short *pd, short *id, short *dd)
VF EXPORT_SYM int move_relative_position(int motor, int speed, int delta_pos)
VF EXPORT_SYM int mtp(int motor, int speed, int goal_pos)
#define VF
Definition: vtable.h:10
#define VFL
Definition: vtable.h:11
#define EXPORT_SYM
Definition: export.h:7
VF EXPORT_SYM void alloff()
VF EXPORT_SYM void motor(int motor, int percent)
VF EXPORT_SYM int move_at_velocity(int motor, int velocity)
VF EXPORT_SYM void clear_motor_position_counter(int motor)
VF EXPORT_SYM void block_motor_done(int motor)
VF EXPORT_SYM int get_motor_position_counter(int motor)
VF EXPORT_SYM void off(int motor)
VF EXPORT_SYM int move_to_position(int motor, int speed, int goal_pos)
VF EXPORT_SYM void cmpc(int motor)