Main Page | Modules | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

otPCA9548 Class Reference
[PCA9548 Low Voltage 8-Channel I2C Switch., PCA9548 Low Voltage 8-Channel I2C Switch.]

Class that allows to use PCA9548 Low Voltage 8-Channel I2C Switch.

#include <otPCA9548.h>


Public Member Functions

 otPCA9548 ()
void init (int idx=0)
bool switchChannel (U8 channel, U8 retries=3)
bool switchAllChannels (U8 channelsData, U8 retries=3)


Constructor & Destructor Documentation

otPCA9548.otPCA9548 (   ) 
 

Create the class


Member Function Documentation

void otPCA9548.init (  int  idx = 0  ) 
 

Init peripheral.

Parameters:
idx Device selection, in accordance with the selection inputs A[2:0]. Range 0:7

bool otPCA9548.switchAllChannels (  U8  channelsData,
U8  retries = 3
) 
 

Select one or more channels at a time. Control is bit-by-bit.

Parameters:
channelsData Select bit. 0x01 to select channel 0 or 0x03 to select channel 0 and the 1 and so on.
retries Number of failed selection attempts.
Returns:
True on success

bool otPCA9548.switchChannel (  U8  channel,
U8  retries = 3
) 
 

Select a channel.

Parameters:
channel Select 0:7
retries Number of failed selection attempts.
Returns:
True on success


The documentation for this class was generated from the following file: footer
otStudio - Library Reference - (C) 2020-25 Officina Turini, All Rights Reserved
Document built with Doxygen 1.4.0