luat_pwm.h 407 B

1234567891011121314151617181920
  1. #ifndef Luat_PWM_H
  2. #define Luat_PWM_H
  3. #include "luat_base.h"
  4. typedef struct luat_pwm_conf {
  5. int channel;
  6. size_t period;
  7. size_t pulse;
  8. size_t pnum;
  9. size_t precision;
  10. } luat_pwm_conf_t;
  11. int luat_pwm_open(int channel, size_t period, size_t pulse, int pnum);
  12. int luat_pwm_setup(luat_pwm_conf_t* conf);
  13. int luat_pwm_capture(int channel,int freq);
  14. int luat_pwm_close(int channel);
  15. #endif