Subversion Repositories HomeAutomation

Rev

Blame | Last modification | View Log | SVN | RSS feed

  1. #ifndef RC_SERVO_H_
  2. #define RC_SERVO_H_
  3.  
  4. /*-----------------------------------------------
  5.  * Includes
  6.  * ---------------------------------------------*/
  7. #include <stdlib.h>
  8. #include <inttypes.h>
  9.  
  10. /*-----------------------------------------------
  11.  * Defines
  12.  * --------------------------------------------*/
  13.  
  14. /*
  15.  * For width of the pulse that control the RC servo.
  16.  * Milliseconds.
  17.  */
  18. #define PWM_MAX_PULSE 100
  19. #define PWM_MIN_PULSE 200
  20.  
  21. /*-----------------------------------------------
  22.  * Functions
  23.  * ---------------------------------------------*/
  24. void rcServoInit();
  25. void setPosition(int8_t abs_pos);
  26. void alterPosition(int8_t rel_pos);
  27. int8_t getPosition();
  28.  
  29. #endif
  30.