SRVCTL - Sets period required to handle a servo motor, - Provides a APIs to move the servo motor in order to change car direction.
Dependents: frdm_MasterVehicle
Diff: srvctl.h
- Revision:
- 0:b0455b6a805a
- Child:
- 1:b76be70801ed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/srvctl.h Tue Oct 14 03:52:35 2014 +0000 @@ -0,0 +1,35 @@ +#ifndef _SRVCTL_H_ +#define _SRVCTL_H_ + +#include "mbed.h" + +/********************************************************************************** +* Servo parameters +***********************************************************************************/ +#define START_POS 1700/* us +* Description: Minimum position of servo motor +*/ + +#define FINAL_POS 2200/* us +* Description: Maximum position of servo motor +*/ + +#define MIDDLE_POINT ( FINAL_POS - START_POS )/2/* +* Description: Middle point of servo motor +*/ + +#define SERVO_PERIOD 20/* ms +* Description: Period required to move servo motor +*/ + +/********************************************************************************** +* Variable types definition +***********************************************************************************/ + +/********************************************************************************** +* Global functions +***********************************************************************************/ +void SRVCTL_vInit(void); +void SRVCTL_vSetPosition( uint16_t u16PosVal, const uint16_t u16MaxVal ); + +#endif