Skip to content

rpi-hal

The hardware abstraction layer: boot code, the MMU and caches, interrupts, multicore bring-up, and the SoC’s peripherals: GPIO, UARTs, SPI, I2C, PWM, PCM/I2S, DMA, the SD card, USB host, the mailbox, and more. It looks and feels like other embedded-hal implementations (stm32xx-hal, rp2040-hal): the same naming, the same typestate/ownership patterns, and embedded-hal traits implemented alongside inherent methods rather than instead of them.

Chip feature Boards Target
bcm2837 Pi 2, Pi 3 armv7a-none-eabi, aarch64-unknown-none-softfloat
bcm2711 Pi 4 (preliminary: no interrupt controller yet) the same two
bcm2835 Pi 1, Pi Zero (preliminary) armv6-none-eabi (nightly)

None of the chip features is a default; an application names exactly one.

[dependencies]
rpi-hal = { version = "0.9", features = ["bcm2837"] }