#rom #rp2040 #raspberry-pi

no-std rp2040-rom

Access to Raspberry Pi RP2040 ROM functions from Rust

4 releases

0.1.3 Mar 16, 2025
0.1.2 Mar 16, 2025
0.1.1 Feb 25, 2025
0.1.0 Feb 25, 2025

#775 in Embedded development

Download history 220/week @ 2025-02-24 33/week @ 2025-03-03 132/week @ 2025-03-10 114/week @ 2025-03-17 11/week @ 2025-03-24

302 downloads per month

MIT license

7KB

This module provides the ability to call Raspberry Pi ROM functions.

The RP2040 ROM contains several useful functions that can be called directly from user code, including functions to reset the device and enter the USB bootloader.

Safety

All functions in this crate are marked as unsafe because they involve direct hardware manipulation and can reset the device.

Example

use rp2040_rom::ROM;

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

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.

No runtime deps