beep.h 1.2 KB

12345678910111213141516171819202122232425262728293031
  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 beep_init(void); //蜂鸣器初始化
  17. int beep_on(void); //蜂鸣器开
  18. int beep_off(void); //蜂鸣器关
  19. int pwm_off(uint8_t pwn_ch,rt_uint32_t pwm_freq);
  20. int pwm_on(uint8_t pwn_ch,rt_uint32_t pwm_freq);
  21. void beep_set(uint32_t freq, uint32_t volume); //蜂鸣器设定
  22. void Beep_Tip(uint16_t volnum);
  23. /*****************************4.0******************************/
  24. void Motor_Qingsao_L_PWM(uint8_t on_off);
  25. void Motor_Qingsao_R_PWM(uint8_t on_off);
  26. /**************************吸虫塔****************************/
  27. void Motor_Juandai(uint8_t on_off);
  28. void Motor_shake(uint8_t status_shake,uint16_t shake_sec);
  29. /***********************************************************/
  30. #endif /* APPLICATIONS_INC_BEEP_H_ */