rp2040-rom

Crates.iorp2040-rom
lib.rsrp2040-rom
version0.1.3
created_at2025-02-25 09:43:58.655445+00
updated_at2025-03-16 18:58:04.677276+00
descriptionAccess to Raspberry Pi RP2040 ROM functions from Rust
homepage
repositoryhttps://github.com/piersfinlayson/rp2040-rom
max_upload_size
id1568980
size8,929
Piers Finlayson (piersfinlayson)

documentation

https://docs.rs/rp2040-rom

README

rp2040-rom

A lightweight Rust crate providing safe access to Raspberry Pi RP2040 ROM functions.

Features

  • Access to RP2040 ROM functions from Rust
  • Currently implemented:
    • reset_usb_boot: Reset the chip and enter USB bootloader (DFU) mode

Usage

Add this to your Cargo.toml:

[dependencies]
rp2040-rom = "0.1.0"

Example

use rp2040_rom::ROM;

// Reset into USB bootloader (DFU) mode
unsafe {
    ROM::reset_usb_boot(0, 0);
}

Safety

All ROM functions are marked as unsafe because:

  1. They involve direct hardware manipulation
  2. They can reset the device
  3. They require specific hardware (RP2040)

Documentation

For more details on the RP2040 ROM functions, see the RP2040 Datasheet.

License

Licensed under MIT License.

Commit count: 7

cargo fmt