7 unstable releases

0.4.0 Dec 20, 2024
0.3.0 Dec 18, 2023
0.2.1 Aug 14, 2023
0.2.0 Apr 20, 2022
0.1.3 Apr 10, 2022

#336 in Embedded development

Download history 18/week @ 2024-09-25 2/week @ 2024-12-11 111/week @ 2024-12-18 3/week @ 2024-12-25 5/week @ 2025-01-08

119 downloads per month

MIT/Apache

76KB
1.5K SLoC

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.

Dependencies

~560–760KB
~14K SLoC