Expand description

HAL for the RP2040 microcontroller

This is an implementation of the [embedded-hal] traits for the RP2040 microcontroller NOTE This HAL is still under active development. This API will remain volatile until 1.0.0


pub extern crate rp2040_pac as pac;
pub use paste;
pub use adc::Adc;
pub use clocks::Clock;
pub use i2c::I2C;
pub use sio::Sio;
pub use spi::Spi;
pub use timer::Timer;
pub use watchdog::Watchdog;


Analog-Digital Converter (ADC)

Clocks (CLOCKS)


General Purpose Input and Output (GPIO)

Inter-Integrated Circuit (I2C) bus

Multicore support

Programmable IO (PIO) See Chapter 3 of the datasheet for more details.

Phase-Locked Loops (PLL)


Pulse Width Modulation (PWM)

Subsystem Resets

Functions and data from the RPI Bootrom.

Ring Oscillator (ROSC)

Real time clock functionality

Single Cycle Input and Output (SIO)

Serial Peripheral Interface (SPI)

Synchronous Serial Interface (SSI)

Timer Peripheral

Module supporting type-level programming

Universal Asynchronous Receiver Transmitter (UART)

Universal Serial Bus (USB)


Crystal Oscillator (XOSC)


Helper macro to give meaningful names to GPIO pins