Cargo Features

rp2040-hal has no features set by default.

[dependencies]
rp2040-hal = { version = "0.10.1", features = ["rt", "rom-func-cache", "disable-intrinsics", "rom-v2-intrinsics", "rp2040-e5", "critical-section-impl", "chrono", "defmt", "rtic-monotonic", "i2c-write-iter"] }
rt

Minimal startup / runtime for Cortex-M microcontrollers

Enables rt of rp2040-pac

rom-func-cache

Memoize(cache) ROM function pointers on first use to improve performance

disable-intrinsics

Disable automatic mapping of language features (like floating point math) to ROM functions

rom-v2-intrinsics

This enables ROM functions for f64 math that were not present in the earliest RP2040s

rp2040-e5

This enables a fix for USB errata 5: USB device fails to exit RESET state on busy USB bus. Only required for RP2040 B0 and RP2040 B1, but it also works for RP2040 B2 and above Note that the workaround takes control of pin 15 (bank0) during usb reset so the bank needs to be taken out of reset before calling UsbBus::new. Using let pins = Pins::new(peripherals.IO_BANK0, peripherals.PADS_BANK0, sio.gpio_bank0, &mut peripherals.RESETS); is enough to take the Bank 0 out of reset.

critical-section-impl

critical section that is safe for multicore use

Enables restore-state-u8 of critical-section

chrono

Add conversion functions between chrono types and the rp2040-hal specific DateTime type

Enables chrono

Affects datetime::chrono

defmt

Implement defmt::Format for several types.

Enables defmt

rtic-monotonic

Implement rtic_monotonic::Monotonic based on the RP2040 timer peripheral

Enables rtic-monotonic

Affects timer::monotonic

i2c-write-iter

Implement i2c-write-iter traits

Enables i2c-write-iter