pca9539

Crates.iopca9539
lib.rspca9539
version0.3.0
sourcesrc
created_at2022-04-07 15:58:56.474497
updated_at2023-12-18 11:41:23.987462
descriptionAbstraciton for PCA9539 I/O expander
homepage
repositoryhttps://github.com/pegasus-aero/rt-PCA9539
max_upload_size
id563748
size101,720
Marius Meißner (marius-meissner)

documentation

https://docs.rs/pca9539

README

Abstraction for I/O expander PCA9539

License License Crates.io Actions Status

Abstraction for I/O expander PCA9539.

This crate offers the following features:

Example

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 i2c_bus = DummyI2CBus::new();
let mut  expander = PCA9539::new(i2c_bus, 0x74);
let pins = expander.pins();

let pin01 = pins.get_pin(Bank0, Pin1);
assert!(pin01.is_high().unwrap());

Development

Any form of support is greatly appreciated. Feel free to create issues and PRs. See DEVELOPMENT for more details.

License

Licensed under either of

Each contributor agrees that his/her contribution covers both licenses.

Commit count: 47

cargo fmt