feat(i18n): finish zh-CN example comments and align Strapping term with the glossary
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1d79051250
commit
2b73b57ee6
12 files changed
+84
-84
No files matched your search
@@ -1,5 +1,5 @@
|
||||
//! Exemplo Rust no ESP32 usando `esp-hal` (Modo Bare-Metal / no_std)
|
||||
//! Pisca um LED e envia mensagens via UART Serial com segurança de memória garantida.
|
||||
//! 使用 `esp-hal` 在 ESP32 上运行 Rust 的示例(裸机 / no_std 模式)
|
||||
//! 闪烁 LED 并通过 UART 串口发送消息,同时提供内存安全保障。
|
||||
//!
|
||||
//! Cargo.toml:
|
||||
//! esp-hal = { version = "0.22", features = ["esp32s3"] }
|
||||
@@ -22,12 +22,12 @@ use esp_println::println;
|
||||
|
||||
#[entry]
|
||||
fn main() -> ! {
|
||||
// Inicializa periféricos do SoC com verificação em tempo de compilação
|
||||
// 在编译期检查的前提下初始化 SoC 外设
|
||||
let peripherals = Peripherals::take();
|
||||
let system = SystemControl::new(peripherals.SYSTEM);
|
||||
let clocks = ClockControl::boot_defaults(system.clock_control).freeze();
|
||||
|
||||
// Configura os pinos de E/S
|
||||
// 配置 I/O 引脚
|
||||
let io = Io::new(peripherals.GPIO, peripherals.IO_MUX);
|
||||
let mut led = Output::new(io.pins.gpio2, Level::Low);
|
||||
|
||||
@@ -38,7 +38,7 @@ fn main() -> ! {
|
||||
let mut counter: u32 = 0;
|
||||
|
||||
loop {
|
||||
// Inverte estado do LED com garantia de exclusão mútua
|
||||
// 在保证互斥的前提下翻转 LED 状态
|
||||
led.toggle();
|
||||
counter += 1;
|
||||
|
||||
|
||||
Reference in new issue
Block a user