3.1 原始 MMIO
01-原始 MMIO — Comprehensive Rust
1分钟内可阅读完
译文 · 基于 Comprehensive Rust
原文链接: https://google.github.io/comprehensive-rust/bare-metal/microcontrollers.html
cortex_m_rt crate(除其他功能外)为 Cortex M 微控制器提供复位处理程序(reset handler)。
| |
接下来我们会看如何访问外设,抽象层级逐步提高。
cortex_m_rt::entry宏要求函数类型为fn() -> !,因为返回到复位处理程序没有意义。- 用
cargo embed --bin minimal运行示例。
01-原始 MMIO — Comprehensive Rust
02-PAC — Comprehensive Rust
03-HAL Crate — Comprehensive Rust
04-板级支持 Crate — Comprehensive Rust
05-类型状态模式 — Comprehensive Rust
06-embedded-hal — Comprehensive Rust
probe-rs 与 cargo-embed — Comprehensive Rust
07-其他项目 — Comprehensive Rust