Skip to content

Commit beb19b8

Browse files
committed
minor update, wording, re-org
1 parent 5b4d27c commit beb19b8

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

_posts/2024-08-23-embedded-rust-peripheral-register-access-svdtools-chiptool-and-metapac-approach.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -551,16 +551,17 @@ pac::IOC
551551
## 附录: svd2pac
552552

553553
Infineon 是对 Rust 嵌入式方案支持比较友好的公司之一(非爱好者友好).
554-
他们提供了一个基于 svd2rust 的工具 [svd2pac], 用于生成 Infineon MCU 的 PAC 库.
554+
他们也提供了一个基于 svd2rust 的工具 [svd2pac], 用于生成 Infineon MCU 的 PAC 库.
555555
详细设计综合了 svd2rust 和 chiptool 的优点, 适合于单个芯片的 PAC 生成.
556-
使用方法极其类似 chiptool 的闭包方式.
556+
使用方法极其类似 chiptool 的闭包方式. 不过由于项目在 Infineon 之外使用较少, 对完整的 SVD 特性支持还不完善.
557557

558558
具体改进:
559559

560-
- 寄存器访问应该是不安全的,因为它们类似于C FFI
560+
- 整体使用方式类似 [chiptool]
561+
- 寄存器访问应该是不安全的,因为它们相当于 C FFI
561562
- 不使用 owned Peripherals 结构体,因为带有 ownership 的寄存器会妨碍编写低级驱动程序(Low Level Drivers, LLD)
562563
- 不使用宏,以便于调试(相比 [ral] 而言)
563-
- 较少的依赖
564+
- 较少的外部依赖
564565

565566
## 总结及对比
566567

0 commit comments

Comments
 (0)