buzzer(Beep)

Global variable

Global variabletypeAnnotation
beep_timeu32Record the opening duration (unit: MS)

Macro definition

Macro definitionvalueAnnotation
BEEP_RCCRCC_APB2Periph_GPIOAGPIO clock of the bee tweeper
BEEP_PORTGPIOAGPIO port controlled by bee singer
BEEP_PINGPIO_Pin_11GPIO pin controlled by bee singer
BEEP_ONGPIO_SetBits(BEEP_PORT,BEEP_PIN)Open the bee tweet
BEEP_OFFGPIO_ResetBits(BEEP_PORT,BEEP_PIN)Turn off the bee tweeper
BEEP_BEEPPAout(11)Control the output of the beeurist

method

init_beep(void)

Initialized beeurine pins

Return valuetype
nonevoid

open_beep(u32 beep_time)

Open the designated time

parametertypeAnnotation
beep_timeu32Open the length of the bee tweet (unit: MS)
Return valuetype
nonevoid