MUX_SW_NXP_Arduino 1.1.0
I2C multiplexer/swith class driver for Arduino
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
PCA9846 Class Reference

#include <MUX_SW_NXP.h>

Inheritance diagram for PCA9846:

Public Types

enum  channel { CH0 = 0x01 , CH1 = 0x02 , CH2 = 0x04 , CH3 = 0x08 }
 

Public Member Functions

 PCA9846 (uint8_t i2c_address=(0xE2 > > 1))
 
 PCA9846 (TwoWire &wire, uint8_t i2c_address=(0xE2 > > 1))
 
virtual ~PCA9846 ()
 
void begin (void)
 
void select (uint8_t flags)
 
uint8_t select (void)
 

Static Public Attributes

static constexpr int N_CH = 4
 

Detailed Description

I2C multiplexer and switch operation library for Arduino

Author
Tedd OKANO

Released under the MIT license License PCA9846 class

PCA9846 class is a sample code for the PCA9846PW-ARD It demonstrates the switch operation with EEPROM on the shield board

Definition at line 24 of file MUX_SW_NXP.h.

Member Enumeration Documentation

◆ channel

Enumerator
CH0 
CH1 
CH2 
CH3 

Definition at line 27 of file MUX_SW_NXP.h.

Constructor & Destructor Documentation

◆ PCA9846() [1/2]

PCA9846::PCA9846 ( uint8_t i2c_address = (0xE2 >> 1))

Create a PCA9846 instance with specified address

Parameters
i2c_addressI2C-bus address (default: (0xE2>>1))

Definition at line 5 of file MUX_SW_NXP.cpp.

◆ PCA9846() [2/2]

PCA9846::PCA9846 ( TwoWire & wire,
uint8_t i2c_address = (0xE2 >> 1) )

Create a PCA9846 instance with specified address

Parameters
wireTwoWire instance
i2c_addressI2C-bus address (default: (0xE2>>1))

Definition at line 9 of file MUX_SW_NXP.cpp.

◆ ~PCA9846()

PCA9846::~PCA9846 ( )
virtual

Definition at line 13 of file MUX_SW_NXP.cpp.

Member Function Documentation

◆ begin()

void PCA9846::begin ( void )

Begin the device operation

This method turns-on the device

Definition at line 17 of file MUX_SW_NXP.cpp.

◆ select() [1/2]

void PCA9846::select ( uint8_t flags)

Channel select

Parameters
flagsbitmap flags for enabling channels

Definition at line 21 of file MUX_SW_NXP.cpp.

◆ select() [2/2]

uint8_t PCA9846::select ( void )

Channel select

Returns
flags bitmap flags for enabling channels

Definition at line 26 of file MUX_SW_NXP.cpp.

Member Data Documentation

◆ N_CH

constexpr int PCA9846::N_CH = 4
staticconstexpr

Number of channels

Definition at line 35 of file MUX_SW_NXP.h.


The documentation for this class was generated from the following files: