soft_i2c/lib.rs
1#![no_std]
2
3mod soft_i2c;
4
5pub use soft_i2c::*;
6
7pub const FREQ_I2C_SCL_100K: u32 = 100_000;
8pub const FREQ_I2C_SCL_400K: u32 = 400_000;
9
10/// Trait for controlling bidirectional GPIO pins.
11pub trait OpenDrainPin {
12 /// Sets the level of the GPIO pin.
13 fn set(&mut self, level: bool);
14
15 /// Gets the current level of the GPIO pin.
16 fn get(&mut self) -> bool;
17}