初始化毕业设计项目
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#ifndef __BUZZER_LED_H
|
||||
#define __BUZZER_LED_H
|
||||
|
||||
#include "stm32f10x.h"
|
||||
|
||||
// 定义GPIO控制宏 (根据连接图.md修改)
|
||||
#define LED_SUCCESS_OFF() GPIO_ResetBits(GPIOB, GPIO_Pin_4) // PB4, 高电平点亮
|
||||
#define LED_SUCCESS_ON() GPIO_SetBits(GPIOB, GPIO_Pin_4)
|
||||
#define BUZZER_OFF() GPIO_SetBits(GPIOB, GPIO_Pin_5) // PB5, 低电平触发
|
||||
#define BUZZER_ON() GPIO_ResetBits(GPIOB, GPIO_Pin_5)
|
||||
|
||||
// PC13板载状态指示LED (低电平点亮)
|
||||
#define LED_STATUS_ON() GPIO_ResetBits(GPIOC, GPIO_Pin_13) // 初始化中:常亮
|
||||
#define LED_STATUS_OFF() GPIO_SetBits(GPIOC, GPIO_Pin_13) // 就绪后:熄灭
|
||||
|
||||
// 声明初始化函数
|
||||
void Buzzer_LED_Init(void);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user