2024-01-08 22:08:43 +08:00
|
|
|
#ifndef _BY_BUZZER_H__
|
|
|
|
|
#define _BY_BUZZER_H__
|
|
|
|
|
|
|
|
|
|
#include "by_rt_button.h"
|
|
|
|
|
|
|
|
|
|
#include "stdio.h"
|
|
|
|
|
#include "ch32v30x.h"
|
|
|
|
|
|
|
|
|
|
#define BY_PRESS_SHORT 2000
|
|
|
|
|
#define BY_PRESS_LONG 2500
|
|
|
|
|
#define BY_FORWARD 1500
|
|
|
|
|
#define BY_BACKWARD 1800
|
2024-01-16 20:03:21 +08:00
|
|
|
#define BUZZER_PIN TIM3_PWM_MAP0_CH2_A7
|
2024-01-08 22:08:43 +08:00
|
|
|
extern void by_buzzer_init(void);
|
|
|
|
|
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 uint32_t a[40];
|
|
|
|
|
extern uint16_t queue_long;
|
|
|
|
|
extern const uint32_t max_long;
|
|
|
|
|
extern uint8_t queue_flag;
|
|
|
|
|
#endif
|