#include "c.h"

#define buzzer_io(x) HAL_GPIO_WritePin(BUZZER_GPIO_Port,BUZZER_Pin,x)
#define buzzer_t	   HAL_GPIO_TogglePin(BUZZER_GPIO_Port,BUZZER_Pin)

#define L1  262
#define L1_ 277
#define L2  294
#define L2_ 311
#define L3  330
#define L4  349
#define L4_ 370
#define L5  392
#define L5_ 415
#define L6  440
#define L6_ 466
#define L7  494

#define D1  523
#define D1_ 554
#define D2  587
#define D2_ 622
#define D3  659
#define D4  698
#define D4_ 740
#define D5  784
#define D5_ 831
#define D6  880
#define D6_ 932
#define D7  988

#define H1  1046
#define H1_ 1109
#define H2  1175
#define H2_ 1245
#define H3  1318
#define H4  1397
#define H4_ 1480
#define H5  1568
#define H5_ 1661
#define H6  1760
#define H6_ 1865
#define H7  1976

void add_a_note(uint16_t freq,uint8_t duty,uint16_t deley);
void input_misue(const int *d,uint16_t len,uint8_t duty);
char buzzer_play_server();