/* Control routines for a 3-phase motor from a hard disc drive. */ #pragma once #include /* Initialize the timers for PWM operation. */ void motor_init(); void motor_set_phases(int p1, int p2, int p3); /* Rotate to given angle. * Angle is in degrees. */ void motor_goto(int angle); /* Rotate with acceleration and deceleration */ void motor_smoothgoto(int angle, int deg_per_sec2); /* Get the current motor angle */ int motor_getangle(); /* Set the motor power limit (0-100). */ void motor_setpower(int limit); /* Turn of all the motor drivers to reduce power usage. */ void motor_poweroff();