Module capsules::pca9544a [] [src]

Driver for the PCA9544A I2C Selector.

This chip allows for multiple I2C devices with the same addresses to sit on the same I2C bus.

http://www.ti.com/product/PCA9544A

The PCA9544A is a quad bidirectional translating switch controlled via the I2C bus. The SCL/SDA upstream pair fans out to four downstream pairs, or channels. One SCL/SDA pair can be selected at a time, and this is determined by the contents of the programmable control register. Four interrupt inputs (INT3–INT0), one for each of the downstream pairs, are provided. One interrupt output (INT) acts as an AND of the four interrupt inputs.

Usage

let pca9544a_i2c = static_init!(
    capsules::virtual_i2c::I2CDevice,
    capsules::virtual_i2c::I2CDevice::new(i2c_bus, 0x70));
let pca9544a = static_init!(
    capsules::pca9544a::PCA9544A<'static>,
    capsules::pca9544a::PCA9544A::new(pca9544a_i2c, &mut capsules::pca9544a::BUFFER));
pca9544a_i2c.set_client(pca9544a);

Reexports

use core::cell::Cell;
use kernel::AppId;
use kernel::Callback;
use kernel::Driver;
use kernel::ReturnCode;
use kernel::common::take_cell::TakeCell;
use kernel::hil::i2c;

Structs

PCA9544A

Enums

ControlField
State

Statics

BUFFER