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_if::cfg_if! {
10        if #[cfg(context = "rp")] {
11            let _ = peripherals.I2C0.take().unwrap();
12            let _ = peripherals.I2C1.take().unwrap();
13        } else {
14            compile_error!("this RP chip is not supported");
15        }
16    }
17}