Abstraction for I/O expander PCA9539.
This crate offers the following features: * Individual pin instances, fully implementing digital::v2 traits of embeddedhal * Central I/O control, s. PCA9539 module * Two state management modes for reduced I2C overhead, s. pins module * Three concurrency models, s. concurrency section * nostd support
```rust use rca9539::example::DummyI2CBus; use rca9539::expander::Bank::Bank0; use rca9539::expander::PCA9539; use rca9539::expander::PinID::Pin1; use embedded_hal::digital::v2::InputPin;
let i2cbus = DummyI2CBus::new(); let mut expander = PCA9539::new(i2cbus); let pins = expander.pins();
let pin01 = pins.getpin(Bank0, Pin1); assert!(pin01.ishigh().unwrap()); ```
Any form of support is greatly appreciated. Feel free to create issues and PRs. See DEVELOPMENT for more details.
Licensed under either of
Each contributor agrees that his/her contribution covers both licenses.