mirror of
https://github.com/No-Chicken/Power-Pico.git
synced 2026-04-03 13:02:36 +08:00
update
This commit is contained in:
10
software/Power_Pico/BSP/BEEP/beep.c
Normal file
10
software/Power_Pico/BSP/BEEP/beep.c
Normal file
@@ -0,0 +1,10 @@
|
||||
#include "beep.h"
|
||||
#include "tim.h"
|
||||
|
||||
void beep_open(void) {
|
||||
HAL_TIM_PWM_Start(&htim4, TIM_CHANNEL_4); // 启动PWM通道4用于蜂鸣器
|
||||
}
|
||||
|
||||
void beep_close(void) {
|
||||
HAL_TIM_PWM_Stop(&htim4, TIM_CHANNEL_4); // 停止PWM通道4
|
||||
}
|
||||
Reference in New Issue
Block a user