Subversion Repositories shark

Rev

Rev 281 | Rev 290 | 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
 
286 giacomo 19
#define DEG180 0xFFFFFF
281 giacomo 20
#define SERVO_ANGLE(deg,min,sec) (((deg)*3600 + (min)*60 + (sec)) * DEG180 / 648000)
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
 
27
int servo_set_angle(int servo, int angle);
28
int servo_get_angle(int servo);
29
 
30
/* Analog control */
31
 
32
int servo_get_analog(int port);
33
 
34
#endif
35