Skip to main content

rpi_pal/
lib.rs

1//! rpi-pal provides access to the Raspberry Pi's GPIO, I2C, PWM, SPI and UART
2//! peripherals through a user-friendly interface. In addition to peripheral
3//! access, rpi-pal also offers support for USB to serial adapters.
4//!
5//! The library can be used in conjunction with a variety of platform-agnostic
6//! drivers through its `embedded-hal` trait implementations. Both `embedded-hal`
7//! v0.2.7 and v1 are supported.
8//!
9//! rpi-pal requires a recent release of Raspberry Pi OS. Similar Linux distributions
10//! may work, but are unsupported.
11//!
12//! Both `gnu` and `musl` libc targets are supported. rpi-pal is compatible with the
13//! Raspberry Pi A, A+, B, B+, 2B, 3A+, 3B, 3B+, 4B, 5, CM, CM 3, CM 3+, CM 4, CM 5, 400,
14//! Zero, Zero W and Zero 2 W. Backwards compatibility for minor revisions isn't
15//! guaranteed until v1.
16
17// Used by rustdoc to link other crates to rpi-pal's docs
18#![doc(html_root_url = "https://docs.rs/rpi-pal/0.22.2")]
19
20#[macro_use]
21mod macros;
22
23pub mod gpio;
24#[cfg(any(
25    feature = "embedded-hal-0",
26    feature = "embedded-hal",
27    feature = "embedded-hal-nb"
28))]
29pub mod hal;
30pub mod i2c;
31pub mod pwm;
32pub mod spi;
33pub mod system;
34pub mod uart;