Files
stm32f407ve_black/Modules/delay/README.md
2026-01-22 16:36:56 +08:00

56 lines
738 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Delay模块
## 功能描述
Delay模块提供了毫秒级和微秒级的延时功能用于在应用程序中实现精确的时间延迟。
## 依赖关系
- HAL层hal_delay
## 接口说明
### 函数接口
#### delay_init
```c
void delay_init(void);
```
初始化延迟模块
**参数**:无
**返回值**:无
#### delay_ms
```c
void delay_ms(uint32_t ms);
```
毫秒级延迟
**参数**
- ms: 延迟时间(毫秒)
**返回值**:无
#### delay_us
```c
void delay_us(uint32_t us);
```
微秒级延迟
**参数**
- us: 延迟时间(微秒)
**返回值**:无
## 使用示例
```c
/* 初始化延迟模块 */
delay_init();
/* 延迟1秒 */
delay_ms(1000);
/* 延迟500微秒 */
delay_us(500);
```