Crate rp235x_hal

Source
Expand description

HAL for the Raspberry Pi RP235x microcontrollers

This is an implementation of the embedded-hal traits for the RP235x microcontrollers

NOTE This HAL is still under active development. This API will remain volatile until 1.0.0

§Crate features

  • critical-section-impl - critical section that is safe for multicore use
  • defmt - Implement defmt::Format for several types.
  • embedded_hal_1 - Support alpha release of embedded-hal
  • rom-func-cache - Memoize(cache) ROM function pointers on first use to improve performance
  • rt - Minimal startup / runtime for Cortex-M microcontrollers
  • rtic-monotonic - Implement rtic_monotonic::Monotonic based on the RP2350 timer peripheral
  • i2c-write-iter - Implement i2c_write_iter traits for I2C<_, _, Controller>.
  • binary-info - Include a static variable containing picotool compatible binary info.

Re-exports§

pub extern crate fugit;
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;
pub use rp235x_pac as pac;
pub use rp_binary_info as binary_info;

Modules§

adc
Analog-Digital Converter (ADC)
arch
Portable in-line assembly
async_utils
Commonly used in async implementations.
block
Support for the RP235x Boot ROM’s “Block” structures
clocks
Clocks (CLOCKS)
dcp
Double-Co-Pro Support
dma
Direct memory access (DMA).
gpio
General Purpose Input and Output (GPIO)
i2c
Inter-Integrated Circuit (I2C) bus
lposc
Low Power Oscillator (ROSC)
multicore
Multicore support
otp
Interface to the RP2350’s One Time Programmable Memory
pio
Programmable IO (PIO)
pll
Phase-Locked Loops (PLL)
powman
POWMAN Support
prelude
Prelude
pwm
Pulse Width Modulation (PWM)
reboot
Functions for rebooting the chip using the ROM.
resets
Subsystem Resets
rom_data
Functions and data from the RPI Bootrom.
rosc
Ring Oscillator (ROSC)
sio
Single Cycle Input and Output (SIO)
spi
Serial Peripheral Interface (SPI)
timer
Timer Peripheral
typelevel
Module supporting type-level programming
uart
Universal Asynchronous Receiver Transmitter (UART)
usb
Universal Serial Bus (USB)
vector_table
Interrupt vector table utilities
watchdog
Watchdog
xosc
Crystal Oscillator (XOSC)

Macros§

bsp_pins
Helper macro to give meaningful names to GPIO pins
declare_get_sys_info_function
Generates a function with the following signature:
declare_get_sys_info_ns_function
Generates a function with the following signature:
singleton
Create a static variable which we can grab a mutable reference to exactly once.

Functions§

halt
Halt the rp235x.
reset
Trigger full reset of the rp235x.

Attribute Macros§

arch_entry
Called by the rp235x-specific entry macro
entry
Attribute to declare the entry point of the program