Library for interfacing NXP PCA9646 Buffered 4-channel 2-wire bus switch
Note: The NXP PCA9546A 4-channel I2C-bus switch with reset is also supported by this library
The PCA9646 is a monolithic CMOS integrated circuit for 2-wire bus buffering and switching in applications including I2C-bus, SMBus, PMBus, and other systems based on similar principles. -) I2C interface with communication speed up to 1 MHz -) 8 user selectable addresses (chosen by chip pins) -) Each I/O is impedance isolated from all others allowing maximum capacitance on all branches -) 30 mA static sink capability on all ports -) Hysteresis on I/O increases noise immunity
typical I2C clock speed to be used
Available I2C addresses
Available I2C channels in the control register
SCL direction
Initializes I2C communication with the PCA9646
First copies the I2C port, I2C address and if provided the gpio pin for resetting the PCA9646 to the transferred empty device handle. Afterwards performs a reset of the PCA9646 if a gpio pin was provided and checks the default control register state of the PCA9646.
Enable I2C communication channels and set direction
First the PCA9646 is reset if a GPIO reset pin was set during the initialisation. Afterwards the control register is set with the selected channels and direction.
Get the current control register state
Returns the current state of the control register state. If the bReadout argument is set to true, the register state is read from the PCA9646. Per default only the register state in the handle is returned, without any I2C communication.
absolute maximum I2C clock speed
Read PCA9646 control register
Write PCA9646 control register
Executes an I2C communication with the PCA9646. Data is first of all sent and data is then received.