docs: restructure framework, extract app execution module, group event collection & align GPIOs

This commit is contained in:
2026-07-10 10:47:00 +08:00
parent a04ea5fb51
commit b640fa25ae
24 changed files with 428 additions and 213 deletions

View File

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