beep.h 1.3 KB

1234567891011121314151617181920212223242526272829303132
  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. void pwm_stop(void);
  24. /*****************************4.0******************************/
  25. void Motor_Qingsao_L_PWM(uint8_t on_off);
  26. void Motor_Qingsao_R_PWM(uint8_t on_off);
  27. /**************************吸虫塔****************************/
  28. void Motor_Juandai(uint8_t on_off);
  29. void Motor_shake(uint8_t status_shake,uint16_t shake_sec);
  30. /***********************************************************/
  31. #endif /* APPLICATIONS_INC_BEEP_H_ */