community_tca9534¶
CircuitPython library for TCA9534 Low Voltage 8-Bit I2C and SMBUS Low-Power I/O Expander with Interrupt Output and Configuration Registers.
Author(s): Milad Hajihassan
Implementation Notes¶
Hardware:
TCA9534 Bus expander
Software and Dependencies:
Adafruit CircuitPython firmware for the supported boards: https://github.com/adafruit/circuitpython/releases
#Adafruit’s Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice # Adafruit’s Register library: https://github.com/adafruit/Adafruit_CircuitPython_Register
- class community_tca9534.TCA9534(i2c, address=39)¶
TCA9534 main class
Class initialization
- get_gpio(gpio_position)¶
Get gpio status by gpio position
- get_gpio_invert(gpio_position)¶
Get gpio inversion polarity
- get_gpio_mode(gpio_position)¶
Get a gpio mode
- get_port()¶
Get gpio status for all the pins in the port
- get_port_invert()¶
Get port inversion polarity
- get_port_mode()¶
Get port mode
- read_bit(register_address, gpio_position)¶
Read a bit by register address
- read_register(address)¶
Read a register by register address
- set_gpio(gpio_position, gpio_out_status)¶
Set gpio status by gpio position
- set_gpio_invert(gpio_position, inversion_mode)¶
Set gpio inversion polarity
- set_gpio_mode(gpio_position, gpio_mode)¶
Set a gpio mode
- set_port(port_out_array)¶
Set gpio status for all the pins in the port
- set_port_invert(inversion_mode_array)¶
Set port inversion polarity
- set_port_mode(port_mode_array)¶
Set port mode
- write_bit(register_address, gpio_position, bit_value)¶
Write a bit by register address
- write_register(address, value)¶
Write a register by register address