Wixel SDK
servo.h
Go to the documentation of this file.
1 
75 #ifndef _SERVO_H
76 #define _SERVO_H
77 
78 #include <cc2511_map.h>
79 #include <cc2511_types.h>
80 
82 #define SERVO_MAX_TARGET_MICROSECONDS 2500
83 
86 #define SERVO_TICKS_PER_MICROSECOND 24
87 
88 
134 void servosStart(uint8 XDATA * pins, uint8 numPins);
135 
145 void servosStop(void);
146 
155 BIT servosStarted(void);
156 
170 BIT servosMoving(void);
171 
231 void servoSetTarget(uint8 servoNum, uint16 targetMicroseconds);
232 
239 uint16 servoGetTarget(uint8 servoNum);
240 
269 void servoSetSpeed(uint8 servoNum, uint16 speed);
270 
275 uint16 servoGetSpeed(uint8 servoNum);
276 
293 uint16 servoGetPosition(uint8 servoNum);
294 
298 void servoSetTargetHighRes(uint8 servoNum, uint16 target);
299 
304 
309 
311 ISR(T1, 0);
312 
313 #endif
void servosStart(uint8 XDATA *pins, uint8 numPins)
Definition: servo.c:170
void servoSetSpeed(uint8 servoNum, uint16 speed)
Definition: servo.c:346
void servoSetTarget(uint8 servoNum, uint16 targetMicroseconds)
Definition: servo.c:292
void servosStop(void)
Definition: servo.c:256
#define XDATA
Definition: cc2511_types.h:65
uint16 servoGetSpeed(uint8 servoNum)
Definition: servo.c:353
void servoSetTargetHighRes(uint8 servoNum, uint16 target)
Definition: servo.c:298
uint16 servoGetTargetHighRes(uint8 servoNum)
Definition: servo.c:332
uint16 servoGetPosition(uint8 servoNum)
Definition: servo.c:327
__bit BIT
Definition: cc2511_types.h:32
ISR(T1, 0)
Definition: servo.c:59
BIT servosMoving(void)
Definition: servo.c:287
unsigned short uint16
Definition: cc2511_types.h:15
unsigned char uint8
Definition: cc2511_types.h:9
uint16 servoGetTarget(uint8 servoNum)
Definition: servo.c:322
uint16 servoGetPositionHighRes(uint8 servoNum)
Definition: servo.c:337
BIT servosStarted(void)
Definition: servo.c:282