2024-01-08 22:08:43 +08:00
|
|
|
#ifndef _BY_BUZZER_H__
|
|
|
|
|
#define _BY_BUZZER_H__
|
|
|
|
|
|
2024-01-31 17:20:09 +08:00
|
|
|
#include "zf_common_headfile.h"
|
2024-01-08 22:08:43 +08:00
|
|
|
|
|
|
|
|
#define BY_PRESS_SHORT 2000
|
|
|
|
|
#define BY_PRESS_LONG 2500
|
|
|
|
|
#define BY_FORWARD 1500
|
|
|
|
|
#define BY_BACKWARD 1800
|
2024-01-31 17:20:09 +08:00
|
|
|
#define BUZZER_PIN TIM4_PWM_MAP1_CH3_D14
|
2024-01-08 22:08:43 +08:00
|
|
|
|
|
|
|
|
extern uint32_t a[40];
|
|
|
|
|
extern uint16_t queue_long;
|
|
|
|
|
extern const uint32_t max_long;
|
|
|
|
|
extern uint8_t queue_flag;
|
2024-01-31 17:20:09 +08:00
|
|
|
|
|
|
|
|
extern void queue_init(void);
|
|
|
|
|
extern void queue_add_element(int element);
|
|
|
|
|
extern void queue_pop_element(void);
|
|
|
|
|
extern void queue_pop_read(void);
|
|
|
|
|
extern void by_buzzer_init(void);
|
|
|
|
|
extern void by_buzzer_add(uint16_t tone);
|
2024-02-10 16:19:51 +08:00
|
|
|
extern void by_buzzer_run(void);
|
2024-01-08 22:08:43 +08:00
|
|
|
#endif
|