<< Previous | Next >>

servo_enable_0

void servo_enable_0( void );

Description

Enable drive to the first servo motor. This function only works if an auxiliary control signal is connected to the motor driver. The I/O pin used for this function is specified by the macros:

   

#define SERVO_ENABLE_PORT_0 PGDR
#define SERVO_ENABLE_PORTSHADOW_0 PGDRShadow
#define SERVO_ENABLE_PIN_0 6

and, optionally,

   

#define SERVO_ENABLE_DDR_0 PGDDR
#define SERVO_ENABLE_DDRSHADOW_0 PGDDRShadow
#define SERVO_ENABLE_ACTIVEHIGH_0

This function is limited to toggling the output pin high or low. If enabling or disabling the servo motor requires more complicated actions, you can substitute your own function by defining

   

#define SERVO_ENABLE_0  xxxx

where xxxx is the name of your own function (which is assumed to take no parameters and have no return value).

Library

SERVO.LIB

See Also

servo_disable_0


Dynamic C Functions << Previous | Next >> rabbit.com