Subversion Repositories shark

Rev

Rev 286 | Rev 291 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
281 giacomo 1
#ifndef __SERVO_H__
2
#define __SERVO_H__
3
 
4
/* Setup */
5
 
6
int servo_set_RS232_baudrate(int baud); /* BaudRate */
7
int servo_get_RS232_baudrate(void);
8
int servo_store_RS232_baudrate(void);
9
 
10
int servo_set_period(int period); /* Servo period in us */
11
int servo_get_period(void);
12
int servo_store_period(void);
13
 
14
int servo_get_setup_switch(void); /* RC0 RC1 RC2 */
15
int servo_set_RC5_switch(int data);
16
 
17
/* Servo control */
18
 
290 giacomo 19
/* Convert angle (degree, minute, second -> second) */
20
#define ANGLE2SEC(deg,min,sec) ((deg)*3600 + (min)*60 + (sec))
281 giacomo 21
 
22
int servo_turn_off(int servo);
23
int servo_turn_on(int servo);
24
int servo_turn_off_all(void);
25
int servo_turn_on_all(void);
26
 
290 giacomo 27
int servo_set_max_angle_sec(int servo, int angle_sec);
28
int servo_set_min_angle_sec(int servo, int angle_sec);
281 giacomo 29
 
290 giacomo 30
int servo_set_angle_sec(int servo, int angle_sec);
31
int servo_get_angle_sec(int servo);
32
 
33
int servo_store_default_position(int servo);
34
 
281 giacomo 35
/* Analog control */
36
 
37
int servo_get_analog(int port);
38
 
39
#endif
40