Repository: embassy-rs/embassy
Branch: main
Commit: 165870484d2c
Files: 2345
Total size: 12.5 MB
Directory structure:
gitextract_vlawd1i1/
├── .gitattributes
├── .github/
│ ├── ci/
│ │ ├── book.sh
│ │ ├── build-nightly.sh
│ │ ├── build-xtensa.sh
│ │ ├── build.sh
│ │ ├── doc.sh
│ │ ├── janitor.sh
│ │ ├── rustfmt.sh
│ │ ├── test-nightly.sh
│ │ └── test.sh
│ └── workflows/
│ ├── matrix-bot-issues.yml
│ └── matrix-bot.yml
├── .gitignore
├── .helix/
│ └── languages.toml
├── .vscode/
│ ├── .gitignore
│ ├── extensions.json
│ └── settings.json
├── LICENSE-APACHE
├── LICENSE-CC-BY-SA
├── LICENSE-MIT
├── NOTICE.md
├── README.md
├── RELEASE.md
├── ci-nightly.sh
├── ci-xtensa.sh
├── ci.sh
├── cyw43/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── bluetooth.rs
│ ├── consts.rs
│ ├── control.rs
│ ├── countries.rs
│ ├── events.rs
│ ├── fmt.rs
│ ├── ioctl.rs
│ ├── lib.rs
│ ├── runner.rs
│ ├── sdio.rs
│ ├── spi.rs
│ ├── structs.rs
│ └── util.rs
├── cyw43-firmware/
│ ├── .gitignore
│ ├── LICENSE-permissive-binary-license-1.0.txt
│ ├── README.md
│ └── write_nvrams.rs
├── cyw43-pio/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── docs/
│ ├── Makefile
│ ├── README.md
│ ├── examples/
│ │ ├── basic/
│ │ │ ├── .cargo/
│ │ │ │ └── config.toml
│ │ │ ├── Cargo.toml
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── main.rs
│ │ └── layer-by-layer/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── blinky-async/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── blinky-hal/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── blinky-irq/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── blinky-pac/
│ │ │ ├── Cargo.toml
│ │ │ └── src/
│ │ │ └── main.rs
│ │ └── memory.x
│ ├── images/
│ │ ├── embassy_executor.drawio
│ │ └── embassy_irq.drawio
│ ├── index.adoc
│ └── pages/
│ ├── basic_application.adoc
│ ├── beginners.adoc
│ ├── best_practices.adoc
│ ├── bootloader.adoc
│ ├── developer.adoc
│ ├── developer_stm32.adoc
│ ├── embassy_in_the_wild.adoc
│ ├── examples.adoc
│ ├── faq.adoc
│ ├── getting_started.adoc
│ ├── hal.adoc
│ ├── imxrt.adoc
│ ├── layer_by_layer.adoc
│ ├── mcxa.adoc
│ ├── microchip.adoc
│ ├── new_project.adoc
│ ├── nrf.adoc
│ ├── overview.adoc
│ ├── project_structure.adoc
│ ├── runtime.adoc
│ ├── sharing_peripherals.adoc
│ ├── stm32.adoc
│ ├── system.adoc
│ └── time_keeping.adoc
├── embassy-boot/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── boot_loader.rs
│ ├── digest_adapters/
│ │ ├── ed25519_dalek.rs
│ │ ├── mod.rs
│ │ └── salty.rs
│ ├── firmware_updater/
│ │ ├── asynch.rs
│ │ ├── blocking.rs
│ │ └── mod.rs
│ ├── fmt.rs
│ ├── lib.rs
│ ├── mem_flash.rs
│ └── test_flash/
│ ├── asynch.rs
│ ├── blocking.rs
│ └── mod.rs
├── embassy-boot-nrf/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── fmt.rs
│ └── lib.rs
├── embassy-boot-rp/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ └── src/
│ ├── fmt.rs
│ └── lib.rs
├── embassy-boot-stm32/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ └── src/
│ ├── fmt.rs
│ └── lib.rs
├── embassy-embedded-hal/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── adapter/
│ │ ├── blocking_async.rs
│ │ ├── mod.rs
│ │ └── yielding_async.rs
│ ├── flash/
│ │ ├── concat_flash.rs
│ │ ├── mem_flash.rs
│ │ ├── mod.rs
│ │ └── partition/
│ │ ├── asynch.rs
│ │ ├── blocking.rs
│ │ └── mod.rs
│ ├── lib.rs
│ └── shared_bus/
│ ├── asynch/
│ │ ├── i2c.rs
│ │ ├── mod.rs
│ │ └── spi.rs
│ ├── blocking/
│ │ ├── i2c.rs
│ │ ├── mod.rs
│ │ └── spi.rs
│ └── mod.rs
├── embassy-executor/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── build_common.rs
│ ├── gen_config.py
│ ├── src/
│ │ ├── fmt.rs
│ │ ├── lib.rs
│ │ ├── metadata.rs
│ │ ├── platform/
│ │ │ ├── avr.rs
│ │ │ ├── cortex_ar.rs
│ │ │ ├── cortex_m.rs
│ │ │ ├── riscv32.rs
│ │ │ ├── spin.rs
│ │ │ ├── std.rs
│ │ │ └── wasm.rs
│ │ ├── raw/
│ │ │ ├── deadline.rs
│ │ │ ├── mod.rs
│ │ │ ├── run_queue.rs
│ │ │ ├── state_atomics.rs
│ │ │ ├── state_atomics_arm.rs
│ │ │ ├── state_critical_section.rs
│ │ │ ├── trace.rs
│ │ │ ├── util.rs
│ │ │ ├── waker.rs
│ │ │ └── waker_turbo.rs
│ │ └── spawner.rs
│ └── tests/
│ ├── test.rs
│ ├── ui/
│ │ ├── abi.rs
│ │ ├── abi.stderr
│ │ ├── bad_return.rs
│ │ ├── bad_return.stderr
│ │ ├── bad_return_impl_future.rs
│ │ ├── bad_return_impl_future.stderr
│ │ ├── bad_return_impl_future_nightly.rs
│ │ ├── bad_return_impl_future_nightly.stderr
│ │ ├── generics.rs
│ │ ├── generics.stderr
│ │ ├── impl_trait.rs
│ │ ├── impl_trait.stderr
│ │ ├── impl_trait_nested.rs
│ │ ├── impl_trait_nested.stderr
│ │ ├── impl_trait_static.rs
│ │ ├── impl_trait_static.stderr
│ │ ├── nonstatic_ref_anon.rs
│ │ ├── nonstatic_ref_anon.stderr
│ │ ├── nonstatic_ref_anon_nested.rs
│ │ ├── nonstatic_ref_anon_nested.stderr
│ │ ├── nonstatic_ref_elided.rs
│ │ ├── nonstatic_ref_elided.stderr
│ │ ├── nonstatic_ref_generic.rs
│ │ ├── nonstatic_ref_generic.stderr
│ │ ├── nonstatic_struct_anon.rs
│ │ ├── nonstatic_struct_anon.stderr
│ │ ├── nonstatic_struct_elided.rs
│ │ ├── nonstatic_struct_elided.stderr
│ │ ├── nonstatic_struct_generic.rs
│ │ ├── nonstatic_struct_generic.stderr
│ │ ├── not_async.rs
│ │ ├── not_async.stderr
│ │ ├── return_impl_future_nonsend.rs
│ │ ├── return_impl_future_nonsend.stderr
│ │ ├── return_impl_send.rs
│ │ ├── return_impl_send.stderr
│ │ ├── return_impl_send_nightly.rs
│ │ ├── return_impl_send_nightly.stderr
│ │ ├── self.rs
│ │ ├── self.stderr
│ │ ├── self_ref.rs
│ │ ├── self_ref.stderr
│ │ ├── spawn_nonsend.rs
│ │ ├── spawn_nonsend.stderr
│ │ ├── task_safety_attribute.rs
│ │ ├── type_error.rs
│ │ ├── type_error.stderr
│ │ ├── unsafe_op_in_unsafe_task.rs
│ │ ├── unsafe_op_in_unsafe_task.stderr
│ │ ├── where_clause.rs
│ │ └── where_clause.stderr
│ └── ui.rs
├── embassy-executor-macros/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── lib.rs
│ ├── macros/
│ │ ├── main.rs
│ │ ├── mod.rs
│ │ └── task.rs
│ └── util.rs
├── embassy-executor-timer-queue/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── embassy-futures/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── block_on.rs
│ ├── fmt.rs
│ ├── join.rs
│ ├── lib.rs
│ ├── select.rs
│ └── yield_now.rs
├── embassy-hal-internal/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── build_common.rs
│ └── src/
│ ├── atomic_ring_buffer.rs
│ ├── drop.rs
│ ├── fmt.rs
│ ├── interrupt.rs
│ ├── lib.rs
│ ├── macros.rs
│ ├── peripheral.rs
│ └── ratio.rs
├── embassy-imxrt/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── chips/
│ │ ├── mimxrt633s.rs
│ │ └── mimxrt685s.rs
│ ├── clocks.rs
│ ├── crc.rs
│ ├── dma.rs
│ ├── flexcomm/
│ │ ├── mod.rs
│ │ ├── spi.rs
│ │ └── uart.rs
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── iopctl.rs
│ ├── lib.rs
│ ├── rng.rs
│ └── time_driver.rs
├── embassy-mcxa/
│ ├── .gitignore
│ ├── Cargo.toml
│ ├── DEVGUIDE.md
│ ├── README.md
│ └── src/
│ ├── adc.rs
│ ├── cdog.rs
│ ├── chips/
│ │ ├── mcxa2xx.rs
│ │ ├── mcxa5xx.rs
│ │ └── mod.rs
│ ├── clkout.rs
│ ├── clocks/
│ │ ├── config.rs
│ │ ├── gate.rs
│ │ ├── mod.rs
│ │ ├── operator.rs
│ │ ├── periph_helpers/
│ │ │ ├── mcxa2xx.rs
│ │ │ ├── mcxa5xx.rs
│ │ │ └── mod.rs
│ │ ├── sleep.rs
│ │ └── types.rs
│ ├── config.rs
│ ├── crc.rs
│ ├── ctimer/
│ │ ├── capture.rs
│ │ ├── mod.rs
│ │ └── pwm.rs
│ ├── dma.rs
│ ├── executor.rs
│ ├── flash.rs
│ ├── gpio.rs
│ ├── i2c/
│ │ ├── controller.rs
│ │ ├── mod.rs
│ │ └── target.rs
│ ├── i3c/
│ │ ├── controller.rs
│ │ └── mod.rs
│ ├── inputmux.rs
│ ├── lib.rs
│ ├── lpuart/
│ │ ├── bbq.rs
│ │ ├── blocking.rs
│ │ ├── buffered.rs
│ │ ├── dma.rs
│ │ └── mod.rs
│ ├── ostimer.rs
│ ├── perf_counters.rs
│ ├── reset_reason.rs
│ ├── rtc/
│ │ ├── mcxa2xx.rs
│ │ ├── mcxa5xx.rs
│ │ └── mod.rs
│ ├── spi/
│ │ ├── controller.rs
│ │ └── mod.rs
│ ├── trng.rs
│ └── wwdt.rs
├── embassy-microchip/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── i2c.rs
│ ├── lib.rs
│ ├── pwm.rs
│ ├── tach.rs
│ ├── time_driver.rs
│ └── uart.rs
├── embassy-mspm0/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── build_common.rs
│ └── src/
│ ├── adc.rs
│ ├── dma.rs
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── i2c.rs
│ ├── i2c_target.rs
│ ├── lib.rs
│ ├── macros.rs
│ ├── mathacl.rs
│ ├── time_driver.rs
│ ├── timer.rs
│ ├── trng.rs
│ ├── uart/
│ │ ├── buffered.rs
│ │ └── mod.rs
│ └── wwdt.rs
├── embassy-net/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── dns.rs
│ ├── driver_util.rs
│ ├── fmt.rs
│ ├── icmp.rs
│ ├── lib.rs
│ ├── raw.rs
│ ├── tcp.rs
│ ├── time.rs
│ └── udp.rs
├── embassy-net-adin1110/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── crc32.rs
│ ├── crc8.rs
│ ├── fmt.rs
│ ├── lib.rs
│ ├── mdio.rs
│ ├── phy.rs
│ └── regs.rs
├── embassy-net-driver/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── embassy-net-driver-channel/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── fmt.rs
│ └── lib.rs
├── embassy-net-enc28j60/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── bank0.rs
│ ├── bank1.rs
│ ├── bank2.rs
│ ├── bank3.rs
│ ├── common.rs
│ ├── fmt.rs
│ ├── header.rs
│ ├── lib.rs
│ ├── macros.rs
│ ├── phy.rs
│ └── traits.rs
├── embassy-net-esp-hosted/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── control.rs
│ ├── esp_hosted_config.proto
│ ├── fmt.rs
│ ├── iface.rs
│ ├── ioctl.rs
│ ├── lib.rs
│ └── proto.rs
├── embassy-net-nrf91/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── context.rs
│ ├── fmt.rs
│ └── lib.rs
├── embassy-net-ppp/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── fmt.rs
│ └── lib.rs
├── embassy-net-tuntap/
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── embassy-net-wiznet/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── chip/
│ │ ├── mod.rs
│ │ ├── w5100s.rs
│ │ ├── w5500.rs
│ │ ├── w6100.rs
│ │ └── w6300.rs
│ ├── device.rs
│ └── lib.rs
├── embassy-nrf/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── buffered_uarte/
│ │ ├── mod.rs
│ │ ├── v1.rs
│ │ └── v2.rs
│ ├── chips/
│ │ ├── nrf51.rs
│ │ ├── nrf52805.rs
│ │ ├── nrf52810.rs
│ │ ├── nrf52811.rs
│ │ ├── nrf52820.rs
│ │ ├── nrf52832.rs
│ │ ├── nrf52833.rs
│ │ ├── nrf52840.rs
│ │ ├── nrf5340_app.rs
│ │ ├── nrf5340_net.rs
│ │ ├── nrf54l05_app.rs
│ │ ├── nrf54l10_app.rs
│ │ ├── nrf54l15_app.rs
│ │ ├── nrf54lm20_app.rs
│ │ ├── nrf9120.rs
│ │ └── nrf9160.rs
│ ├── cracen.rs
│ ├── cryptocell_rng.rs
│ ├── egu.rs
│ ├── embassy_net_802154_driver.rs
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── gpiote.rs
│ ├── i2s.rs
│ ├── ipc.rs
│ ├── lib.rs
│ ├── nfct.rs
│ ├── nvmc.rs
│ ├── pdm.rs
│ ├── power.rs
│ ├── ppi/
│ │ ├── dppi.rs
│ │ ├── mod.rs
│ │ └── ppi.rs
│ ├── pwm.rs
│ ├── qdec.rs
│ ├── qspi.rs
│ ├── radio/
│ │ ├── ieee802154.rs
│ │ └── mod.rs
│ ├── reset.rs
│ ├── rng.rs
│ ├── rramc.rs
│ ├── rtc.rs
│ ├── saadc.rs
│ ├── spim.rs
│ ├── spis.rs
│ ├── temp.rs
│ ├── time_driver.rs
│ ├── timer.rs
│ ├── twim.rs
│ ├── twis.rs
│ ├── uarte.rs
│ ├── usb/
│ │ ├── mod.rs
│ │ └── vbus_detect.rs
│ ├── util.rs
│ └── wdt.rs
├── embassy-nxp/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── build.rs
│ ├── build_common.rs
│ └── src/
│ ├── chips/
│ │ ├── lpc55.rs
│ │ ├── mimxrt1011.rs
│ │ └── mimxrt1062.rs
│ ├── dma/
│ │ └── lpc55.rs
│ ├── dma.rs
│ ├── fmt.rs
│ ├── gpio/
│ │ ├── lpc55.rs
│ │ └── rt1xxx.rs
│ ├── gpio.rs
│ ├── iomuxc.rs
│ ├── lib.rs
│ ├── pint.rs
│ ├── pwm/
│ │ └── lpc55.rs
│ ├── pwm.rs
│ ├── sct.rs
│ ├── time_driver/
│ │ ├── pit.rs
│ │ └── rtc.rs
│ ├── usart/
│ │ └── lpc55.rs
│ └── usart.rs
├── embassy-rp/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── LICENSE-APACHE
│ ├── LICENSE-MIT
│ ├── README.md
│ ├── build.rs
│ ├── funcsel.txt
│ ├── link-rp.x.in
│ └── src/
│ ├── adc.rs
│ ├── aon_timer/
│ │ └── mod.rs
│ ├── block.rs
│ ├── bootsel.rs
│ ├── clocks.rs
│ ├── critical_section_impl.rs
│ ├── datetime/
│ │ ├── datetime_chrono.rs
│ │ ├── datetime_no_deps.rs
│ │ ├── epoch.rs
│ │ └── mod.rs
│ ├── dma.rs
│ ├── executor.rs
│ ├── flash.rs
│ ├── float/
│ │ ├── add_sub.rs
│ │ ├── cmp.rs
│ │ ├── conv.rs
│ │ ├── div.rs
│ │ ├── functions.rs
│ │ ├── mod.rs
│ │ └── mul.rs
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── i2c.rs
│ ├── i2c_slave.rs
│ ├── intrinsics.rs
│ ├── lib.rs
│ ├── multicore.rs
│ ├── otp.rs
│ ├── pio/
│ │ ├── instr.rs
│ │ └── mod.rs
│ ├── pio_programs/
│ │ ├── clk.rs
│ │ ├── clock_divider.rs
│ │ ├── hd44780.rs
│ │ ├── i2s.rs
│ │ ├── mod.rs
│ │ ├── onewire.rs
│ │ ├── pwm.rs
│ │ ├── rotary_encoder.rs
│ │ ├── spi.rs
│ │ ├── stepper.rs
│ │ ├── uart.rs
│ │ └── ws2812.rs
│ ├── psram.rs
│ ├── pwm.rs
│ ├── qmi_cs1.rs
│ ├── relocate.rs
│ ├── reset.rs
│ ├── rom_data/
│ │ ├── mod.rs
│ │ ├── rp2040.rs
│ │ └── rp235x.rs
│ ├── rtc/
│ │ ├── conversions.rs
│ │ ├── filter.rs
│ │ └── mod.rs
│ ├── spi.rs
│ ├── spinlock.rs
│ ├── spinlock_mutex.rs
│ ├── time_driver.rs
│ ├── trng.rs
│ ├── uart/
│ │ ├── buffered.rs
│ │ └── mod.rs
│ ├── usb.rs
│ └── watchdog.rs
├── embassy-stm32/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── build_common.rs
│ └── src/
│ ├── adc/
│ │ ├── adc4.rs
│ │ ├── c0.rs
│ │ ├── f1.rs
│ │ ├── f3.rs
│ │ ├── f3_v1_1.rs
│ │ ├── g4.rs
│ │ ├── injected.rs
│ │ ├── mod.rs
│ │ ├── ringbuffered.rs
│ │ ├── v1.rs
│ │ ├── v2.rs
│ │ ├── v3.rs
│ │ ├── v4.rs
│ │ └── watchdog_v1.rs
│ ├── aes/
│ │ └── mod.rs
│ ├── backup_sram.rs
│ ├── can/
│ │ ├── bxcan/
│ │ │ ├── filter.rs
│ │ │ ├── mod.rs
│ │ │ └── registers.rs
│ │ ├── common.rs
│ │ ├── enums.rs
│ │ ├── fd/
│ │ │ ├── config.rs
│ │ │ ├── filter.rs
│ │ │ ├── message_ram/
│ │ │ │ ├── common.rs
│ │ │ │ ├── enums.rs
│ │ │ │ ├── extended_filter.rs
│ │ │ │ ├── generic.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── rxfifo_element.rs
│ │ │ │ ├── standard_filter.rs
│ │ │ │ ├── txbuffer_element.rs
│ │ │ │ └── txevent_element.rs
│ │ │ ├── mod.rs
│ │ │ └── peripheral.rs
│ │ ├── fdcan.rs
│ │ ├── frame.rs
│ │ ├── mod.rs
│ │ └── util.rs
│ ├── comp.rs
│ ├── cordic/
│ │ ├── enums.rs
│ │ ├── errors.rs
│ │ ├── mod.rs
│ │ └── utils.rs
│ ├── cpu.rs
│ ├── crc/
│ │ ├── mod.rs
│ │ ├── v1.rs
│ │ └── v2v3.rs
│ ├── cryp/
│ │ └── mod.rs
│ ├── dac/
│ │ └── mod.rs
│ ├── dcmi.rs
│ ├── dma/
│ │ ├── dma_bdma.rs
│ │ ├── dmamux.rs
│ │ ├── gpdma/
│ │ │ ├── linked_list.rs
│ │ │ ├── mod.rs
│ │ │ └── ringbuffered.rs
│ │ ├── mod.rs
│ │ ├── ringbuffer/
│ │ │ ├── mod.rs
│ │ │ └── tests/
│ │ │ ├── mod.rs
│ │ │ └── prop_test/
│ │ │ ├── mod.rs
│ │ │ ├── reader.rs
│ │ │ └── writer.rs
│ │ ├── util.rs
│ │ └── word.rs
│ ├── dsihost.rs
│ ├── dts/
│ │ ├── mod.rs
│ │ └── tsel.rs
│ ├── eth/
│ │ ├── generic_phy.rs
│ │ ├── mod.rs
│ │ ├── sma/
│ │ │ ├── mod.rs
│ │ │ ├── v1.rs
│ │ │ └── v2.rs
│ │ ├── v1/
│ │ │ ├── mod.rs
│ │ │ ├── rx_desc.rs
│ │ │ └── tx_desc.rs
│ │ └── v2/
│ │ ├── descriptors.rs
│ │ └── mod.rs
│ ├── executor.rs
│ ├── exti/
│ │ ├── blocking.rs
│ │ ├── low_level.rs
│ │ └── mod.rs
│ ├── flash/
│ │ ├── asynch.rs
│ │ ├── c.rs
│ │ ├── common.rs
│ │ ├── eeprom.rs
│ │ ├── f0.rs
│ │ ├── f1f3.rs
│ │ ├── f2.rs
│ │ ├── f4.rs
│ │ ├── f7.rs
│ │ ├── g.rs
│ │ ├── h5.rs
│ │ ├── h50.rs
│ │ ├── h7.rs
│ │ ├── l.rs
│ │ ├── mod.rs
│ │ ├── other.rs
│ │ ├── u0.rs
│ │ └── u5.rs
│ ├── fmc.rs
│ ├── fmt.rs
│ ├── gpio.rs
│ ├── hash/
│ │ └── mod.rs
│ ├── hrtim/
│ │ ├── bridge_converter.rs
│ │ ├── mod.rs
│ │ ├── resonant_converter.rs
│ │ └── traits.rs
│ ├── hsem/
│ │ └── mod.rs
│ ├── hspi/
│ │ ├── enums.rs
│ │ └── mod.rs
│ ├── i2c/
│ │ ├── config.rs
│ │ ├── mod.rs
│ │ ├── v1.rs
│ │ └── v2.rs
│ ├── i2s.rs
│ ├── ipcc.rs
│ ├── lcd.rs
│ ├── lib.rs
│ ├── low_power.rs
│ ├── lptim/
│ │ ├── channel.rs
│ │ ├── mod.rs
│ │ ├── pwm.rs
│ │ └── timer/
│ │ ├── channel_direction.rs
│ │ ├── mod.rs
│ │ └── prescaler.rs
│ ├── ltdc.rs
│ ├── macros.rs
│ ├── opamp.rs
│ ├── ospi/
│ │ ├── enums.rs
│ │ └── mod.rs
│ ├── pka/
│ │ └── mod.rs
│ ├── qspi/
│ │ ├── enums.rs
│ │ └── mod.rs
│ ├── rcc/
│ │ ├── bd.rs
│ │ ├── c0.rs
│ │ ├── f013.rs
│ │ ├── f247.rs
│ │ ├── g0.rs
│ │ ├── g4.rs
│ │ ├── h.rs
│ │ ├── hsi48.rs
│ │ ├── l.rs
│ │ ├── mco.rs
│ │ ├── mod.rs
│ │ ├── n6.rs
│ │ ├── u3.rs
│ │ ├── u5.rs
│ │ └── wba.rs
│ ├── rng.rs
│ ├── rtc/
│ │ ├── datetime.rs
│ │ ├── low_power.rs
│ │ ├── mod.rs
│ │ ├── v2.rs
│ │ └── v3.rs
│ ├── saes/
│ │ └── mod.rs
│ ├── sai/
│ │ └── mod.rs
│ ├── sdmmc/
│ │ ├── mod.rs
│ │ ├── sd.rs
│ │ └── sdio.rs
│ ├── spdifrx/
│ │ └── mod.rs
│ ├── spi/
│ │ └── mod.rs
│ ├── time.rs
│ ├── time_driver/
│ │ ├── gp16.rs
│ │ ├── lptim.rs
│ │ └── mod.rs
│ ├── timer/
│ │ ├── complementary_pwm.rs
│ │ ├── input_capture.rs
│ │ ├── low_level.rs
│ │ ├── mod.rs
│ │ ├── one_pulse.rs
│ │ ├── pwm_input.rs
│ │ ├── qei.rs
│ │ ├── ringbuffered.rs
│ │ └── simple_pwm.rs
│ ├── tsc/
│ │ ├── acquisition_banks.rs
│ │ ├── config.rs
│ │ ├── errors.rs
│ │ ├── io_pin.rs
│ │ ├── mod.rs
│ │ ├── pin_groups.rs
│ │ ├── tsc.rs
│ │ └── types.rs
│ ├── ucpd.rs
│ ├── uid.rs
│ ├── usart/
│ │ ├── buffered.rs
│ │ ├── mod.rs
│ │ └── ringbuffered.rs
│ ├── usb/
│ │ ├── mod.rs
│ │ ├── otg.rs
│ │ └── usb.rs
│ ├── vrefbuf/
│ │ └── mod.rs
│ ├── wdg/
│ │ └── mod.rs
│ └── xspi/
│ ├── enums.rs
│ └── mod.rs
├── embassy-stm32-wpan/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── src/
│ │ ├── lib.rs
│ │ ├── wb55/
│ │ │ ├── channels.rs
│ │ │ ├── cmd.rs
│ │ │ ├── consts.rs
│ │ │ ├── evt.rs
│ │ │ ├── fmt.rs
│ │ │ ├── fus.rs
│ │ │ ├── lhci.rs
│ │ │ ├── mac/
│ │ │ │ ├── commands.rs
│ │ │ │ ├── consts.rs
│ │ │ │ ├── control.rs
│ │ │ │ ├── driver.rs
│ │ │ │ ├── event.rs
│ │ │ │ ├── indications.rs
│ │ │ │ ├── macros.rs
│ │ │ │ ├── mod.rs
│ │ │ │ ├── opcodes.rs
│ │ │ │ ├── responses.rs
│ │ │ │ ├── runner.rs
│ │ │ │ └── typedefs.rs
│ │ │ ├── mod.rs
│ │ │ ├── shci.rs
│ │ │ ├── sub/
│ │ │ │ ├── ble.rs
│ │ │ │ ├── mac.rs
│ │ │ │ ├── mm.rs
│ │ │ │ ├── mod.rs
│ │ │ │ └── sys.rs
│ │ │ ├── tables.rs
│ │ │ └── unsafe_linked_list.rs
│ │ └── wba/
│ │ ├── RNG_INTEGRATION.md
│ │ ├── bindings.rs
│ │ ├── ble.rs
│ │ ├── context.rs
│ │ ├── error.rs
│ │ ├── gap/
│ │ │ ├── advertiser.rs
│ │ │ ├── connection.rs
│ │ │ ├── mod.rs
│ │ │ ├── scanner.rs
│ │ │ └── types.rs
│ │ ├── gatt/
│ │ │ ├── events.rs
│ │ │ ├── mod.rs
│ │ │ ├── server.rs
│ │ │ └── types.rs
│ │ ├── hci/
│ │ │ ├── command.rs
│ │ │ ├── event.rs
│ │ │ ├── host_if.rs
│ │ │ ├── mod.rs
│ │ │ └── types.rs
│ │ ├── linklayer_plat.rs
│ │ ├── ll_sys/
│ │ │ ├── ll_sys_cs.rs
│ │ │ ├── ll_sys_dp_slp.rs
│ │ │ ├── ll_sys_intf.rs
│ │ │ ├── ll_sys_startup.rs
│ │ │ ├── ll_version.rs
│ │ │ └── mod.rs
│ │ ├── ll_sys_if.rs
│ │ ├── mac_sys_if.rs
│ │ ├── mod.rs
│ │ ├── power_table.rs
│ │ ├── runner.rs
│ │ ├── security/
│ │ │ └── mod.rs
│ │ └── util_seq.rs
│ ├── tl_mbox.x.in
│ ├── tl_mbox_extended_wb1.x.in
│ └── tl_mbox_extended_wbx5.x.in
├── embassy-sync/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── build_common.rs
│ ├── src/
│ │ ├── blocking_mutex/
│ │ │ ├── mod.rs
│ │ │ └── raw.rs
│ │ ├── channel.rs
│ │ ├── fmt.rs
│ │ ├── lazy_lock.rs
│ │ ├── lib.rs
│ │ ├── mutex.rs
│ │ ├── once_lock.rs
│ │ ├── pipe.rs
│ │ ├── priority_channel.rs
│ │ ├── pubsub/
│ │ │ ├── mod.rs
│ │ │ ├── publisher.rs
│ │ │ └── subscriber.rs
│ │ ├── ring_buffer.rs
│ │ ├── rwlock.rs
│ │ ├── semaphore.rs
│ │ ├── signal.rs
│ │ ├── waitqueue/
│ │ │ ├── atomic_waker.rs
│ │ │ ├── atomic_waker_turbo.rs
│ │ │ ├── mod.rs
│ │ │ ├── multi_waker.rs
│ │ │ └── waker_registration.rs
│ │ ├── watch.rs
│ │ └── zerocopy_channel.rs
│ └── tests/
│ ├── ui/
│ │ └── sync_impl/
│ │ ├── lazy_lock_function.rs
│ │ ├── lazy_lock_function.stderr
│ │ ├── lazy_lock_type.rs
│ │ ├── lazy_lock_type.stderr
│ │ ├── once_lock.rs
│ │ └── once_lock.stderr
│ └── ui.rs
├── embassy-time/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── delay.rs
│ ├── driver_mock.rs
│ ├── driver_std.rs
│ ├── driver_wasm.rs
│ ├── duration.rs
│ ├── fmt.rs
│ ├── instant.rs
│ ├── lib.rs
│ └── timer.rs
├── embassy-time-driver/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── gen_tick.py
│ └── src/
│ ├── lib.rs
│ └── tick.rs
├── embassy-time-queue-utils/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ └── src/
│ ├── lib.rs
│ ├── queue_generic.rs
│ └── queue_integrated.rs
├── embassy-usb/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── gen_config.py
│ └── src/
│ ├── builder.rs
│ ├── class/
│ │ ├── cdc_acm.rs
│ │ ├── cdc_ncm/
│ │ │ ├── embassy_net.rs
│ │ │ └── mod.rs
│ │ ├── cmsis_dap_v2.rs
│ │ ├── dfu/
│ │ │ ├── app_mode.rs
│ │ │ ├── consts.rs
│ │ │ ├── dfu_mode.rs
│ │ │ └── mod.rs
│ │ ├── hid.rs
│ │ ├── midi.rs
│ │ ├── mod.rs
│ │ ├── uac1/
│ │ │ ├── class_codes.rs
│ │ │ ├── mod.rs
│ │ │ ├── speaker.rs
│ │ │ └── terminal_type.rs
│ │ └── web_usb.rs
│ ├── control.rs
│ ├── descriptor.rs
│ ├── descriptor_reader.rs
│ ├── fmt.rs
│ ├── lib.rs
│ ├── msos.rs
│ └── types.rs
├── embassy-usb-dfu/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ ├── src/
│ │ ├── application.rs
│ │ ├── dfu.rs
│ │ ├── fmt.rs
│ │ └── lib.rs
│ └── tests/
│ └── usb_dfu_test.rs
├── embassy-usb-driver/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── embassy-usb-logger/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ └── lib.rs
├── embassy-usb-synopsys-otg/
│ ├── CHANGELOG.md
│ ├── Cargo.toml
│ ├── README.md
│ └── src/
│ ├── fmt.rs
│ ├── lib.rs
│ └── otg_v1.rs
├── examples/
│ ├── .cargo/
│ │ └── config.toml
│ ├── boot/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── application/
│ │ │ ├── nrf/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory-bl-nrf91.x
│ │ │ │ ├── memory-bl.x
│ │ │ │ ├── memory-nrf91.x
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── rp/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32f3/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32f7/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── flash-boot.sh
│ │ │ │ ├── memory-bl.x
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32h7/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── flash-boot.sh
│ │ │ │ ├── memory-bl.x
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32l0/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32l1/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32l4/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ └── src/
│ │ │ │ └── bin/
│ │ │ │ ├── a.rs
│ │ │ │ └── b.rs
│ │ │ ├── stm32wb-dfu/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ ├── secrets/
│ │ │ │ │ └── key.sec
│ │ │ │ └── src/
│ │ │ │ └── main.rs
│ │ │ ├── stm32wba-dfu/
│ │ │ │ ├── .cargo/
│ │ │ │ │ └── config.toml
│ │ │ │ ├── Cargo.toml
│ │ │ │ ├── README.md
│ │ │ │ ├── build.rs
│ │ │ │ ├── memory.x
│ │ │ │ ├── secrets/
│ │ │ │ │ └── key.sec
│ │ │ │ └── src/
│ │ │ │ └── main.rs
│ │ │ └── stm32wl/
│ │ │ ├── .cargo/
│ │ │ │ └── config.toml
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── bin/
│ │ │ ├── a.rs
│ │ │ └── b.rs
│ │ └── bootloader/
│ │ ├── nrf/
│ │ │ ├── .cargo/
│ │ │ │ └── config.toml
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory-bm.x
│ │ │ ├── memory-s140.x
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── rp/
│ │ │ ├── .cargo/
│ │ │ │ └── config.toml
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── stm32/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── stm32-dual-bank/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ └── src/
│ │ │ └── main.rs
│ │ ├── stm32wb-dfu/
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── memory.x
│ │ │ ├── secrets/
│ │ │ │ └── key.pub.short
│ │ │ └── src/
│ │ │ └── main.rs
│ │ └── stm32wba-dfu/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ ├── secrets/
│ │ │ └── key.pub.short
│ │ └── src/
│ │ └── main.rs
│ ├── lpc55s69/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky_embassy_time.rs
│ │ ├── blinky_nop.rs
│ │ ├── button_executor.rs
│ │ ├── pwm.rs
│ │ ├── usart_async.rs
│ │ └── usart_blocking.rs
│ ├── mcxa2xx/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc-async.rs
│ │ ├── adc-blocking.rs
│ │ ├── adc-temperature.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_async.rs
│ │ ├── capture.rs
│ │ ├── cdog.rs
│ │ ├── clkout.rs
│ │ ├── cpu-clocks.rs
│ │ ├── crc.rs
│ │ ├── dma_mem_to_mem.rs
│ │ ├── dma_scatter_gather_builder.rs
│ │ ├── flash_iap.rs
│ │ ├── hello.rs
│ │ ├── i2c-async.rs
│ │ ├── i2c-blocking.rs
│ │ ├── i2c-dma.rs
│ │ ├── i2c-scan-blocking.rs
│ │ ├── i2c-target-async.rs
│ │ ├── i2c-target-blocking.rs
│ │ ├── i2c-target-dma.rs
│ │ ├── i3c-async.rs
│ │ ├── i3c-blocking.rs
│ │ ├── i3c-dma.rs
│ │ ├── lpuart_bbq_rx.rs
│ │ ├── lpuart_bbq_tx.rs
│ │ ├── lpuart_buffered.rs
│ │ ├── lpuart_dma.rs
│ │ ├── lpuart_polling.rs
│ │ ├── lpuart_ring_buffer.rs
│ │ ├── power-deepsleep-big-jump.rs
│ │ ├── power-deepsleep-gating.rs
│ │ ├── power-deepsleep-gpio-int.rs
│ │ ├── power-deepsleep.rs
│ │ ├── power-wfe-gated.rs
│ │ ├── pwm.rs
│ │ ├── reset-reason.rs
│ │ ├── rtc_alarm.rs
│ │ ├── spi-async.rs
│ │ ├── spi-blocking.rs
│ │ ├── spi-dma.rs
│ │ ├── trng.rs
│ │ ├── wwdt_interrupt.rs
│ │ └── wwdt_reset.rs
│ ├── mcxa5xx/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc-async.rs
│ │ ├── adc-blocking.rs
│ │ ├── adc-temperature.rs
│ │ ├── blinky-firc.rs
│ │ ├── blinky-sosc.rs
│ │ ├── blinky-spll.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_async.rs
│ │ ├── capture.rs
│ │ ├── cdog.rs
│ │ ├── clkout.rs
│ │ ├── crc.rs
│ │ ├── dma_mem_to_mem.rs
│ │ ├── dma_scatter_gather_builder.rs
│ │ ├── hello.rs
│ │ ├── i2c-async.rs
│ │ ├── i2c-blocking.rs
│ │ ├── i2c-dma.rs
│ │ ├── i2c-scan-blocking.rs
│ │ ├── i2c-target-async.rs
│ │ ├── i2c-target-blocking.rs
│ │ ├── i2c-target-dma.rs
│ │ ├── i3c-async.rs
│ │ ├── i3c-blocking.rs
│ │ ├── i3c-dma.rs
│ │ ├── lpuart_bbq_rx.rs
│ │ ├── lpuart_bbq_tx.rs
│ │ ├── lpuart_buffered.rs
│ │ ├── lpuart_dma.rs
│ │ ├── lpuart_polling.rs
│ │ ├── lpuart_ring_buffer.rs
│ │ ├── power-deepsleep-big-jump.rs
│ │ ├── power-deepsleep-gating.rs
│ │ ├── power-deepsleep-gpio-int.rs
│ │ ├── power-deepsleep.rs
│ │ ├── power-wfe-gated.rs
│ │ ├── pwm.rs
│ │ ├── reset-reason.rs
│ │ ├── rtc-alarm.rs
│ │ ├── spi-async.rs
│ │ ├── spi-blocking.rs
│ │ ├── spi-dma.rs
│ │ ├── trng.rs
│ │ ├── wwdt_interrupt.rs
│ │ └── wwdt_reset.rs
│ ├── microchip/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── link_ram.x
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button-async.rs
│ │ ├── button.rs
│ │ ├── i2c-async.rs
│ │ ├── i2c.rs
│ │ ├── pwm.rs
│ │ ├── uart_async.rs
│ │ └── uart_blocking.rs
│ ├── mimxrt1011/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ ├── bin/
│ │ │ ├── blinky.rs
│ │ │ └── button.rs
│ │ └── lib.rs
│ ├── mimxrt1062-evk/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ ├── bin/
│ │ │ ├── blinky.rs
│ │ │ └── button.rs
│ │ └── lib.rs
│ ├── mimxrt6/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── .gitignore
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ ├── bin/
│ │ │ ├── blinky.rs
│ │ │ ├── button.rs
│ │ │ ├── crc.rs
│ │ │ ├── dma.rs
│ │ │ ├── hello.rs
│ │ │ ├── rng.rs
│ │ │ ├── spi-async.rs
│ │ │ ├── spi.rs
│ │ │ ├── uart-async.rs
│ │ │ └── uart.rs
│ │ └── lib.rs
│ ├── mspm0c1104/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── uart.rs
│ │ └── wwdt.rs
│ ├── mspm0g3507/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── i2c.rs
│ │ ├── i2c_async.rs
│ │ ├── i2c_target.rs
│ │ ├── mathacl_ops.rs
│ │ ├── uart.rs
│ │ ├── uart_buffered.rs
│ │ └── wwdt.rs
│ ├── mspm0g3519/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── uart.rs
│ │ └── wwdt.rs
│ ├── mspm0g5187/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ └── wwdt.rs
│ ├── mspm0l1306/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── i2c.rs
│ │ ├── i2c_async.rs
│ │ ├── i2c_target.rs
│ │ ├── uart.rs
│ │ └── wwdt.rs
│ ├── mspm0l2228/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── trng.rs
│ │ ├── uart.rs
│ │ └── wwdt.rs
│ ├── nrf-rtos-trace/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── rtos_trace.rs
│ ├── nrf51/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── blinky.rs
│ ├── nrf52810/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── saadc_lowpower.rs
│ ├── nrf52840/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── buffered_uart.rs
│ │ ├── channel.rs
│ │ ├── channel_sender_receiver.rs
│ │ ├── egu.rs
│ │ ├── ethernet_enc28j60.rs
│ │ ├── executor_fairness_test.rs
│ │ ├── gpiote_channel.rs
│ │ ├── gpiote_port.rs
│ │ ├── i2s_effect.rs
│ │ ├── i2s_monitor.rs
│ │ ├── i2s_waveform.rs
│ │ ├── ieee802154_receive.rs
│ │ ├── ieee802154_send.rs
│ │ ├── manually_create_executor.rs
│ │ ├── multiprio.rs
│ │ ├── mutex.rs
│ │ ├── nfct.rs
│ │ ├── nvmc.rs
│ │ ├── pdm.rs
│ │ ├── pdm_continuous.rs
│ │ ├── ppi.rs
│ │ ├── pubsub.rs
│ │ ├── pwm.rs
│ │ ├── pwm_double_sequence.rs
│ │ ├── pwm_sequence.rs
│ │ ├── pwm_sequence_ppi.rs
│ │ ├── pwm_sequence_ws2812b.rs
│ │ ├── pwm_servo.rs
│ │ ├── qdec.rs
│ │ ├── qspi.rs
│ │ ├── qspi_lowpower.rs
│ │ ├── raw_spawn.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── saadc.rs
│ │ ├── saadc_continuous.rs
│ │ ├── self_spawn.rs
│ │ ├── self_spawn_current_executor.rs
│ │ ├── sixlowpan.rs
│ │ ├── spim.rs
│ │ ├── spis.rs
│ │ ├── temp.rs
│ │ ├── timer.rs
│ │ ├── twim.rs
│ │ ├── twim_lowpower.rs
│ │ ├── twis.rs
│ │ ├── uart.rs
│ │ ├── uart_idle.rs
│ │ ├── uart_split.rs
│ │ ├── usb_ethernet.rs
│ │ ├── usb_hid_keyboard.rs
│ │ ├── usb_hid_mouse.rs
│ │ ├── usb_serial.rs
│ │ ├── usb_serial_multitask.rs
│ │ ├── usb_serial_winusb.rs
│ │ ├── wdt.rs
│ │ └── wifi_esp_hosted.rs
│ ├── nrf52840-edf/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── basic.rs
│ ├── nrf52840-rtic/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── blinky.rs
│ ├── nrf5340/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── cryptocell_rng.rs
│ │ ├── gpiote_channel.rs
│ │ ├── nrf5340dk_internal_caps.rs
│ │ └── uart.rs
│ ├── nrf54l15/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── buffered_uart.rs
│ │ ├── gpiote_channel.rs
│ │ ├── gpiote_port.rs
│ │ ├── pwm.rs
│ │ ├── rng.rs
│ │ ├── rramc.rs
│ │ ├── rramc_buffered.rs
│ │ ├── saadc.rs
│ │ ├── spim.rs
│ │ ├── temp.rs
│ │ ├── timer.rs
│ │ ├── twim.rs
│ │ ├── twis.rs
│ │ ├── uart.rs
│ │ └── wdt.rs
│ ├── nrf54lm20/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── gpio.rs
│ │ ├── gpiote_channel.rs
│ │ ├── gpiote_port.rs
│ │ └── timer.rs
│ ├── nrf9151/
│ │ ├── ns/
│ │ │ ├── .cargo/
│ │ │ │ └── config.toml
│ │ │ ├── Cargo.toml
│ │ │ ├── README.md
│ │ │ ├── build.rs
│ │ │ ├── flash_tfm.sh
│ │ │ ├── memory.x
│ │ │ ├── src/
│ │ │ │ └── bin/
│ │ │ │ ├── blinky.rs
│ │ │ │ └── uart.rs
│ │ │ └── tfm.hex
│ │ └── s/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── cryptocell_rng.rs
│ ├── nrf9160/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── modem_tcp_client.rs
│ ├── rp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── assets/
│ │ │ └── ferris.raw
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── assign_resources.rs
│ │ ├── blinky.rs
│ │ ├── blinky_two_channels.rs
│ │ ├── blinky_two_tasks.rs
│ │ ├── button.rs
│ │ ├── debounce.rs
│ │ ├── ethernet_w5500_icmp.rs
│ │ ├── ethernet_w5500_icmp_ping.rs
│ │ ├── ethernet_w5500_multisocket.rs
│ │ ├── ethernet_w5500_tcp_client.rs
│ │ ├── ethernet_w5500_tcp_server.rs
│ │ ├── ethernet_w5500_udp.rs
│ │ ├── ethernet_w55rp20_tcp_server.rs
│ │ ├── flash.rs
│ │ ├── gpio_async.rs
│ │ ├── gpout.rs
│ │ ├── i2c_async.rs
│ │ ├── i2c_async_embassy.rs
│ │ ├── i2c_blocking.rs
│ │ ├── i2c_slave.rs
│ │ ├── interrupt.rs
│ │ ├── multicore.rs
│ │ ├── multiprio.rs
│ │ ├── orchestrate_tasks.rs
│ │ ├── overclock.rs
│ │ ├── overclock_manual.rs
│ │ ├── pio_async.rs
│ │ ├── pio_clk.rs
│ │ ├── pio_dma.rs
│ │ ├── pio_hd44780.rs
│ │ ├── pio_i2s.rs
│ │ ├── pio_i2s_mclk.rs
│ │ ├── pio_onewire.rs
│ │ ├── pio_onewire_parasite.rs
│ │ ├── pio_pwm.rs
│ │ ├── pio_rotary_encoder.rs
│ │ ├── pio_servo.rs
│ │ ├── pio_spi.rs
│ │ ├── pio_spi_async.rs
│ │ ├── pio_stepper.rs
│ │ ├── pio_uart.rs
│ │ ├── pio_ws2812.rs
│ │ ├── pwm.rs
│ │ ├── pwm_input.rs
│ │ ├── rosc.rs
│ │ ├── rtc.rs
│ │ ├── rtc_alarm.rs
│ │ ├── shared_bus.rs
│ │ ├── sharing.rs
│ │ ├── spi.rs
│ │ ├── spi_async.rs
│ │ ├── spi_display.rs
│ │ ├── spi_gc9a01.rs
│ │ ├── spi_sdmmc.rs
│ │ ├── uart.rs
│ │ ├── uart_buffered_split.rs
│ │ ├── uart_r503.rs
│ │ ├── uart_unidir.rs
│ │ ├── usb_ethernet.rs
│ │ ├── usb_hid_keyboard.rs
│ │ ├── usb_hid_mouse.rs
│ │ ├── usb_logger.rs
│ │ ├── usb_midi.rs
│ │ ├── usb_raw.rs
│ │ ├── usb_raw_bulk.rs
│ │ ├── usb_serial.rs
│ │ ├── usb_serial_with_handler.rs
│ │ ├── usb_serial_with_logger.rs
│ │ ├── usb_webusb.rs
│ │ ├── watchdog.rs
│ │ ├── wifi_ap_tcp_server.rs
│ │ ├── wifi_blinky.rs
│ │ ├── wifi_scan.rs
│ │ ├── wifi_tcp_server.rs
│ │ ├── wifi_webrequest.rs
│ │ └── zerocopy.rs
│ ├── rp235x/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── assets/
│ │ │ └── ferris.raw
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── aon_timer_async.rs
│ │ ├── assign_resources.rs
│ │ ├── blinky.rs
│ │ ├── blinky_two_channels.rs
│ │ ├── blinky_two_tasks.rs
│ │ ├── blinky_wifi.rs
│ │ ├── blinky_wifi_pico_plus_2.rs
│ │ ├── button.rs
│ │ ├── debounce.rs
│ │ ├── ethernet_w5500_icmp.rs
│ │ ├── ethernet_w5500_icmp_ping.rs
│ │ ├── ethernet_w5500_multisocket.rs
│ │ ├── ethernet_w5500_tcp_client.rs
│ │ ├── ethernet_w5500_tcp_server.rs
│ │ ├── ethernet_w5500_udp.rs
│ │ ├── ethernet_w6300_udp.rs
│ │ ├── flash.rs
│ │ ├── gpio_async.rs
│ │ ├── gpout.rs
│ │ ├── i2c_async.rs
│ │ ├── i2c_async_embassy.rs
│ │ ├── i2c_blocking.rs
│ │ ├── i2c_slave.rs
│ │ ├── interrupt.rs
│ │ ├── multicore.rs
│ │ ├── multicore_stack_overflow.rs
│ │ ├── multiprio.rs
│ │ ├── otp.rs
│ │ ├── overclock.rs
│ │ ├── pio_async.rs
│ │ ├── pio_dma.rs
│ │ ├── pio_hd44780.rs
│ │ ├── pio_i2s.rs
│ │ ├── pio_i2s_rx.rs
│ │ ├── pio_onewire.rs
│ │ ├── pio_onewire_parasite.rs
│ │ ├── pio_pwm.rs
│ │ ├── pio_rotary_encoder.rs
│ │ ├── pio_rotary_encoder_rxf.rs
│ │ ├── pio_servo.rs
│ │ ├── pio_stepper.rs
│ │ ├── pio_uart.rs
│ │ ├── pio_ws2812.rs
│ │ ├── psram.rs
│ │ ├── pwm.rs
│ │ ├── pwm_input.rs
│ │ ├── pwm_tb6612fng_motor_driver.rs
│ │ ├── rosc.rs
│ │ ├── shared_bus.rs
│ │ ├── sharing.rs
│ │ ├── spi.rs
│ │ ├── spi_async.rs
│ │ ├── spi_display.rs
│ │ ├── spi_sdmmc.rs
│ │ ├── trng.rs
│ │ ├── uart.rs
│ │ ├── uart_buffered_split.rs
│ │ ├── uart_r503.rs
│ │ ├── uart_unidir.rs
│ │ ├── usb_hid_keyboard.rs
│ │ ├── usb_webusb.rs
│ │ ├── watchdog.rs
│ │ └── zerocopy.rs
│ ├── std/
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── src/
│ │ │ ├── bin/
│ │ │ │ ├── net.rs
│ │ │ │ ├── net_dns.rs
│ │ │ │ ├── net_ppp.rs
│ │ │ │ ├── net_udp.rs
│ │ │ │ ├── serial.rs
│ │ │ │ ├── tcp_accept.rs
│ │ │ │ ├── tick.rs
│ │ │ │ └── tick_cancel.rs
│ │ │ └── serial_port.rs
│ │ └── tap.sh
│ ├── stm32c0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_ring_buffered_timer.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ └── rtc.rs
│ ├── stm32f0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc-watchdog.rs
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button_controlled_blink.rs
│ │ ├── button_exti.rs
│ │ ├── hello.rs
│ │ ├── i2c_master.rs
│ │ ├── i2c_slave_async.rs
│ │ ├── i2c_slave_blocking.rs
│ │ ├── multiprio.rs
│ │ └── wdg.rs
│ ├── stm32f072/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── i2c_loopback_test_async.rs
│ ├── stm32f1/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── can.rs
│ │ ├── hello.rs
│ │ ├── input_capture.rs
│ │ ├── pwm_input.rs
│ │ └── usb_serial.rs
│ ├── stm32f105/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── usb_serial.rs
│ ├── stm32f107/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── eth.rs
│ ├── stm32f2/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── pll.rs
│ ├── stm32f3/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_events.rs
│ │ ├── button_exti.rs
│ │ ├── flash.rs
│ │ ├── hello.rs
│ │ ├── multiprio.rs
│ │ ├── spi_dma.rs
│ │ ├── tsc_blocking.rs
│ │ ├── tsc_multipin.rs
│ │ ├── usart_dma.rs
│ │ └── usb_serial.rs
│ ├── stm32f334/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── button.rs
│ │ ├── hello.rs
│ │ ├── hrtim.rs
│ │ ├── opamp.rs
│ │ └── pwm.rs
│ ├── stm32f4/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── dac.rs
│ │ ├── eth.rs
│ │ ├── eth_compliance_test.rs
│ │ ├── eth_w5500.rs
│ │ ├── flash.rs
│ │ ├── flash_async.rs
│ │ ├── hello.rs
│ │ ├── i2c.rs
│ │ ├── i2c_async.rs
│ │ ├── i2c_comparison.rs
│ │ ├── i2c_master_test_blocking.rs
│ │ ├── i2c_slave_async.rs
│ │ ├── i2c_slave_blocking.rs
│ │ ├── i2s_dma.rs
│ │ ├── input_capture.rs
│ │ ├── mco.rs
│ │ ├── multiprio.rs
│ │ ├── pwm.rs
│ │ ├── pwm_complementary.rs
│ │ ├── pwm_input.rs
│ │ ├── rtc.rs
│ │ ├── sdmmc.rs
│ │ ├── spi.rs
│ │ ├── spi_dma.rs
│ │ ├── usart.rs
│ │ ├── usart_buffered.rs
│ │ ├── usart_dma.rs
│ │ ├── usb_ethernet.rs
│ │ ├── usb_hid_keyboard.rs
│ │ ├── usb_hid_mouse.rs
│ │ ├── usb_raw.rs
│ │ ├── usb_serial.rs
│ │ ├── usb_uac_speaker.rs
│ │ ├── wdt.rs
│ │ ├── ws2812_pwm.rs
│ │ └── ws2812_spi.rs
│ ├── stm32f401/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── i2c_loopback_test_async.rs
│ ├── stm32f469/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── dsi_bsp.rs
│ ├── stm32f7/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── cryp.rs
│ │ ├── eth.rs
│ │ ├── flash.rs
│ │ ├── hash.rs
│ │ ├── hello.rs
│ │ ├── pwm.rs
│ │ ├── pwm_ringbuffer.rs
│ │ ├── qspi.rs
│ │ ├── sdmmc.rs
│ │ ├── usart_dma.rs
│ │ └── usb_serial.rs
│ ├── stm32g0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── adc_oversampling.rs
│ │ ├── adc_ring_buffered_timer.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── flash.rs
│ │ ├── flash_async.rs
│ │ ├── hf_timer.rs
│ │ ├── i2c_async.rs
│ │ ├── input_capture.rs
│ │ ├── onewire_ds18b20.rs
│ │ ├── pwm_complementary.rs
│ │ ├── pwm_input.rs
│ │ ├── rtc.rs
│ │ ├── spi_neopixel.rs
│ │ ├── usart.rs
│ │ ├── usart_buffered.rs
│ │ ├── usart_dma.rs
│ │ └── usb_serial.rs
│ ├── stm32g4/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_differential.rs
│ │ ├── adc_dma.rs
│ │ ├── adc_injected_and_regular.rs
│ │ ├── adc_oversampling.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── i2c_slave.rs
│ │ ├── i2s.rs
│ │ ├── pll.rs
│ │ ├── pwm.rs
│ │ ├── usb_c_pd.rs
│ │ └── usb_serial.rs
│ ├── stm32g474/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── comp.rs
│ │ ├── flash_async.rs
│ │ ├── hrtim.rs
│ │ ├── hrtim_master.rs
│ │ └── pwm_input_async.rs
│ ├── stm32h5/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── backup_sram.rs
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── cordic.rs
│ │ ├── dts.rs
│ │ ├── eth.rs
│ │ ├── i2c.rs
│ │ ├── mco.rs
│ │ ├── rng.rs
│ │ ├── sai.rs
│ │ ├── usart.rs
│ │ ├── usart_dma.rs
│ │ ├── usart_split.rs
│ │ ├── usb_c_pd.rs
│ │ ├── usb_serial.rs
│ │ ├── usb_uac_speaker.rs
│ │ └── wifi_scan.rs
│ ├── stm32h7/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── camera.rs
│ │ ├── can.rs
│ │ ├── dac.rs
│ │ ├── dac_dma.rs
│ │ ├── eth.rs
│ │ ├── eth_client.rs
│ │ ├── eth_client_mii.rs
│ │ ├── flash.rs
│ │ ├── flash_async.rs
│ │ ├── fmc.rs
│ │ ├── i2c.rs
│ │ ├── i2c_shared.rs
│ │ ├── low_level_timer_api.rs
│ │ ├── mco.rs
│ │ ├── multiprio.rs
│ │ ├── pwm.rs
│ │ ├── qspi_mdma.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── sai.rs
│ │ ├── sdmmc.rs
│ │ ├── signal.rs
│ │ ├── spi.rs
│ │ ├── spi_bdma.rs
│ │ ├── spi_dma.rs
│ │ ├── usart.rs
│ │ ├── usart_dma.rs
│ │ ├── usart_split.rs
│ │ ├── usb_serial.rs
│ │ └── wdg.rs
│ ├── stm32h723/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── spdifrx.rs
│ ├── stm32h735/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── ltdc.rs
│ ├── stm32h742/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── qspi.rs
│ ├── stm32h755cm4/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── intercore.rs
│ ├── stm32h755cm7/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── intercore.rs
│ ├── stm32h7b0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── ospi_memory_mapped.rs
│ ├── stm32h7rs/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── eth.rs
│ │ ├── i2c.rs
│ │ ├── mco.rs
│ │ ├── multiprio.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── signal.rs
│ │ ├── spi.rs
│ │ ├── spi_dma.rs
│ │ ├── usart.rs
│ │ ├── usart_dma.rs
│ │ ├── usart_split.rs
│ │ ├── usb_serial.rs
│ │ └── xspi_memory_mapped.rs
│ ├── stm32l0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── dds.rs
│ │ ├── eeprom.rs
│ │ ├── flash.rs
│ │ ├── raw_spawn.rs
│ │ ├── spi.rs
│ │ ├── tsc_async.rs
│ │ ├── tsc_blocking.rs
│ │ ├── tsc_multipin.rs
│ │ ├── usart_dma.rs
│ │ ├── usart_irq.rs
│ │ └── usb_serial.rs
│ ├── stm32l1/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── eeprom.rs
│ │ ├── flash.rs
│ │ ├── spi.rs
│ │ ├── usart.rs
│ │ └── usb_serial.rs
│ ├── stm32l4/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_dma.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── can.rs
│ │ ├── dac.rs
│ │ ├── dac_dma.rs
│ │ ├── flash_async.rs
│ │ ├── i2c.rs
│ │ ├── i2c_blocking_async.rs
│ │ ├── i2c_dma.rs
│ │ ├── mco.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── spe_adin1110_http_server.rs
│ │ ├── spi.rs
│ │ ├── spi_blocking_async.rs
│ │ ├── spi_dma.rs
│ │ ├── tsc_async.rs
│ │ ├── tsc_blocking.rs
│ │ ├── tsc_multipin.rs
│ │ ├── usart.rs
│ │ ├── usart_dma.rs
│ │ └── usb_serial.rs
│ ├── stm32l4-rtic/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── blinky_timer_interrupt.rs
│ │ └── button_exti.rs
│ ├── stm32l432/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── qspi_mmap.rs
│ ├── stm32l5/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── button_exti.rs
│ │ ├── rng.rs
│ │ ├── usb_ethernet.rs
│ │ ├── usb_hid_mouse.rs
│ │ └── usb_serial.rs
│ ├── stm32l5-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ └── stop.rs
│ ├── stm32n6/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── crc.rs
│ │ ├── hash.rs
│ │ ├── xspi_flash.rs
│ │ └── xspi_psram.rs
│ ├── stm32u0/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── crc.rs
│ │ ├── dac.rs
│ │ ├── flash.rs
│ │ ├── i2c.rs
│ │ ├── lcd.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── spi.rs
│ │ ├── usart.rs
│ │ ├── usb_serial.rs
│ │ └── wdt.rs
│ ├── stm32u3/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── mco.rs
│ │ ├── rtc.rs
│ │ └── usb_serial.rs
│ ├── stm32u5/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── boot.rs
│ │ ├── flash.rs
│ │ ├── hspi_memory_mapped.rs
│ │ ├── i2c.rs
│ │ ├── ltdc.rs
│ │ ├── rng.rs
│ │ ├── tsc.rs
│ │ ├── usb_hs_serial.rs
│ │ └── usb_serial.rs
│ ├── stm32wb/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── eddystone_beacon.rs
│ │ ├── fus_update.rs
│ │ ├── gatt_server.rs
│ │ ├── mac_ffd.rs
│ │ ├── mac_ffd_net.rs
│ │ ├── mac_rfd.rs
│ │ ├── tl_mbox.rs
│ │ ├── tl_mbox_ble.rs
│ │ └── tl_mbox_mac.rs
│ ├── stm32wba/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_ring_buffered.rs
│ │ ├── aes_cbc.rs
│ │ ├── aes_ccm.rs
│ │ ├── aes_ctr.rs
│ │ ├── aes_ecb.rs
│ │ ├── aes_gcm.rs
│ │ ├── aes_gmac.rs
│ │ ├── ble_advertiser.rs
│ │ ├── ble_central.rs
│ │ ├── ble_gatt_server.rs
│ │ ├── ble_peripheral_connect.rs
│ │ ├── ble_scanner.rs
│ │ ├── ble_secure.rs
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── device_info.rs
│ │ ├── flash.rs
│ │ ├── mac_ffd.rs
│ │ ├── pka_ecdh.rs
│ │ ├── pka_ecdsa_sign.rs
│ │ ├── pka_ecdsa_verify.rs
│ │ ├── pka_rsa.rs
│ │ ├── pka_rsa_crt.rs
│ │ ├── pka_rsa_keygen.rs
│ │ ├── pwm.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── saes_ecb.rs
│ │ └── saes_gcm.rs
│ ├── stm32wba-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── button_exti.rs
│ ├── stm32wba6/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README_PCM.md
│ │ ├── build.rs
│ │ ├── convert_wav.py
│ │ ├── convert_wav.sh
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── adc_ring_buffered.rs
│ │ ├── aes_cbc.rs
│ │ ├── aes_ccm.rs
│ │ ├── aes_ctr.rs
│ │ ├── aes_ecb.rs
│ │ ├── aes_gcm.rs
│ │ ├── aes_gmac.rs
│ │ ├── ble_advertiser.rs
│ │ ├── ble_central.rs
│ │ ├── ble_gatt_server.rs
│ │ ├── ble_peripheral_connect.rs
│ │ ├── ble_scanner.rs
│ │ ├── ble_secure.rs
│ │ ├── blinky.rs
│ │ ├── button_exti.rs
│ │ ├── comp.rs
│ │ ├── comp_window.rs
│ │ ├── device_info.rs
│ │ ├── flash.rs
│ │ ├── mac_ffd.rs
│ │ ├── pka_ecdh.rs
│ │ ├── pka_ecdsa_sign.rs
│ │ ├── pka_ecdsa_verify.rs
│ │ ├── pka_rsa.rs
│ │ ├── pka_rsa_crt.rs
│ │ ├── pka_rsa_keygen.rs
│ │ ├── pwm.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── saes_ecb.rs
│ │ ├── saes_gcm.rs
│ │ ├── sdmmc_sai.rs
│ │ ├── usb_hs_serial.rs
│ │ └── wwdg.rs
│ ├── stm32wba6-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── button_exti.rs
│ ├── stm32wl/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── adc.rs
│ │ ├── blinky.rs
│ │ ├── button.rs
│ │ ├── button_exti.rs
│ │ ├── flash.rs
│ │ ├── random.rs
│ │ ├── rtc.rs
│ │ └── uart_async.rs
│ ├── stm32wl55cm0p/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── intercore.rs
│ ├── stm32wl55cm0p-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── intercore.rs
│ ├── stm32wl55cm4/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ └── intercore.rs
│ ├── stm32wl55cm4-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── build.rs
│ │ ├── memory.x
│ │ └── src/
│ │ └── bin/
│ │ ├── blinky.rs
│ │ └── intercore.rs
│ ├── stm32wle5-lp/
│ │ ├── .cargo/
│ │ │ └── config.toml
│ │ ├── Cargo.toml
│ │ ├── README.md
│ │ ├── build.rs
│ │ ├── src/
│ │ │ └── bin/
│ │ │ ├── adc.rs
│ │ │ ├── blinky.rs
│ │ │ ├── button_exti.rs
│ │ │ └── i2c.rs
│ │ └── stm32wle5.code-workspace
│ └── wasm/
│ ├── Cargo.toml
│ ├── README.md
│ ├── index.html
│ └── src/
│ └── lib.rs
├── fmtall.sh
├── release/
│ ├── bump-dependency.sh
│ └── release.toml
├── rust-toolchain-nightly.toml
├── rust-toolchain.toml
├── rustfmt.toml
└── tests/
├── link_ram_cortex_m.x
├── mcxa2xx/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── README.md
│ ├── build.rs
│ ├── memory.x
│ └── src/
│ └── bin/
│ ├── adc.rs
│ ├── adc_compare.rs
│ ├── cdog.rs
│ ├── crc.rs
│ ├── ctimer_capture.rs
│ ├── dma.rs
│ ├── gpio.rs
│ ├── i2c.rs
│ ├── i3c.rs
│ ├── lpuart.rs
│ ├── pwm.rs
│ ├── rtc_alarm.rs
│ ├── trng.rs
│ └── wwdt_interrupt.rs
├── mspm0/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── build.rs
│ ├── memory_g3507.x
│ ├── memory_g3519.x
│ └── src/
│ └── bin/
│ ├── dma.rs
│ ├── uart.rs
│ └── uart_buffered.rs
├── nrf/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── build.rs
│ ├── gen_test.py
│ ├── memory-nrf51422.x
│ ├── memory-nrf52832.x
│ ├── memory-nrf52833.x
│ ├── memory-nrf52840.x
│ ├── memory-nrf5340.x
│ ├── memory-nrf9160.x
│ └── src/
│ ├── bin/
│ │ ├── buffered_uart.rs
│ │ ├── buffered_uart_full.rs
│ │ ├── buffered_uart_halves.rs
│ │ ├── buffered_uart_spam.rs
│ │ ├── ethernet_enc28j60_perf.rs
│ │ ├── gpio.rs
│ │ ├── gpiote.rs
│ │ ├── spim.rs
│ │ ├── timer.rs
│ │ ├── uart_halves.rs
│ │ ├── uart_split.rs
│ │ └── wifi_esp_hosted_perf.rs
│ └── common.rs
├── perf-client/
│ ├── Cargo.toml
│ └── src/
│ └── lib.rs
├── perf-server/
│ ├── Cargo.toml
│ ├── deploy.sh
│ ├── perf-server.service
│ └── src/
│ └── main.rs
├── riscv32/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── build.rs
│ ├── link.x
│ ├── memory.x
│ └── src/
│ └── bin/
│ └── empty.rs
├── rp/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── build.rs
│ ├── memory.x
│ ├── readme.md
│ └── src/
│ └── bin/
│ ├── adc.rs
│ ├── aon_timer.rs
│ ├── bootsel.rs
│ ├── cyw43-perf.rs
│ ├── dma_copy_async.rs
│ ├── ethernet_w5100s_perf.rs
│ ├── flash.rs
│ ├── float.rs
│ ├── gpio.rs
│ ├── gpio_async.rs
│ ├── gpio_multicore.rs
│ ├── i2c.rs
│ ├── multicore.rs
│ ├── overclock.rs
│ ├── pio_irq.rs
│ ├── pio_multi_load.rs
│ ├── pwm.rs
│ ├── rtc.rs
│ ├── spi.rs
│ ├── spi_async.rs
│ ├── spinlock_mutex_multicore.rs
│ ├── timer.rs
│ ├── uart.rs
│ ├── uart_buffered.rs
│ ├── uart_dma.rs
│ └── uart_upgrade.rs
├── stm32/
│ ├── .cargo/
│ │ └── config.toml
│ ├── Cargo.toml
│ ├── build.rs
│ ├── gen_test.py
│ └── src/
│ ├── bin/
│ │ ├── adc.rs
│ │ ├── afio.rs
│ │ ├── can.rs
│ │ ├── cordic.rs
│ │ ├── cryp.rs
│ │ ├── dac.rs
│ │ ├── dac_l1.rs
│ │ ├── eeprom.rs
│ │ ├── eth.rs
│ │ ├── fdcan.rs
│ │ ├── gpio.rs
│ │ ├── hash.rs
│ │ ├── hsem.rs
│ │ ├── rng.rs
│ │ ├── rtc.rs
│ │ ├── sdmmc.rs
│ │ ├── spi.rs
│ │ ├── spi_dma.rs
│ │ ├── stop.rs
│ │ ├── timer.rs
│ │ ├── ucpd.rs
│ │ ├── usart.rs
│ │ ├── usart_dma.rs
│ │ ├── usart_rx_ringbuffered.rs
│ │ ├── wpan_ble.rs
│ │ └── wpan_mac.rs
│ ├── can_common.rs
│ └── common.rs
└── utils/
├── Cargo.toml
└── src/
└── bin/
└── saturate_serial.rs
================================================
FILE CONTENTS
================================================
================================================
FILE: .gitattributes
================================================
* text=auto
*.adoc text
*.html text
*.in text
*.json text
*.md text
*.proto text
*.py text
*.rs text
*.service text
*.sh text
*.toml text
*.txt text
*.x text
*.yml text
.vscode/*.json linguist-language=JSON-with-Comments
# Configure changelog files to use union merge strategy
# This prevents merge conflicts by automatically combining changes from both branches
CHANGELOG.md merge=union
changelog.md merge=union
CHANGELOG.txt merge=union
changelog.txt merge=union
*.raw binary
*.bin binary
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.ico binary
*.mov binary
*.mp4 binary
*.mp3 binary
*.flv binary
*.fla binary
*.swf binary
*.gz binary
*.zip binary
*.7z binary
*.ttf binary
*.eot binary
*.woff binary
*.pyc binary
*.pdf binary
*.ez binary
*.bz2 binary
*.swp binary
================================================
FILE: .github/ci/book.sh
================================================
#!/bin/bash
## on push branch=main
## priority -100
## dedup dequeue
## cooldown 15m
set -euxo pipefail
make -C docs
export KUBECONFIG=/ci/secrets/kubeconfig.yml
POD=$(kubectl get po -l app=website -o jsonpath={.items[0].metadata.name})
mkdir -p build
mv docs/book build/book
tar -C build -cf book.tar book
kubectl exec $POD -- mkdir -p /usr/share/nginx/html
kubectl cp book.tar $POD:/usr/share/nginx/html/
kubectl exec $POD -- find /usr/share/nginx/html
kubectl exec $POD -- tar -C /usr/share/nginx/html -xvf /usr/share/nginx/html/book.tar
================================================
FILE: .github/ci/build-nightly.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
mv rust-toolchain-nightly.toml rust-toolchain.toml
# needed for "dumb HTTP" transport support
# used when pointing stm32-metapac to a CI-built one.
export CARGO_NET_GIT_FETCH_WITH_CLI=true
# Restore lockfiles
if [ -f /ci/cache/lockfiles.tar ]; then
echo Restoring lockfiles...
tar xf /ci/cache/lockfiles.tar
fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 8f4cfa11324c582467c2aab161ef963ff7a2b884
./ci-nightly.sh
# Save lockfiles
echo Saving lockfiles...
find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+
================================================
FILE: .github/ci/build-xtensa.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
# needed for "dumb HTTP" transport support
# used when pointing stm32-metapac to a CI-built one.
export CARGO_NET_GIT_FETCH_WITH_CLI=true
cargo install espup --locked
espup install --toolchain-version 1.92.0.0
# Restore lockfiles
if [ -f /ci/cache/lockfiles.tar ]; then
echo Restoring lockfiles...
tar xf /ci/cache/lockfiles.tar
fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 8f4cfa11324c582467c2aab161ef963ff7a2b884
./ci-xtensa.sh
# Save lockfiles
echo Saving lockfiles...
find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+
================================================
FILE: .github/ci/build.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
if [ -f /ci/secrets/teleprobe-token.txt ]; then
echo Got teleprobe token!
export TELEPROBE_HOST=https://teleprobe.embassy.dev
export TELEPROBE_TOKEN=$(cat /ci/secrets/teleprobe-token.txt)
export TELEPROBE_CACHE=/ci/cache/teleprobe_cache.json
fi
# needed for "dumb HTTP" transport support
# used when pointing stm32-metapac to a CI-built one.
export CARGO_NET_GIT_FETCH_WITH_CLI=true
# Restore lockfiles
if [ -f /ci/cache/lockfiles.tar ]; then
echo Restoring lockfiles...
tar xf /ci/cache/lockfiles.tar
fi
hashtime restore /ci/cache/filetime.json || true
hashtime save /ci/cache/filetime.json
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 8f4cfa11324c582467c2aab161ef963ff7a2b884
./ci.sh
# Save lockfiles
echo Saving lockfiles...
find . -type f -name Cargo.lock -exec tar -cf /ci/cache/lockfiles.tar '{}' \+
================================================
FILE: .github/ci/doc.sh
================================================
#!/bin/bash
## on push branch=main
## priority -100
## dedup dequeue
## cooldown 15m
set -euxo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
mv rust-toolchain-nightly.toml rust-toolchain.toml
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 8f4cfa11324c582467c2aab161ef963ff7a2b884
cargo install --git https://github.com/embassy-rs/docserver --locked --rev 09805a79beef037d283192146e2b546cb1c0e931
cargo embassy-devtool doc -o webroot
export KUBECONFIG=/ci/secrets/kubeconfig.yml
POD=$(kubectl get po -l app=docserver -o jsonpath={.items[0].metadata.name})
kubectl cp webroot/crates $POD:/data
kubectl cp webroot/static $POD:/data
================================================
FILE: .github/ci/janitor.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
export PATH=$CARGO_HOME/bin:$PATH
cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked --rev 8f4cfa11324c582467c2aab161ef963ff7a2b884
cargo embassy-devtool check-crlf
cargo embassy-devtool check-manifest
================================================
FILE: .github/ci/rustfmt.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
mv rust-toolchain-nightly.toml rust-toolchain.toml
find . -name '*.rs' -not -path '*target*' | xargs rustfmt --check --skip-children --unstable-features --edition 2024
================================================
FILE: .github/ci/test-nightly.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
mv rust-toolchain-nightly.toml rust-toolchain.toml
cargo test --manifest-path ./embassy-executor/Cargo.toml
cargo test --manifest-path ./embassy-executor/Cargo.toml --features nightly
MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml
MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-executor/Cargo.toml --features nightly
MIRIFLAGS=-Zmiri-ignore-leaks cargo miri test --manifest-path ./embassy-sync/Cargo.toml
================================================
FILE: .github/ci/test.sh
================================================
#!/bin/bash
## on push branch~=gh-readonly-queue/main/.*
## on pull_request
set -euo pipefail
export RUSTUP_HOME=/ci/cache/rustup
export CARGO_HOME=/ci/cache/cargo
export CARGO_TARGET_DIR=/ci/cache/target
# needed for "dumb HTTP" transport support
# used when pointing stm32-metapac to a CI-built one.
export CARGO_NET_GIT_FETCH_WITH_CLI=true
cargo test --manifest-path ./embassy-executor/Cargo.toml --features metadata-name
cargo test --manifest-path ./embassy-futures/Cargo.toml
cargo test --manifest-path ./embassy-sync/Cargo.toml
cargo test --manifest-path ./embassy-embedded-hal/Cargo.toml
cargo test --manifest-path ./embassy-hal-internal/Cargo.toml
cargo test --manifest-path ./embassy-time/Cargo.toml --features mock-driver,embassy-time-queue-utils/generic-queue-8
cargo test --manifest-path ./embassy-time-driver/Cargo.toml
cargo test --manifest-path ./embassy-boot/Cargo.toml
cargo test --manifest-path ./embassy-boot/Cargo.toml --features ed25519-dalek
cargo test --manifest-path ./embassy-boot/Cargo.toml --features ed25519-salty
cargo test --manifest-path ./embassy-nrf/Cargo.toml --no-default-features --features nrf52840,time-driver-rtc1,gpiote
cargo test --manifest-path ./embassy-rp/Cargo.toml --no-default-features --features time-driver,rp2040,_test
cargo test --manifest-path ./embassy-rp/Cargo.toml --no-default-features --features time-driver,rp235xa,_test
cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f429vg,time-driver-any,exti,single-bank
cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f429vg,time-driver-any,exti,dual-bank
cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f732ze,time-driver-any,exti
cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f769ni,time-driver-any,exti,single-bank
cargo test --manifest-path ./embassy-stm32/Cargo.toml --no-default-features --features stm32f769ni,time-driver-any,exti,dual-bank
cargo test --manifest-path ./embassy-net-adin1110/Cargo.toml
cargo test --manifest-path ./embassy-usb-dfu/Cargo.toml --features dfu
================================================
FILE: .github/workflows/matrix-bot-issues.yml
================================================
name: Matrix bot for issues
on:
issues:
types: [opened]
jobs:
notify:
if: github.repository == 'embassy-rs/embassy'
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: send message
uses: actions/github-script@v8
with:
script: |
const action = context.payload.action;
const title = context.payload.issue.title;
const issueBody = context.payload.issue.body;
const url = context.payload.issue.html_url;
// Determine message prefix
let prefix;
let roomId;
if (action === 'opened' && (title + ' ' + issueBody).toLowerCase().includes('esp32')) {
// Nag danielb
prefix = 'New Issue';
roomId = '!oENPKPHeKwiPfIVHER:matrix.org';
} else {
return; // Unknown action, skip
}
// HTML escape the title
const titleEscaped = title
.replace(/&/g, '&')
.replace(//g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
const body = `${prefix}: ${title} - ${url}`;
const formattedBody = `${prefix}: ${titleEscaped}`;
const accessToken = process.env.MATRIX_ACCESS_TOKEN;
const response = await fetch(
`https://matrix.org/_matrix/client/r0/rooms/${roomId}/send/m.room.message`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
body: JSON.stringify({
msgtype: 'm.text',
format: 'org.matrix.custom.html',
body: body,
formatted_body: formattedBody
})
}
);
if (!response.ok) {
throw new Error(`Matrix API request failed: ${response.status} ${response.statusText}`);
}
env:
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}
================================================
FILE: .github/workflows/matrix-bot.yml
================================================
name: Matrix bot
on:
pull_request_target:
types: [opened, closed]
jobs:
notify:
if: github.repository == 'embassy-rs/embassy'
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: send message
uses: actions/github-script@v8
with:
script: |
const action = context.payload.action;
const merged = context.payload.pull_request.merged;
const title = context.payload.pull_request.title;
const url = context.payload.pull_request.html_url;
// Determine message prefix
let prefix;
if (action === 'opened') {
prefix = 'New PR';
} else if (action === 'closed' && merged) {
prefix = 'PR merged';
} else if (action === 'closed' && !merged) {
prefix = 'PR closed without merging';
} else {
return; // Unknown action, skip
}
// HTML escape the title
const titleEscaped = title
.replace(/&/g, '&')
.replace(//g, '>')
.replace(/"/g, '"')
.replace(/'/g, ''');
const body = `${prefix}: ${title} - ${url}`;
const formattedBody = `${prefix}: ${titleEscaped}`;
const roomId = '!YoLPkieCYHGzdjUhOK:matrix.org';
const accessToken = process.env.MATRIX_ACCESS_TOKEN;
const response = await fetch(
`https://matrix.org/_matrix/client/r0/rooms/${roomId}/send/m.room.message`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`
},
body: JSON.stringify({
msgtype: 'm.text',
format: 'org.matrix.custom.html',
body: body,
formatted_body: formattedBody
})
}
);
if (!response.ok) {
throw new Error(`Matrix API request failed: ${response.status} ${response.statusText}`);
}
env:
MATRIX_ACCESS_TOKEN: ${{ secrets.MATRIX_ACCESS_TOKEN }}
================================================
FILE: .gitignore
================================================
target
target_ci
target_ci_stable
Cargo.lock
third_party
webroot
/Cargo.toml
out/
# editor artifacts
.zed
.neoconf.json
*.vim
**/.idea
**/.nvim.lua
**/.cargo
!**/tests/**/.cargo
!**/examples/**/.cargo
================================================
FILE: .helix/languages.toml
================================================
[language-server.rust-analyzer.config.cargo]
allTargets = false
noDefaultFeatures = true
target = "thumbv8m.main-none-eabihf"
features = ["stm32n657x0", "time-driver-any", "unstable-pac", "exti"]
[language-server.rust-analyzer.config.check]
allTargets = false
noDefaultFeatures = true
target = "thumbv8m.main-none-eabihf"
features = ["stm32n657x0", "time-driver-any", "unstable-pac", "exti"]
================================================
FILE: .vscode/.gitignore
================================================
*.cortex-debug.*.json
launch.json
tasks.json
*.cfg
================================================
FILE: .vscode/extensions.json
================================================
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"rust-lang.rust-analyzer",
"tamasfe.even-better-toml",
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
================================================
FILE: .vscode/settings.json
================================================
{
"[toml]": {
"editor.formatOnSave": false
},
"[markdown]": {
"editor.formatOnSave": false
},
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"rust-analyzer.check.allTargets": false,
"rust-analyzer.check.noDefaultFeatures": true,
"rust-analyzer.cargo.noDefaultFeatures": true,
"rust-analyzer.showUnlinkedFileNotification": false,
// Uncomment the target of your chip.
//"rust-analyzer.cargo.target": "thumbv6m-none-eabi",
//"rust-analyzer.cargo.target": "thumbv7m-none-eabi",
"rust-analyzer.cargo.target": "thumbv7em-none-eabi",
//"rust-analyzer.cargo.target": "thumbv7em-none-eabihf",
//"rust-analyzer.cargo.target": "thumbv8m.main-none-eabihf",
"rust-analyzer.cargo.features": [
// Comment out these features when working on the examples. Most example crates do not have any cargo features.
"stm32f107rb",
"time-driver-any",
"unstable-pac",
"exti",
"rt",
],
"rust-analyzer.linkedProjects": [
"embassy-stm32/Cargo.toml",
// To work on the examples, comment the line above and all of the cargo.features lines,
// then uncomment ONE line below to select the chip you want to work on.
// This makes rust-analyzer work on the example crate and all its dependencies.
// "examples/mspm0c1104/Cargo.toml",
// "examples/mspm0g3507/Cargo.toml",
// "examples/mspm0g3519/Cargo.toml",
// "examples/mspm0g5187/Cargo.toml",
// "examples/mspm0l1306/Cargo.toml",
// "examples/mspm0l2228/Cargo.toml",
// "examples/nrf52840-rtic/Cargo.toml",
// "examples/nrf5340/Cargo.toml",
// "examples/nrf-rtos-trace/Cargo.toml",
// "examples/mimxrt1011/Cargo.toml",
// "examples/mimxrt1062-evk/Cargo.toml",
// "examples/rp/Cargo.toml",
// "examples/std/Cargo.toml",
// "examples/stm32c0/Cargo.toml",
// "examples/stm32f0/Cargo.toml",
// "examples/stm32f1/Cargo.toml",
// "examples/stm32f2/Cargo.toml",
// "examples/stm32f3/Cargo.toml",
// "examples/stm32f334/Cargo.toml",
// "examples/stm32f4/Cargo.toml",
// "examples/stm32f7/Cargo.toml",
// "examples/stm32g0/Cargo.toml",
// "examples/stm32g4/Cargo.toml",
// "examples/stm32h5/Cargo.toml",
// "examples/stm32h7/Cargo.toml",
// "examples/stm32l0/Cargo.toml",
// "examples/stm32l1/Cargo.toml",
// "examples/stm32l4/Cargo.toml",
// "examples/stm32l5/Cargo.toml",
// "examples/stm32u5/Cargo.toml",
// "examples/stm32wb/Cargo.toml",
// "examples/stm32wl/Cargo.toml",
// "examples/wasm/Cargo.toml",
],
}
================================================
FILE: LICENSE-APACHE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright (c) Embassy project contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: LICENSE-CC-BY-SA
================================================
Attribution-ShareAlike 4.0 International
=======================================================================
Creative Commons Corporation ("Creative Commons") is not a law firm and
does not provide legal services or legal advice. Distribution of
Creative Commons public licenses does not create a lawyer-client or
other relationship. Creative Commons makes its licenses and related
information available on an "as-is" basis. Creative Commons gives no
warranties regarding its licenses, any material licensed under their
terms and conditions, or any related information. Creative Commons
disclaims all liability for damages resulting from their use to the
fullest extent possible.
Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and
conditions that creators and other rights holders may use to share
original works of authorship and other material subject to copyright
and certain other rights specified in the public license below. The
following considerations are for informational purposes only, are not
exhaustive, and do not form part of our licenses.
Considerations for licensors: Our public licenses are
intended for use by those authorized to give the public
permission to use material in ways otherwise restricted by
copyright and certain other rights. Our licenses are
irrevocable. Licensors should read and understand the terms
and conditions of the license they choose before applying it.
Licensors should also secure all rights necessary before
applying our licenses so that the public can reuse the
material as expected. Licensors should clearly mark any
material not subject to the license. This includes other CC-
licensed material, or material used under an exception or
limitation to copyright. More considerations for licensors:
wiki.creativecommons.org/Considerations_for_licensors
Considerations for the public: By using one of our public
licenses, a licensor grants the public permission to use the
licensed material under specified terms and conditions. If
the licensor's permission is not necessary for any reason--for
example, because of any applicable exception or limitation to
copyright--then that use is not regulated by the license. Our
licenses grant only permissions under copyright and certain
other rights that a licensor has authority to grant. Use of
the licensed material may still be restricted for other
reasons, including because others have copyright or other
rights in the material. A licensor may make special requests,
such as asking that all changes be marked or described.
Although not required by our licenses, you are encouraged to
respect those requests where reasonable. More considerations
for the public:
wiki.creativecommons.org/Considerations_for_licensees
=======================================================================
Creative Commons Attribution-ShareAlike 4.0 International Public
License
By exercising the Licensed Rights (defined below), You accept and agree
to be bound by the terms and conditions of this Creative Commons
Attribution-ShareAlike 4.0 International Public License ("Public
License"). To the extent this Public License may be interpreted as a
contract, You are granted the Licensed Rights in consideration of Your
acceptance of these terms and conditions, and the Licensor grants You
such rights in consideration of benefits the Licensor receives from
making the Licensed Material available under these terms and
conditions.
Section 1 -- Definitions.
a. Adapted Material means material subject to Copyright and Similar
Rights that is derived from or based upon the Licensed Material
and in which the Licensed Material is translated, altered,
arranged, transformed, or otherwise modified in a manner requiring
permission under the Copyright and Similar Rights held by the
Licensor. For purposes of this Public License, where the Licensed
Material is a musical work, performance, or sound recording,
Adapted Material is always produced where the Licensed Material is
synched in timed relation with a moving image.
b. Adapter's License means the license You apply to Your Copyright
and Similar Rights in Your contributions to Adapted Material in
accordance with the terms and conditions of this Public License.
c. BY-SA Compatible License means a license listed at
creativecommons.org/compatiblelicenses, approved by Creative
Commons as essentially the equivalent of this Public License.
d. Copyright and Similar Rights means copyright and/or similar rights
closely related to copyright including, without limitation,
performance, broadcast, sound recording, and Sui Generis Database
Rights, without regard to how the rights are labeled or
categorized. For purposes of this Public License, the rights
specified in Section 2(b)(1)-(2) are not Copyright and Similar
Rights.
e. Effective Technological Measures means those measures that, in the
absence of proper authority, may not be circumvented under laws
fulfilling obligations under Article 11 of the WIPO Copyright
Treaty adopted on December 20, 1996, and/or similar international
agreements.
f. Exceptions and Limitations means fair use, fair dealing, and/or
any other exception or limitation to Copyright and Similar Rights
that applies to Your use of the Licensed Material.
g. License Elements means the license attributes listed in the name
of a Creative Commons Public License. The License Elements of this
Public License are Attribution and ShareAlike.
h. Licensed Material means the artistic or literary work, database,
or other material to which the Licensor applied this Public
License.
i. Licensed Rights means the rights granted to You subject to the
terms and conditions of this Public License, which are limited to
all Copyright and Similar Rights that apply to Your use of the
Licensed Material and that the Licensor has authority to license.
j. Licensor means the individual(s) or entity(ies) granting rights
under this Public License.
k. Share means to provide material to the public by any means or
process that requires permission under the Licensed Rights, such
as reproduction, public display, public performance, distribution,
dissemination, communication, or importation, and to make material
available to the public including in ways that members of the
public may access the material from a place and at a time
individually chosen by them.
l. Sui Generis Database Rights means rights other than copyright
resulting from Directive 96/9/EC of the European Parliament and of
the Council of 11 March 1996 on the legal protection of databases,
as amended and/or succeeded, as well as other essentially
equivalent rights anywhere in the world.
m. You means the individual or entity exercising the Licensed Rights
under this Public License. Your has a corresponding meaning.
Section 2 -- Scope.
a. License grant.
1. Subject to the terms and conditions of this Public License,
the Licensor hereby grants You a worldwide, royalty-free,
non-sublicensable, non-exclusive, irrevocable license to
exercise the Licensed Rights in the Licensed Material to:
a. reproduce and Share the Licensed Material, in whole or
in part; and
b. produce, reproduce, and Share Adapted Material.
2. Exceptions and Limitations. For the avoidance of doubt, where
Exceptions and Limitations apply to Your use, this Public
License does not apply, and You do not need to comply with
its terms and conditions.
3. Term. The term of this Public License is specified in Section
6(a).
4. Media and formats; technical modifications allowed. The
Licensor authorizes You to exercise the Licensed Rights in
all media and formats whether now known or hereafter created,
and to make technical modifications necessary to do so. The
Licensor waives and/or agrees not to assert any right or
authority to forbid You from making technical modifications
necessary to exercise the Licensed Rights, including
technical modifications necessary to circumvent Effective
Technological Measures. For purposes of this Public License,
simply making modifications authorized by this Section 2(a)
(4) never produces Adapted Material.
5. Downstream recipients.
a. Offer from the Licensor -- Licensed Material. Every
recipient of the Licensed Material automatically
receives an offer from the Licensor to exercise the
Licensed Rights under the terms and conditions of this
Public License.
b. Additional offer from the Licensor -- Adapted Material.
Every recipient of Adapted Material from You
automatically receives an offer from the Licensor to
exercise the Licensed Rights in the Adapted Material
under the conditions of the Adapter's License You apply.
c. No downstream restrictions. You may not offer or impose
any additional or different terms or conditions on, or
apply any Effective Technological Measures to, the
Licensed Material if doing so restricts exercise of the
Licensed Rights by any recipient of the Licensed
Material.
6. No endorsement. Nothing in this Public License constitutes or
may be construed as permission to assert or imply that You
are, or that Your use of the Licensed Material is, connected
with, or sponsored, endorsed, or granted official status by,
the Licensor or others designated to receive attribution as
provided in Section 3(a)(1)(A)(i).
b. Other rights.
1. Moral rights, such as the right of integrity, are not
licensed under this Public License, nor are publicity,
privacy, and/or other similar personality rights; however, to
the extent possible, the Licensor waives and/or agrees not to
assert any such rights held by the Licensor to the limited
extent necessary to allow You to exercise the Licensed
Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this
Public License.
3. To the extent possible, the Licensor waives any right to
collect royalties from You for the exercise of the Licensed
Rights, whether directly or through a collecting society
under any voluntary or waivable statutory or compulsory
licensing scheme. In all other cases the Licensor expressly
reserves any right to collect such royalties.
Section 3 -- License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the
following conditions.
a. Attribution.
1. If You Share the Licensed Material (including in modified
form), You must:
a. retain the following if it is supplied by the Licensor
with the Licensed Material:
i. identification of the creator(s) of the Licensed
Material and any others designated to receive
attribution, in any reasonable manner requested by
the Licensor (including by pseudonym if
designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of
warranties;
v. a URI or hyperlink to the Licensed Material to the
extent reasonably practicable;
b. indicate if You modified the Licensed Material and
retain an indication of any previous modifications; and
c. indicate the Licensed Material is licensed under this
Public License, and include the text of, or the URI or
hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any
reasonable manner based on the medium, means, and context in
which You Share the Licensed Material. For example, it may be
reasonable to satisfy the conditions by providing a URI or
hyperlink to a resource that includes the required
information.
3. If requested by the Licensor, You must remove any of the
information required by Section 3(a)(1)(A) to the extent
reasonably practicable.
b. ShareAlike.
In addition to the conditions in Section 3(a), if You Share
Adapted Material You produce, the following conditions also apply.
1. The Adapter's License You apply must be a Creative Commons
license with the same License Elements, this version or
later, or a BY-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the
Adapter's License You apply. You may satisfy this condition
in any reasonable manner based on the medium, means, and
context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms
or conditions on, or apply any Effective Technological
Measures to, Adapted Material that restrict exercise of the
rights granted under the Adapter's License You apply.
Section 4 -- Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that
apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right
to extract, reuse, reproduce, and Share all or a substantial
portion of the contents of the database;
b. if You include all or a substantial portion of the database
contents in a database in which You have Sui Generis Database
Rights, then the database in which You have Sui Generis Database
Rights (but not its individual contents) is Adapted Material,
including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share
all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not
replace Your obligations under this Public License where the Licensed
Rights include other Copyright and Similar Rights.
Section 5 -- Disclaimer of Warranties and Limitation of Liability.
a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
c. The disclaimer of warranties and limitation of liability provided
above shall be interpreted in a manner that, to the extent
possible, most closely approximates an absolute disclaimer and
waiver of all liability.
Section 6 -- Term and Termination.
a. This Public License applies for the term of the Copyright and
Similar Rights licensed here. However, if You fail to comply with
this Public License, then Your rights under this Public License
terminate automatically.
b. Where Your right to use the Licensed Material has terminated under
Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided
it is cured within 30 days of Your discovery of the
violation; or
2. upon express reinstatement by the Licensor.
For the avoidance of doubt, this Section 6(b) does not affect any
right the Licensor may have to seek remedies for Your violations
of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the
Licensed Material under separate terms or conditions or stop
distributing the Licensed Material at any time; however, doing so
will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
License.
Section 7 -- Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different
terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the
Licensed Material not stated herein are separate from and
independent of the terms and conditions of this Public License.
Section 8 -- Interpretation.
a. For the avoidance of doubt, this Public License does not, and
shall not be interpreted to, reduce, limit, restrict, or impose
conditions on any use of the Licensed Material that could lawfully
be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is
deemed unenforceable, it shall be automatically reformed to the
minimum extent necessary to make it enforceable. If the provision
cannot be reformed, it shall be severed from this Public License
without affecting the enforceability of the remaining terms and
conditions.
c. No term or condition of this Public License will be waived and no
failure to comply consented to unless expressly agreed to by the
Licensor.
d. Nothing in this Public License constitutes or may be interpreted
as a limitation upon, or waiver of, any privileges and immunities
that apply to the Licensor or You, including from the legal
processes of any jurisdiction or authority.
=======================================================================
Creative Commons is not a party to its public
licenses. Notwithstanding, Creative Commons may elect to apply one of
its public licenses to material it publishes and in those instances
will be considered the “Licensor.” The text of the Creative Commons
public licenses is dedicated to the public domain under the CC0 Public
Domain Dedication. Except for the limited purpose of indicating that
material is shared under a Creative Commons public license or as
otherwise permitted by the Creative Commons policies published at
creativecommons.org/policies, Creative Commons does not authorize the
use of the trademark "Creative Commons" or any other trademark or logo
of Creative Commons without its prior written consent including,
without limitation, in connection with any unauthorized modifications
to any of its public licenses or any other arrangements,
understandings, or agreements concerning use of licensed material. For
the avoidance of doubt, this paragraph does not form part of the
public licenses.
Creative Commons may be contacted at creativecommons.org.
================================================
FILE: LICENSE-MIT
================================================
Copyright (c) Embassy project contributors
Permission is hereby granted, free of charge, to any
person obtaining a copy of this software and associated
documentation files (the "Software"), to deal in the
Software without restriction, including without
limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice
shall be included in all copies or substantial portions
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
================================================
FILE: NOTICE.md
================================================
# Notices for Embassy
This content is produced and maintained by the Embassy project contributors.
## Copyright
All content is the property of the respective authors or their employers.
For more information regarding authorship of content, please consult the
listed source code repository logs.
## Declared Project Licenses
This program and the accompanying materials are made available under the terms
of the Apache Software License 2.0 which is available at
https://www.apache.org/licenses/LICENSE-2.0, or the MIT license which is
available at https://opensource.org/licenses/MIT
================================================
FILE: README.md
================================================
# Embassy
Embassy is the next-generation framework for embedded applications. Write safe, correct, and energy-efficient embedded code faster, using the Rust programming language, its async facilities, and the Embassy libraries.
## [Documentation](https://embassy.dev/book/index.html) - [API reference](https://docs.embassy.dev/) - [Website](https://embassy.dev/) - [Chat](https://matrix.to/#/#embassy-rs:matrix.org)
## Rust + async ❤️ embedded
The Rust programming language is blazingly fast and memory-efficient, with no runtime, garbage collector, or OS. It catches a wide variety of bugs at compile time, thanks to its full memory- and thread-safety, and expressive type system.
Rust's [async/await](https://rust-lang.github.io/async-book/) allows for unprecedentedly easy and efficient multitasking in embedded systems. Tasks get transformed at compile time into state machines that get run cooperatively. It requires no dynamic memory allocation and runs on a single stack, so no per-task stack size tuning is required. It obsoletes the need for a traditional RTOS with kernel context switching, and is [faster and smaller than one!](https://tweedegolf.nl/en/blog/65/async-rust-vs-rtos-showdown)
## Batteries included
- **Hardware Abstraction Layers**
- HALs implement safe, idiomatic Rust APIs to use the hardware capabilities, so raw register manipulation is not needed. The Embassy project maintains HALs for select hardware, but you can still use HALs from other projects with Embassy.
- [embassy-stm32](https://docs.embassy.dev/embassy-stm32/), for all STM32 microcontroller families.
- [embassy-nrf](https://docs.embassy.dev/embassy-nrf/), for the Nordic Semiconductor nRF52, nRF53, nRF54 and nRF91 series.
- [embassy-rp](https://docs.embassy.dev/embassy-rp/), for the Raspberry Pi RP2040 and RP23xx microcontrollers.
- [embassy-mspm0](https://docs.embassy.dev/embassy-mspm0/), for the Texas Instruments MSPM0 microcontrollers.
- [embassy-mcxa](https://docs.embassy.dev/embassy-mcxa/), for NXP's MCX-A series of microcontrollers.
- [esp-rs](https://github.com/esp-rs), for the Espressif Systems ESP32 series of chips.
- Embassy HAL support for Espressif chips, as well as Async Wi-Fi, Bluetooth, and ESP-NOW, is being developed in the [esp-rs/esp-hal](https://github.com/esp-rs/esp-hal) repository.
- [ch32-hal](https://github.com/ch32-rs/ch32-hal), for the WCH 32-bit RISC-V(CH32V) series of chips.
- [mpfs-hal](https://github.com/AlexCharlton/mpfs-hal), for the Microchip PolarFire SoC.
- [py32-hal](https://github.com/py32-rs/py32-hal), for the Puya Semiconductor PY32 series of microcontrollers.
- **Time that Just Works** -
No more messing with hardware timers. [embassy_time](https://docs.embassy.dev/embassy-time) provides Instant, Duration, and Timer types that are globally available and never overflow.
- **Real-time ready** -
Tasks on the same async executor run cooperatively, but you can create multiple executors with different priorities so that higher priority tasks preempt lower priority ones. See the [example](https://github.com/embassy-rs/embassy/blob/main/examples/nrf52840/src/bin/multiprio.rs).
- **Low-power ready** -
Easily build devices with years of battery life. The async executor automatically puts the core to sleep when there's no work to do. Tasks are woken by interrupts, there is no busy-loop polling while waiting.
- **Networking** -
The [embassy-net](https://docs.embassy.dev/embassy-net/) network stack implements extensive networking functionality, including Ethernet, IP, TCP, UDP, ICMP, and DHCP. Async drastically simplifies managing timeouts and serving multiple connections concurrently.
- **Bluetooth**
- The [trouble](https://github.com/embassy-rs/trouble) crate provides a Bluetooth Low Energy 4.x and 5.x Host that runs on any microcontroller implementing the [bt-hci](https://github.com/embassy-rs/bt-hci) traits (currently
`nRF52`, `nrf54`, `rp2040`, `rp23xx` and `esp32` and `serial` controllers are supported).
- The [nrf-softdevice](https://github.com/embassy-rs/nrf-softdevice) crate provides Bluetooth Low Energy 4.x and 5.x support for nRF52 microcontrollers.
- The [embassy-stm32-wpan](https://github.com/embassy-rs/embassy/tree/main/embassy-stm32-wpan) crate provides Bluetooth Low Energy 5.x support for stm32wb microcontrollers.
- **LoRa** -
The [lora-rs](https://github.com/lora-rs/lora-rs) project provides an async LoRa and LoRaWAN stack that works well on Embassy.
- **USB** -
[embassy-usb](https://docs.embassy.dev/embassy-usb/) implements a device-side USB stack. Implementations for common classes such as USB serial (CDC ACM) and USB HID are available, and a rich builder API allows building your own.
- **Bootloader and DFU** -
[embassy-boot](https://github.com/embassy-rs/embassy/tree/main/embassy-boot) is a lightweight bootloader supporting firmware application upgrades in a power-fail-safe way, with trial boots and rollbacks.
## Sneak peek
```rust,ignore
use defmt::info;
use embassy_executor::Spawner;
use embassy_time::{Duration, Timer};
use embassy_nrf::gpio::{AnyPin, Input, Level, Output, OutputDrive, Pin, Pull};
use embassy_nrf::{Peri, Peripherals};
// Declare async tasks
#[embassy_executor::task]
async fn blink(pin: Peri<'static, AnyPin>) {
let mut led = Output::new(pin, Level::Low, OutputDrive::Standard);
loop {
// Timekeeping is globally available, no need to mess with hardware timers.
led.set_high();
Timer::after_millis(150).await;
led.set_low();
Timer::after_millis(150).await;
}
}
// Main is itself an async task as well.
#[embassy_executor::main]
async fn main(spawner: Spawner) {
let p = embassy_nrf::init(Default::default());
// Spawned tasks run in the background, concurrently.
spawner.spawn(blink(p.P0_13.into()).unwrap());
let mut button = Input::new(p.P0_11, Pull::Up);
loop {
// Asynchronously wait for GPIO events, allowing other tasks
// to run, or the core to sleep.
button.wait_for_low().await;
info!("Button pressed!");
button.wait_for_high().await;
info!("Button released!");
}
}
```
## Examples
Examples are found in the
`examples/` folder separated by the chip manufacturer they are designed to run on. For example:
* `examples/nrf52840` run on the
`nrf52840-dk` board (PCA10056) but should be easily adaptable to other nRF52 chips and boards.
* `examples/nrf5340` run on the `nrf5340-dk` board (PCA10095).
* `examples/stm32xx` for the various STM32 families.
* `examples/rp` are for the RP2040 and RP235x chips.
* `examples/mcxa` run on the `FRDM-MCXA266` board.
* `examples/std` are designed to run locally on your PC.
### Running examples
- Install `probe-rs` following the instructions at .
- Change directory to the sample's base directory. For example:
```bash
cd examples/nrf52840
```
- Ensure `Cargo.toml` sets the right feature for the name of the chip you are programming.
If this name is incorrect, the example may fail to run or immediately crash
after being programmed.
- Ensure `.cargo/config.toml` contains the name of the chip you are programming.
- Run the example
For example:
```bash
cargo run --release --bin blinky
```
For more help getting started, see [Getting Started][1] and [Running the Examples][2].
## Developing Embassy with Rust Analyzer-based editors
The [Rust Analyzer](https://rust-analyzer.github.io/) is used by [Visual Studio Code](https://code.visualstudio.com/)
and others. Given the multiple targets that Embassy serves, there is no Cargo workspace file. Instead, the Rust Analyzer
must be told of the target project to work with. In the case of Visual Studio Code,
please refer to the `.vscode/settings.json` file's `rust-analyzer.linkedProjects`setting.
## Minimum supported Rust version (MSRV)
Embassy is guaranteed to compile on stable Rust 1.75 and up. It *might*
compile with older versions, but that may change in any new patch release.
## Why the name?
EMBedded ASYnc! :)
## License
Embassy is licensed under either of
- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or
)
- MIT license ([LICENSE-MIT](LICENSE-MIT) or )
at your option.
## Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
dual licensed as above, without any additional terms or conditions.
[1]: https://embassy-rs.github.io/embassy-book/embassy/dev/getting_started.html
[2]: https://github.com/embassy-rs/embassy/wiki/Running-the-Examples
================================================
FILE: RELEASE.md
================================================
# RELEASE.md
This document outlines the process for releasing Embassy crates using `cargo-release` and the `release/bump-dependency.sh` script.
When releasing a crate, keep in mind that you may need to recursively release dependencies as well.
## Prerequisites
- Install [`cargo-release`](https://github.com/crate-ci/cargo-release):
```sh
cargo binstall cargo-release
## Crate release
Check if there are changes to the public API since the last release. If there is a breaking change, follow
the process for creating a minor release. Otherewise, follow the process for creating a new patch release.
Keep in mind that some crates may need the --features and --target flags passed to cargo release. For more information on that,
look at the `Cargo.toml` files.
### Patch release (no breaking public API changes)
```
cd embassy-nrf/
cargo release patch --features time,defmt,unstable-pac,gpiote,time-driver-rtc1,nrf52840 --target thumbv7em-none-eabi
# If dry-run is OK (no missing dependencies on crates.io)
cargo release patch --execute --features time,defmt,unstable-pac,gpiote,time-driver-rtc1,nrf52840 --target thumbv7em-none-eabi
```
### Minor release
```
# Bump versions in crate files
./release/bump-dependency.sh embassy-nrf 0.4.0
# Commit version bump
git commit -am 'chore: update to `embassy-nrf` v0.4.0'
# Release crate
cd embassy-nrf/
cargo release minor --features time,defmt,unstable-pac,gpiote,time-driver-rtc1,nrf52840 --target thumbv7em-none-eabi
# If dry-run is OK (no missing dependencies on crates.io)
cargo release minor --execute --features time,defmt,unstable-pac,gpiote,time-driver-rtc1,nrf52840 --target thumbv7em-none-eabi
```
## Push tags
Push the git tags that `cargo release` created earlier:
```
git push --tags
```
## Reference
* [PR introducing release automation](https://github.com/embassy-rs/embassy/pull/4289)
================================================
FILE: ci-nightly.sh
================================================
#!/bin/bash
set -eo pipefail
export RUSTFLAGS=-Dwarnings
export DEFMT_LOG=trace,embassy_hal_internal=debug,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info
if [[ -z "${CARGO_TARGET_DIR}" ]]; then
export CARGO_TARGET_DIR=target_ci
fi
cargo embassy-devtool build --group nightly
================================================
FILE: ci-xtensa.sh
================================================
#!/bin/bash
set -eo pipefail
export RUSTFLAGS=-Dwarnings
export DEFMT_LOG=trace,embassy_hal_internal=debug,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info
export RUSTUP_TOOLCHAIN=esp
if [[ -z "${CARGO_TARGET_DIR}" ]]; then
export CARGO_TARGET_DIR=target_ci
fi
cargo embassy-devtool build --group xtensa
================================================
FILE: ci.sh
================================================
#!/bin/bash
set -eo pipefail
if ! command -v cargo-batch &> /dev/null; then
echo "cargo-batch could not be found. Install it with the following command:"
echo ""
echo " cargo install --git https://github.com/embassy-rs/cargo-batch cargo --bin cargo-batch --locked"
echo ""
exit 1
fi
if ! command -v cargo-embassy-devtool &> /dev/null; then
echo "cargo-embassy-devtool could not be found. Install it with the following command:"
echo ""
echo " cargo install --git https://github.com/embassy-rs/cargo-embassy-devtool --locked"
echo ""
exit 1
fi
export RUSTFLAGS=-Dwarnings
export DEFMT_LOG=trace,embassy_hal_internal=debug,embassy_net_esp_hosted=debug,cyw43=info,cyw43_pio=info,smoltcp=info
if [[ -z "${CARGO_TARGET_DIR}" ]]; then
export CARGO_TARGET_DIR=target_ci
fi
cargo embassy-devtool build
# temporarily disabled, these boards are dead.
rm -rf out/tests/stm32f103c8
rm -rf out/tests/nrf52840-dk
rm -rf out/tests/nrf52833-dk
rm -rf out/tests/nrf5340-dk
# disabled because these boards are not on the shelf
rm -rf out/tests/mspm0g3507
rm out/tests/stm32wb55rg/wpan_mac
rm out/tests/stm32wb55rg/wpan_ble
# unstable, I think it's running out of RAM?
rm out/tests/stm32f207zg/eth
# temporarily disabled, flaky.
rm out/tests/stm32f207zg/usart_rx_ringbuffered
rm out/tests/stm32l152re/usart_rx_ringbuffered
# doesn't work, gives "noise error", no idea why. usart_dma does pass.
rm out/tests/stm32u5a5zj/usart
# probe-rs error: "multi-core ram flash start not implemented yet"
# As of 2025-02-17 these tests work when run from flash
rm out/tests/pimoroni-pico-plus-2/multicore
rm out/tests/pimoroni-pico-plus-2/gpio_multicore
rm out/tests/pimoroni-pico-plus-2/spinlock_mutex_multicore
# Doesn't work when run from ram on the 2350
rm out/tests/pimoroni-pico-plus-2/flash
# This test passes locally but fails on the HIL, no idea why
rm out/tests/pimoroni-pico-plus-2/i2c
# The pico2 plus doesn't have the adcs hooked up like the picoW does.
rm out/tests/pimoroni-pico-plus-2/adc
# temporarily disabled
rm out/tests/pimoroni-pico-plus-2/pwm
rm out/tests/frdm-mcx-a266/trng
# flaky
rm out/tests/rpi-pico/pwm
rm out/tests/rpi-pico/cyw43-perf
rm out/tests/rpi-pico/uart_buffered
rm out/tests/rpi-pico/spi_async
rm out/tests/stm32h563zi/usart_dma
# tests are implemented but the HIL test farm doesn't actually have these boards, yet
rm -rf out/tests/stm32c071rb
rm -rf out/tests/stm32f100rd
rm -rf out/tests/stm32f107vc
if [[ -z "${TELEPROBE_TOKEN-}" ]]; then
echo No teleprobe token found, skipping running HIL tests
exit
fi
teleprobe client run -r out/tests
================================================
FILE: cyw43/CHANGELOG.md
================================================
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## Unreleased - ReleaseDate
## 0.7.0 - 2026-03-10
- Reset WPA security before creating secure AP
- Add `get_rssi()` to `Controller`
- Implement link state monitoring
- Always unsubscribe to cyw43 events (fix event leak)
- Add SDIO support for STM32
- Allow specifying nvram, get LWB+ working
- Improve join handling with better error reporting
- Replace `num_enum` dependency with internal macro
- Bump bt-hci to 0.8.0.
- Update to embedded-io 0.7
- Update embassy-sync to 0.8.0
- Update embassy-net-driver-channel to 0.4.0
## 0.6.0 - 2025-11-27
- Updated documentation for Control::join() #4678
- Bump bt-hci to 0.6.0.
- Add error handling to HCI transport implementation.
- Reset WPA security on AP creation #4709
## 0.5.0 - 2025-08-28
- bump bt-hci to 0.4.0
## 0.4.1 - 2025-08-26 (yanked)
- bump bt-hci to 0.4.0
## 0.4.0 - 2025-07-15
- bump embassy-sync to 0.7.0
- bump bt-hci to 0.3.0
- make State::new const fn
## 0.3.0 - 2025-01-05
- Update `embassy-time` to 0.4.0
- Add Bluetooth support.
- Add WPA3 support.
- Expand wifi security configuration options.
## 0.2.0 - 2024-08-05
- Update to new versions of embassy-{time,sync}
- Add more fields to the BssInfo packet struct #2461
- Extend the Scan API #2282
- Reuse buf to reduce stack usage #2580
- Add MAC address getter to cyw43 controller #2818
- Add function to join WPA2 network with precomputed PSK. #2885
- Add function to close soft AP. #3042
- Fixing missing re-export #3211
## 0.1.0 - 2024-01-11
- First release
================================================
FILE: cyw43/Cargo.toml
================================================
[package]
name = "cyw43"
version = "0.7.0"
edition = "2024"
description = "Rust driver for the CYW43439 WiFi chip, used in the Raspberry Pi Pico W."
keywords = ["embedded", "cyw43", "embassy-net", "embedded-hal-async", "wifi"]
categories = ["embedded", "hardware-support", "no-std", "network-programming", "asynchronous"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/embassy-rs/embassy"
documentation = "https://docs.embassy.dev/cyw43"
[features]
defmt = ["dep:defmt", "heapless/defmt", "embassy-time/defmt", "bt-hci?/defmt", "embedded-io-async?/defmt"]
log = ["dep:log", "dep:derive_more", "derive_more/display"]
bluetooth = ["dep:bt-hci", "dep:embedded-io-async"]
# Fetch console logs from the WiFi firmware and forward them to `log` or `defmt`.
firmware-logs = []
[dependencies]
embassy-time = { version = "0.5.1", path = "../embassy-time"}
embassy-sync = { version = "0.8.0", path = "../embassy-sync"}
embassy-futures = { version = "0.1.2", path = "../embassy-futures"}
embassy-net-driver-channel = { version = "0.4.0", path = "../embassy-net-driver-channel"}
defmt = { version = "1.0.1", optional = true }
log = { version = "0.4.17", optional = true }
derive_more = { version = "2.1.1", optional = true, default-features =false }
cortex-m = "0.7.6"
cortex-m-rt = "0.7.0"
futures = { version = "0.3.17", default-features = false, features = ["async-await", "cfg-target-has-atomic", "unstable"] }
embedded-hal-1 = { package = "embedded-hal", version = "1.0" }
embedded-hal-async = { version = "1.0" }
heapless = "0.9"
aligned = "0.4.3"
# Bluetooth deps
embedded-io-async = { version = "0.7.0", optional = true }
bt-hci = { version = "0.8", optional = true }
[package.metadata.embassy]
build = [
{target = "thumbv6m-none-eabi", features = []},
{target = "thumbv6m-none-eabi", features = ["log"]},
{target = "thumbv6m-none-eabi", features = ["defmt"]},
{target = "thumbv6m-none-eabi", features = ["firmware-logs", "log"]},
{target = "thumbv6m-none-eabi", features = ["defmt", "firmware-logs"]},
{target = "thumbv6m-none-eabi", features = ["bluetooth", "firmware-logs", "log"]},
{target = "thumbv6m-none-eabi", features = ["bluetooth", "defmt", "firmware-logs"]},
]
[package.metadata.embassy_docs]
src_base = "https://github.com/embassy-rs/embassy/blob/cyw43-v$VERSION/cyw43/src/"
src_base_git = "https://github.com/embassy-rs/embassy/blob/$COMMIT/cyw43/src/"
target = "thumbv6m-none-eabi"
features = ["defmt", "firmware-logs"]
[package.metadata.docs.rs]
features = ["defmt", "firmware-logs"]
================================================
FILE: cyw43/README.md
================================================
# cyw43
Rust driver for the CYW43439 wifi+bluetooth chip. Implementation based on [Infineon/wifi-host-driver](https://github.com/Infineon/wifi-host-driver).
Works on the following boards:
- Raspberry Pi Pico W (RP2040)
- Raspberry Pi Pico 2 W (RP2350A)
- Pimoroni Pico Plus 2 W (RP2350B)
- Any board with Raspberry Pi RM2 radio module.
- Any board with the CYW43439 chip, and possibly others if the protocol is similar enough.
## Features
Working:
- WiFi support
- Station mode (joining an AP).
- AP mode (creating an AP)
- Scanning
- Sending and receiving Ethernet frames.
- Using the default MAC address.
- [`embassy-net`](https://embassy.dev) integration.
- RP2040 PIO driver for the nonstandard half-duplex SPI used in the Pico W.
- Using IRQ for device events, no busy polling.
- GPIO support (for LED on the Pico W).
- Bluetooth support
- Bluetooth Classic + LE HCI commands.
- Concurrent operation with WiFi.
- Implements the [bt-hci](https://crates.io/crates/bt-hci) controller traits.
- Works with the [TrouBLE](https://github.com/embassy-rs/trouble) bluetooth LE stack. Check its repo for examples using `cyw43`.
## Running the WiFi examples
- Install `probe-rs` following the instructions at .
- `cd examples/rp`
### Example 1: Scan the wifi stations
- `cargo run --release --bin wifi_scan`
### Example 2: Create an access point (IP and credentials in the code)
- `cargo run --release --bin wifi_ap_tcp_server`
### Example 3: Connect to an existing network and create a server
- `cargo run --release --bin wifi_tcp_server`
After a few seconds, you should see that DHCP picks up an IP address like this
```
11.944489 DEBUG Acquired IP configuration:
11.944517 DEBUG IP address: 192.168.0.250/24
11.944620 DEBUG Default gateway: 192.168.0.33
11.944722 DEBUG DNS server 0: 192.168.0.33
```
This example implements a TCP echo server on port 1234. You can try connecting to it with:
```
nc 192.168.0.250 1234
```
Send it some data, you should see it echoed back and printed in the firmware's logs.
================================================
FILE: cyw43/src/bluetooth.rs
================================================
use core::cell::RefCell;
use core::future::Future;
use core::mem::MaybeUninit;
use bt_hci::transport::WithIndicator;
use bt_hci::{ControllerToHostPacket, FromHciBytes, FromHciBytesError, HostToControllerPacket, PacketKind, WriteHci};
use embassy_futures::yield_now;
use embassy_sync::blocking_mutex::raw::NoopRawMutex;
use embassy_sync::zerocopy_channel;
use embassy_time::{Duration, Timer};
use embedded_io_async::ErrorKind;
use crate::consts::*;
use crate::runner::Bus;
pub use crate::spi::SpiBusCyw43;
use crate::util::round_up;
use crate::{CHIP, util};
pub(crate) struct BtState {
rx: [BtPacketBuf; 4],
tx: [BtPacketBuf; 4],
inner: MaybeUninit>,
}
impl BtState {
pub const fn new() -> Self {
Self {
rx: [const { BtPacketBuf::new() }; 4],
tx: [const { BtPacketBuf::new() }; 4],
inner: MaybeUninit::uninit(),
}
}
}
struct BtStateInnre<'d> {
rx: zerocopy_channel::Channel<'d, NoopRawMutex, BtPacketBuf>,
tx: zerocopy_channel::Channel<'d, NoopRawMutex, BtPacketBuf>,
}
/// Bluetooth driver.
pub struct BtDriver<'d> {
rx: RefCell>,
tx: RefCell>,
}
pub(crate) struct BtRunner<'d> {
pub(crate) tx_chan: zerocopy_channel::Receiver<'d, NoopRawMutex, BtPacketBuf>,
rx_chan: zerocopy_channel::Sender<'d, NoopRawMutex, BtPacketBuf>,
// Bluetooth circular buffers
addr: u32,
h2b_write_pointer: u32,
b2h_read_pointer: u32,
}
const BT_HCI_MTU: usize = 1024;
/// Represents a packet of size MTU.
pub(crate) struct BtPacketBuf {
pub(crate) len: usize,
pub(crate) buf: [u8; BT_HCI_MTU],
}
impl BtPacketBuf {
/// Create a new packet buffer.
pub const fn new() -> Self {
Self {
len: 0,
buf: [0; BT_HCI_MTU],
}
}
}
pub(crate) fn new<'d>(state: &'d mut BtState) -> (BtRunner<'d>, BtDriver<'d>) {
// safety: this is a self-referential struct, however:
// - it can't move while the `'d` borrow is active.
// - when the borrow ends, the dangling references inside the MaybeUninit will never be used again.
let state_uninit: *mut MaybeUninit> =
(&mut state.inner as *mut MaybeUninit>).cast();
let state = unsafe { &mut *state_uninit }.write(BtStateInnre {
rx: zerocopy_channel::Channel::new(&mut state.rx[..]),
tx: zerocopy_channel::Channel::new(&mut state.tx[..]),
});
let (rx_sender, rx_receiver) = state.rx.split();
let (tx_sender, tx_receiver) = state.tx.split();
(
BtRunner {
tx_chan: tx_receiver,
rx_chan: rx_sender,
addr: 0,
h2b_write_pointer: 0,
b2h_read_pointer: 0,
},
BtDriver {
rx: RefCell::new(rx_receiver),
tx: RefCell::new(tx_sender),
},
)
}
pub(crate) struct CybtFwCb<'a> {
pub p_next_line_start: &'a [u8],
}
pub(crate) struct HexFileData<'a> {
pub addr_mode: i32,
pub hi_addr: u16,
pub dest_addr: u32,
pub p_ds: &'a mut [u8],
}
pub(crate) fn read_firmware_patch_line(p_btfw_cb: &mut CybtFwCb, hfd: &mut HexFileData) -> u32 {
let mut abs_base_addr32 = 0;
loop {
let num_bytes = p_btfw_cb.p_next_line_start[0];
p_btfw_cb.p_next_line_start = &p_btfw_cb.p_next_line_start[1..];
let addr = (p_btfw_cb.p_next_line_start[0] as u16) << 8 | p_btfw_cb.p_next_line_start[1] as u16;
p_btfw_cb.p_next_line_start = &p_btfw_cb.p_next_line_start[2..];
let line_type = p_btfw_cb.p_next_line_start[0];
p_btfw_cb.p_next_line_start = &p_btfw_cb.p_next_line_start[1..];
if num_bytes == 0 {
break;
}
hfd.p_ds[..num_bytes as usize].copy_from_slice(&p_btfw_cb.p_next_line_start[..num_bytes as usize]);
p_btfw_cb.p_next_line_start = &p_btfw_cb.p_next_line_start[num_bytes as usize..];
match line_type {
BTFW_HEX_LINE_TYPE_EXTENDED_ADDRESS => {
hfd.hi_addr = (hfd.p_ds[0] as u16) << 8 | hfd.p_ds[1] as u16;
hfd.addr_mode = BTFW_ADDR_MODE_EXTENDED;
}
BTFW_HEX_LINE_TYPE_EXTENDED_SEGMENT_ADDRESS => {
hfd.hi_addr = (hfd.p_ds[0] as u16) << 8 | hfd.p_ds[1] as u16;
hfd.addr_mode = BTFW_ADDR_MODE_SEGMENT;
}
BTFW_HEX_LINE_TYPE_ABSOLUTE_32BIT_ADDRESS => {
abs_base_addr32 = (hfd.p_ds[0] as u32) << 24
| (hfd.p_ds[1] as u32) << 16
| (hfd.p_ds[2] as u32) << 8
| hfd.p_ds[3] as u32;
hfd.addr_mode = BTFW_ADDR_MODE_LINEAR32;
}
BTFW_HEX_LINE_TYPE_DATA => {
hfd.dest_addr = addr as u32;
match hfd.addr_mode {
BTFW_ADDR_MODE_EXTENDED => hfd.dest_addr += (hfd.hi_addr as u32) << 16,
BTFW_ADDR_MODE_SEGMENT => hfd.dest_addr += (hfd.hi_addr as u32) << 4,
BTFW_ADDR_MODE_LINEAR32 => hfd.dest_addr += abs_base_addr32,
_ => {}
}
return num_bytes as u32;
}
_ => {}
}
}
0
}
impl<'a> BtRunner<'a> {
pub(crate) async fn init_bluetooth(&mut self, bus: &mut impl Bus, firmware: &[u8]) {
trace!("init_bluetooth");
bus.bp_write32(CHIP.bluetooth_base_address + BT2WLAN_PWRUP_ADDR, BT2WLAN_PWRUP_WAKE)
.await;
Timer::after(Duration::from_millis(2)).await;
self.upload_bluetooth_firmware(bus, firmware).await;
self.wait_bt_ready(bus).await;
self.init_bt_buffers(bus).await;
self.wait_bt_awake(bus).await;
self.bt_set_host_ready(bus).await;
self.bt_toggle_intr(bus).await;
}
pub(crate) async fn upload_bluetooth_firmware(&mut self, bus: &mut impl Bus, firmware: &[u8]) {
// read version
let version_length = firmware[0];
let _version = &firmware[1..=version_length as usize];
// skip version + 1 extra byte as per cybt_shared_bus_driver.c
let firmware = &firmware[version_length as usize + 2..];
// buffers
let mut data_buffer: [u8; 0x100] = [0; 0x100];
let mut aligned_data_buffer: [u8; 0x100] = [0; 0x100];
// structs
let mut btfw_cb = CybtFwCb {
p_next_line_start: firmware,
};
let mut hfd = HexFileData {
addr_mode: BTFW_ADDR_MODE_EXTENDED,
hi_addr: 0,
dest_addr: 0,
p_ds: &mut data_buffer,
};
loop {
let num_fw_bytes = read_firmware_patch_line(&mut btfw_cb, &mut hfd);
if num_fw_bytes == 0 {
break;
}
let fw_bytes = &hfd.p_ds[0..num_fw_bytes as usize];
let mut dest_start_addr = hfd.dest_addr + CHIP.bluetooth_base_address;
let mut aligned_data_buffer_index: usize = 0;
// pad start
if !util::is_aligned(dest_start_addr, 4) {
let num_pad_bytes = dest_start_addr % 4;
let padded_dest_start_addr = util::round_down(dest_start_addr, 4);
let memory_value = bus.bp_read32(padded_dest_start_addr).await;
let memory_value_bytes = memory_value.to_le_bytes();
// Copy the previous memory value's bytes to the start
for i in 0..num_pad_bytes as usize {
aligned_data_buffer[aligned_data_buffer_index] = memory_value_bytes[i];
aligned_data_buffer_index += 1;
}
// Copy the firmware bytes after the padding bytes
for i in 0..num_fw_bytes as usize {
aligned_data_buffer[aligned_data_buffer_index] = fw_bytes[i];
aligned_data_buffer_index += 1;
}
dest_start_addr = padded_dest_start_addr;
} else {
// Directly copy fw_bytes into aligned_data_buffer if no start padding is required
for i in 0..num_fw_bytes as usize {
aligned_data_buffer[aligned_data_buffer_index] = fw_bytes[i];
aligned_data_buffer_index += 1;
}
}
// pad end
let mut dest_end_addr = dest_start_addr + aligned_data_buffer_index as u32;
if !util::is_aligned(dest_end_addr, 4) {
let offset = dest_end_addr % 4;
let num_pad_bytes_end = 4 - offset;
let padded_dest_end_addr = util::round_down(dest_end_addr, 4);
let memory_value = bus.bp_read32(padded_dest_end_addr).await;
let memory_value_bytes = memory_value.to_le_bytes();
// Append the necessary memory bytes to pad the end of aligned_data_buffer
for i in offset..4 {
aligned_data_buffer[aligned_data_buffer_index] = memory_value_bytes[i as usize];
aligned_data_buffer_index += 1;
}
dest_end_addr += num_pad_bytes_end;
} else {
// pad end alignment not needed
}
let buffer_to_write = &aligned_data_buffer[0..aligned_data_buffer_index as usize];
assert!(dest_start_addr % 4 == 0);
assert!(dest_end_addr % 4 == 0);
assert!(aligned_data_buffer_index % 4 == 0);
bus.bp_write(dest_start_addr, buffer_to_write).await;
}
}
pub(crate) async fn wait_bt_ready(&mut self, bus: &mut impl Bus) {
trace!("wait_bt_ready");
let mut success = false;
for _ in 0..300 {
let val = bus.bp_read32(BT_CTRL_REG_ADDR).await;
trace!("BT_CTRL_REG_ADDR = {:08x}", val);
if val & BTSDIO_REG_FW_RDY_BITMASK != 0 {
success = true;
break;
}
Timer::after(Duration::from_millis(1)).await;
}
assert!(success == true);
}
pub(crate) async fn wait_bt_awake(&mut self, bus: &mut impl Bus) {
trace!("wait_bt_awake");
let mut success = false;
for _ in 0..300 {
let val = bus.bp_read32(BT_CTRL_REG_ADDR).await;
trace!("BT_CTRL_REG_ADDR = {:08x}", val);
if val & BTSDIO_REG_BT_AWAKE_BITMASK != 0 {
success = true;
break;
}
Timer::after(Duration::from_millis(1)).await;
}
assert!(success == true);
}
pub(crate) async fn bt_set_host_ready(&mut self, bus: &mut impl Bus) {
trace!("bt_set_host_ready");
let old_val = bus.bp_read32(HOST_CTRL_REG_ADDR).await;
// TODO: do we need to swap endianness on this read?
let new_val = old_val | BTSDIO_REG_SW_RDY_BITMASK;
bus.bp_write32(HOST_CTRL_REG_ADDR, new_val).await;
}
// TODO: use this
#[allow(dead_code)]
pub(crate) async fn bt_set_awake(&mut self, bus: &mut impl Bus, awake: bool) {
trace!("bt_set_awake");
let old_val = bus.bp_read32(HOST_CTRL_REG_ADDR).await;
// TODO: do we need to swap endianness on this read?
let new_val = if awake {
old_val | BTSDIO_REG_WAKE_BT_BITMASK
} else {
old_val & !BTSDIO_REG_WAKE_BT_BITMASK
};
bus.bp_write32(HOST_CTRL_REG_ADDR, new_val).await;
}
pub(crate) async fn bt_toggle_intr(&mut self, bus: &mut impl Bus) {
trace!("bt_toggle_intr");
let old_val = bus.bp_read32(HOST_CTRL_REG_ADDR).await;
// TODO: do we need to swap endianness on this read?
let new_val = old_val ^ BTSDIO_REG_DATA_VALID_BITMASK;
bus.bp_write32(HOST_CTRL_REG_ADDR, new_val).await;
}
// TODO: use this
#[allow(dead_code)]
pub(crate) async fn bt_set_intr(&mut self, bus: &mut impl Bus) {
trace!("bt_set_intr");
let old_val = bus.bp_read32(HOST_CTRL_REG_ADDR).await;
let new_val = old_val | BTSDIO_REG_DATA_VALID_BITMASK;
bus.bp_write32(HOST_CTRL_REG_ADDR, new_val).await;
}
pub(crate) async fn init_bt_buffers(&mut self, bus: &mut impl Bus) {
trace!("init_bt_buffers");
self.addr = bus.bp_read32(WLAN_RAM_BASE_REG_ADDR).await;
assert!(self.addr != 0);
trace!("wlan_ram_base_addr = {:08x}", self.addr);
bus.bp_write32(self.addr + BTSDIO_OFFSET_HOST2BT_IN, 0).await;
bus.bp_write32(self.addr + BTSDIO_OFFSET_HOST2BT_OUT, 0).await;
bus.bp_write32(self.addr + BTSDIO_OFFSET_BT2HOST_IN, 0).await;
bus.bp_write32(self.addr + BTSDIO_OFFSET_BT2HOST_OUT, 0).await;
}
async fn bt_bus_request(&mut self, bus: &mut impl Bus) {
// TODO: CYW43_THREAD_ENTER mutex?
self.bt_set_awake(bus, true).await;
self.wait_bt_awake(bus).await;
}
pub(crate) async fn hci_write(&mut self, bus: &mut impl Bus) {
self.bt_bus_request(bus).await;
// NOTE(unwrap): we only call this when we do have a packet in the queue.
let buf = self.tx_chan.try_receive().unwrap();
debug!("HCI tx: {:02x}", crate::fmt::Bytes(&buf.buf[..buf.len]));
let len = buf.len as u32 - 1; // len doesn't include hci type byte
let rounded_len = round_up(len, 4);
let total_len = 4 + rounded_len;
let read_pointer = bus.bp_read32(self.addr + BTSDIO_OFFSET_HOST2BT_OUT).await;
let available = read_pointer.wrapping_sub(self.h2b_write_pointer + 4) % BTSDIO_FWBUF_SIZE;
if available < total_len {
warn!(
"bluetooth tx queue full, retrying. len {} available {}",
total_len, available
);
yield_now().await;
return;
}
// Build header
let mut header = [0u8; 4];
header[0] = len as u8;
header[1] = (len >> 8) as u8;
header[2] = (len >> 16) as u8;
header[3] = buf.buf[0]; // HCI type byte
// Write header
let addr = self.addr + BTSDIO_OFFSET_HOST_WRITE_BUF + self.h2b_write_pointer;
bus.bp_write(addr, &header).await;
self.h2b_write_pointer = (self.h2b_write_pointer + 4) % BTSDIO_FWBUF_SIZE;
// Write payload.
let payload = &buf.buf[1..][..rounded_len as usize];
if self.h2b_write_pointer as usize + payload.len() > BTSDIO_FWBUF_SIZE as usize {
// wraparound
let n = BTSDIO_FWBUF_SIZE - self.h2b_write_pointer;
let addr = self.addr + BTSDIO_OFFSET_HOST_WRITE_BUF + self.h2b_write_pointer;
bus.bp_write(addr, &payload[..n as usize]).await;
let addr = self.addr + BTSDIO_OFFSET_HOST_WRITE_BUF;
bus.bp_write(addr, &payload[n as usize..]).await;
} else {
// no wraparound
let addr = self.addr + BTSDIO_OFFSET_HOST_WRITE_BUF + self.h2b_write_pointer;
bus.bp_write(addr, payload).await;
}
self.h2b_write_pointer = (self.h2b_write_pointer + payload.len() as u32) % BTSDIO_FWBUF_SIZE;
// Update pointer.
bus.bp_write32(self.addr + BTSDIO_OFFSET_HOST2BT_IN, self.h2b_write_pointer)
.await;
self.bt_toggle_intr(bus).await;
self.tx_chan.receive_done();
}
async fn bt_has_work(&mut self, bus: &mut impl Bus) -> bool {
let int_status = bus.bp_read32(CHIP.sdiod_core_base_address + SDIO_INT_STATUS).await;
if int_status & I_HMB_FC_CHANGE != 0 {
bus.bp_write32(
CHIP.sdiod_core_base_address + SDIO_INT_STATUS,
int_status & I_HMB_FC_CHANGE,
)
.await;
return true;
}
return false;
}
pub(crate) async fn handle_irq(&mut self, bus: &mut impl Bus) {
if self.bt_has_work(bus).await {
loop {
// Check if we have data.
let write_pointer = bus.bp_read32(self.addr + BTSDIO_OFFSET_BT2HOST_IN).await;
let available = write_pointer.wrapping_sub(self.b2h_read_pointer) % BTSDIO_FWBUF_SIZE;
if available == 0 {
break;
}
// read header
let mut header = [0u8; 4];
let addr = self.addr + BTSDIO_OFFSET_HOST_READ_BUF + self.b2h_read_pointer;
bus.bp_read(addr, &mut header).await;
// calc length
let len = header[0] as u32 | ((header[1]) as u32) << 8 | ((header[2]) as u32) << 16;
let rounded_len = round_up(len, 4);
if available < 4 + rounded_len {
warn!("ringbuf data not enough for a full packet?");
break;
}
self.b2h_read_pointer = (self.b2h_read_pointer + 4) % BTSDIO_FWBUF_SIZE;
// Obtain a buf from the channel.
let buf = self.rx_chan.send().await;
buf.buf[0] = header[3]; // hci packet type
let payload = &mut buf.buf[1..][..rounded_len as usize];
if self.b2h_read_pointer as usize + payload.len() > BTSDIO_FWBUF_SIZE as usize {
// wraparound
let n = BTSDIO_FWBUF_SIZE - self.b2h_read_pointer;
let addr = self.addr + BTSDIO_OFFSET_HOST_READ_BUF + self.b2h_read_pointer;
bus.bp_read(addr, &mut payload[..n as usize]).await;
let addr = self.addr + BTSDIO_OFFSET_HOST_READ_BUF;
bus.bp_read(addr, &mut payload[n as usize..]).await;
} else {
// no wraparound
let addr = self.addr + BTSDIO_OFFSET_HOST_READ_BUF + self.b2h_read_pointer;
bus.bp_read(addr, payload).await;
}
self.b2h_read_pointer = (self.b2h_read_pointer + payload.len() as u32) % BTSDIO_FWBUF_SIZE;
bus.bp_write32(self.addr + BTSDIO_OFFSET_BT2HOST_OUT, self.b2h_read_pointer)
.await;
buf.len = 1 + len as usize;
debug!("HCI rx: {:02x}", crate::fmt::Bytes(&buf.buf[..buf.len]));
self.rx_chan.send_done();
self.bt_toggle_intr(bus).await;
}
}
}
}
/// HCI transport error.
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Debug)]
pub enum Error {
/// I/O error.
Io(ErrorKind),
}
impl From for Error {
fn from(e: FromHciBytesError) -> Self {
match e {
FromHciBytesError::InvalidSize => Error::Io(ErrorKind::InvalidInput),
FromHciBytesError::InvalidValue => Error::Io(ErrorKind::InvalidData),
}
}
}
impl core::fmt::Display for Error {
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
core::fmt::Debug::fmt(self, f)
}
}
impl core::error::Error for Error {}
impl<'d> embedded_io_async::ErrorType for BtDriver<'d> {
type Error = Error;
}
impl embedded_io_async::Error for Error {
fn kind(&self) -> ErrorKind {
match self {
Self::Io(e) => *e,
}
}
}
impl<'d> bt_hci::transport::Transport for BtDriver<'d> {
fn read<'a>(&self, rx: &'a mut [u8]) -> impl Future