docs: 重构系统层级为自下而上,剥离独立事件管理模块,全量校正GPIO引脚映射为原理图线标

This commit is contained in:
2026-07-10 10:04:40 +08:00
parent fdda10aadc
commit a04ea5fb51
28 changed files with 291 additions and 120 deletions

View File

@@ -9,14 +9,14 @@
## 2. 关键代码片段与逻辑实现
### 2.1 引脚控制宏与初始化
马达由引脚 `P2.5` 控制。配置模式为推挽输出:
马达由引脚 `P2.4` 控制。配置模式为推挽输出:
```c
sbit MOTOR = P2^5;
sbit MOTOR = P2^4; // Pin 25
void Motor_Init(void) {
// 将 P2.5 配置为推挽输出模式,默认输出低电平 0
P2M1 &= ~(1 << 5);
P2M0 |= (1 << 5);
// 将 P2.4 配置为推挽输出模式,默认输出低电平 0
P2M1 &= ~(1 << 4);
P2M0 |= (1 << 4);
MOTOR = 0;
}
```