feat: 添加声音序列

This commit is contained in:
bmy
2024-01-08 22:08:43 +08:00
parent 6bb5b9eaad
commit bf76c25f41
5 changed files with 77 additions and 2 deletions

24
app/by_buzzer.h Normal file
View File

@@ -0,0 +1,24 @@
#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
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