#i2c #hal #io #pca9539

no-std tca9539

TCA9539 (also PCA9539) 16-Bit I2C I/O Expander with I2C Interface

3 unstable releases

0.2.1 May 5, 2024
0.2.0 Jun 30, 2023
0.1.0 Jun 30, 2023

#2848 in Embedded development

Download history 79/week @ 2025-09-18 68/week @ 2025-09-25 39/week @ 2025-10-02 32/week @ 2025-10-09 99/week @ 2025-10-16 145/week @ 2025-10-23 23/week @ 2025-10-30 25/week @ 2025-11-06 34/week @ 2025-11-13 22/week @ 2025-11-20 22/week @ 2025-11-27 21/week @ 2025-12-04 22/week @ 2025-12-11 21/week @ 2025-12-18 20/week @ 2025-12-25 21/week @ 2026-01-01

87 downloads per month
Used in stabilizer

MIT license

6KB
93 lines

tca9539

This crate is a no_std driver for the TCA9539 and PCA9539 16-Bit/8-Bit I2C I/O Expanders.

Build Status crates.io Docs

Basic usage

Include this library as a dependency in your Cargo.toml:

[dependencies]
tca9539 = "0.1"

Use embedded-hal implementation to get I2C handle and then create chip handle:

use tca9539::*;

let pin = Pin::P13;
let mut u = Tca9539<I2C>::default(i2c).unwrap();
u.set_direction(pin, Direction::Output).unwrap();
u.set_level(pin, Level::High).unwrap();
assert!(u.gpio(pin).unwrap());

Documentation

API Docs available on docs.rs

Minimum supported Rust version (MSRV) is 1.62.0.

License

MIT license

Dependencies

~250–650KB
~14K SLoC