Initialise the TCA9548A chip at address
with i2c_driver
.
More...
|
def | __init__ (self, address=None, debug=None, i2c_driver=None) |
| This method initializes the class object. More...
|
|
def | is_connected (self) |
| Determine if the device is conntected to the system. More...
|
|
def | get_enabled_channels (self) |
| This method returns the enabled channels on the Qwiic Mux. More...
|
|
def | enable_channels (self, enable) |
| This method enables the connection of specific channels on the Qwiic Mux. More...
|
|
def | disable_channels (self, disable) |
| This method disables the connection of specific channels on the Qwiic Mux. More...
|
|
def | enable_all (self) |
| This method enables the connection of specific channels on the Qwiic Mux. More...
|
|
def | disable_all (self) |
| This method disables the connection of all channels on the Qwiic Mux. More...
|
|
def | list_channels (self) |
| This method lists all the available channels and their current configuration (enabled or disabled) on the Qwiic Mux. More...
|
|
Initialise the TCA9548A chip at address
with i2c_driver
.
- Parameters
-
address | The I2C address to use for the device. If not provided, the default address is used. |
i2c_driver | An existing i2c driver object. If not provided a driver object is created. |
- Returns
- Bool Constructor Initialization True- Successful False- Issue loading I2C driver
◆ __init__()
def qwiic_tca9548a.QwiicTCA9548A.__init__ |
( |
|
self, |
|
|
|
address = None , |
|
|
|
debug = None , |
|
|
|
i2c_driver = None |
|
) |
| |
This method initializes the class object.
If no 'address' or 'i2c_driver' are inputed or 'None' is specified, the method will use the defaults.
- Parameters
-
address | The I2C address to use for the device. If not provided, the method will default to the first address in the 'available_addresses' list. Default = 0x29 |
debug | Designated whether or not to print debug statements. 0- Don't print debug statements 1- Print debug statements |
i2c_driver | An existing i2c driver object. If not provided a driver object is created from the 'qwiic_i2c' I2C driver of the SparkFun Qwiic library. |
◆ disable_all()
def qwiic_tca9548a.QwiicTCA9548A.disable_all |
( |
|
self | ) |
|
This method disables the connection of all channels on the Qwiic Mux.
◆ disable_channels()
def qwiic_tca9548a.QwiicTCA9548A.disable_channels |
( |
|
self, |
|
|
|
disable |
|
) |
| |
This method disables the connection of specific channels on the Qwiic Mux.
- Parameters
-
enable | Channel(s) to disable on the Qwiic Mux. Input must be either an individual integer or list. The method will automatically convert an individual integer into a list. Range- 0 to 7 |
◆ enable_all()
def qwiic_tca9548a.QwiicTCA9548A.enable_all |
( |
|
self | ) |
|
This method enables the connection of specific channels on the Qwiic Mux.
◆ enable_channels()
def qwiic_tca9548a.QwiicTCA9548A.enable_channels |
( |
|
self, |
|
|
|
enable |
|
) |
| |
This method enables the connection of specific channels on the Qwiic Mux.
- Parameters
-
enable | Channel(s) to enable on the Qwiic Mux. Input must be either an individual integer or list. The method will automatically convert an individual integer into a list. Range- 0 to 7 |
◆ get_enabled_channels()
def qwiic_tca9548a.QwiicTCA9548A.get_enabled_channels |
( |
|
self | ) |
|
This method returns the enabled channels on the Qwiic Mux.
- Returns
- Integer Enabled channels on the Qwiic Mux
◆ is_connected()
def qwiic_tca9548a.QwiicTCA9548A.is_connected |
( |
|
self | ) |
|
Determine if the device is conntected to the system.
- Returns
- bool True if the device is connected, otherwise False.
◆ list_channels()
def qwiic_tca9548a.QwiicTCA9548A.list_channels |
( |
|
self | ) |
|
This method lists all the available channels and their current configuration (enabled or disabled) on the Qwiic Mux.
◆ address
qwiic_tca9548a.QwiicTCA9548A.address |
◆ available_addresses
qwiic_tca9548a.QwiicTCA9548A.available_addresses = _AVAILABLE_I2C_ADDRESS |
|
static |
◆ available_channels
qwiic_tca9548a.QwiicTCA9548A.available_channels = range(0,7+1) |
|
static |
◆ debug
qwiic_tca9548a.QwiicTCA9548A.debug |
◆ device_name
qwiic_tca9548a.QwiicTCA9548A.device_name = _DEFAULT_NAME |
|
static |
◆ connected
qwiic_tca9548a.QwiicTCA9548A.connected = property(is_connected) |
|
static |
The documentation for this class was generated from the following file: