buzzer(Beep)
Global variable
| Global variable | type | Annotation |
|---|---|---|
| beep_time | u32 | Record the opening duration (unit: MS) |
Macro definition
| Macro definition | value | Annotation |
|---|---|---|
| BEEP_RCC | RCC_APB2Periph_GPIOA | GPIO clock of the bee tweeper |
| BEEP_PORT | GPIOA | GPIO port controlled by bee singer |
| BEEP_PIN | GPIO_Pin_11 | GPIO pin controlled by bee singer |
| BEEP_ON | GPIO_SetBits(BEEP_PORT,BEEP_PIN) | Open the bee tweet |
| BEEP_OFF | GPIO_ResetBits(BEEP_PORT,BEEP_PIN) | Turn off the bee tweeper |
| BEEP_BEEP | PAout(11) | Control the output of the beeurist |
method
init_beep(void)
Initialized beeurine pins
| Return value | type |
|---|---|
| none | void |
open_beep(u32 beep_time)
Open the designated time
| parameter | type | Annotation |
|---|---|---|
| beep_time | u32 | Open the length of the bee tweet (unit: MS) |
| Return value | type |
|---|---|
| none | void |