beep.h 1011 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*
  2. * Copyright (c) 2006-2020, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-05-23 Administrator the first version
  9. */
  10. #ifndef APPLICATIONS_INC_BEEP_H_
  11. #define APPLICATIONS_INC_BEEP_H_
  12. #include <rtthread.h>
  13. #define BEEP_PWM_DEVICE "pwm3"
  14. #define RAIN_PWM_DEVICE "pwm8"
  15. #define BEEP_PWM_CH 1
  16. int pwm3_init(void);
  17. int beep_on(void); //蜂鸣器开
  18. int beep_off(void); //蜂鸣器关
  19. void beep_set(uint32_t freq, uint32_t volume); //蜂鸣器设定
  20. void Beep_Tip(uint16_t volnum);
  21. int beep_play(void);
  22. void Motor_UP_PWM_R(uint8_t on_off);
  23. void Motor_UP_PWM_L(uint8_t on_off);
  24. void Motor_Down_PWM_R(uint8_t on_off);
  25. void Motor_Down_PWM_L(uint8_t on_off);
  26. void Rain_Motor_PWM_R(uint8_t on_off);
  27. void Rain_Motor_PWM_L(uint8_t on_off);
  28. #endif /* APPLICATIONS_INC_BEEP_H_ */