22 lines
603 B
C
22 lines
603 B
C
// Delay.h (修改后)
|
|
#ifndef __DELAY_H
|
|
#define __DELAY_H
|
|
|
|
#include "stm32f10x.h" // 确保包含了这个
|
|
|
|
// 添加下面两个函数的声明
|
|
// 函数作用:初始化 SysTick 延时模块和毫秒计时基准。
|
|
void Delay_Init(void);
|
|
// 函数作用:返回系统启动以来经过的毫秒数。
|
|
uint32_t Get_Time_ms(void);
|
|
|
|
// 保留你原有的函数声明
|
|
// 函数作用:阻塞延时指定微秒数。
|
|
void Delay_us(uint32_t us);
|
|
// 函数作用:阻塞延时指定毫秒数。
|
|
void Delay_ms(uint32_t ms);
|
|
// 函数作用:阻塞延时指定秒数。
|
|
void Delay_s(uint32_t s);
|
|
|
|
#endif
|