4 releases
new 0.1.3 | Mar 16, 2025 |
---|---|
0.1.2 | Mar 16, 2025 |
0.1.1 | Feb 25, 2025 |
0.1.0 | Feb 25, 2025 |
#679 in Embedded development
476 downloads per month
7KB
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:
- They involve direct hardware manipulation
- They can reset the device
- They require specific hardware (RP2040)
Documentation
For more details on the RP2040 ROM functions, see the RP2040 Datasheet.
License
Licensed under MIT License.
lib.rs
:
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);
}