Skip to main content

ariel_os_rp/i2c/
mod.rs

1//! Provides support for the I2C communication bus.
2
3#[doc(alias = "master")]
4pub mod controller;
5
6#[doc(hidden)]
7pub fn init(peripherals: &mut crate::OptionalPeripherals) {
8    // Take all I2C peripherals and do nothing with them.
9    cfg_select! {
10        context = "rp" => {
11            let _ = peripherals.I2C0.take().unwrap();
12            let _ = peripherals.I2C1.take().unwrap();
13        }
14        _ => {
15            compile_error!("this RP chip is not supported");
16        }
17    }
18}