Skip to content

TCA9539/PCA9539 16-bit I/O expander with I2C interface

License

Notifications You must be signed in to change notification settings

quartiq/tca9539

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

TCA9539/PCA9539 16-bit I/O expander with I2C interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages