This commit is contained in:
不吃油炸鸡
2026-02-26 17:20:03 +08:00
parent 558bec4003
commit 495baa3905
1214 changed files with 825897 additions and 0 deletions

View 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
}

View File

@@ -0,0 +1,18 @@
#ifndef __BEEP_H__
#define __BEEP_H__
#ifdef __cplusplus
extern "C" {
#endif
#include "main.h"
void beep_open(void);
void beep_close(void);
#ifdef __cplusplus
}
#endif
#endif