Wombat Environmental Node 1.0
An environmental node for SDI-12 and digital sensors.
Loading...
Searching...
No Matches
TCA9534 Class Reference

#include <TCA9534.h>

Collaboration diagram for TCA9534:

Public Types

enum class  Reg { INPUT_PORT , OUTPUT_PORT , POLARITY , CONFIG }
 
enum class  Config { OUT , IN }
 
enum class  Polarity { ORIGINAL , INVERSE }
 
enum  Level { L = 0x00 , H = 0xFF }
 

Public Member Functions

void attach (TwoWire &w)
 
void setDeviceAddress (const uint8_t addr)
 
uint8_t input (const uint8_t port)
 
uint8_t input ()
 
uint8_t output (const uint8_t port, const uint8_t v)
 
uint8_t output (const uint8_t v)
 
uint8_t output ()
 
uint8_t polarity (const uint8_t port, const Polarity pol)
 
uint8_t polarity (const Polarity pol)
 
uint8_t polarity ()
 
uint8_t config (const uint8_t port, const Config cfg)
 
uint8_t config (const Config cfg)
 
uint8_t config ()
 
uint8_t status () const
 

Private Member Functions

uint8_t readBit (uint8_t dev, uint8_t reg, uint8_t bit)
 
uint8_t readByte (uint8_t dev, uint8_t reg)
 
int8_t readBytes (uint8_t dev, uint8_t reg, uint8_t size, uint8_t *data)
 
bool writeBit (uint8_t dev, uint8_t reg, uint8_t bit, uint8_t data)
 
bool writeByte (uint8_t dev, uint8_t reg, uint8_t data)
 
bool writeBytes (uint8_t dev, uint8_t reg, uint8_t size, uint8_t *data)
 

Private Attributes

uint8_t I2C_ADDR = 0x20
 
TwoWire * wire
 
uint8_t sts
 

Member Enumeration Documentation

◆ Config

enum class TCA9534::Config
strong
Enumerator
OUT 
IN 

◆ Level

Enumerator

◆ Polarity

enum class TCA9534::Polarity
strong
Enumerator
ORIGINAL 
INVERSE 

◆ Reg

enum class TCA9534::Reg
strong
Enumerator
INPUT_PORT 
OUTPUT_PORT 
POLARITY 
CONFIG 

Member Function Documentation

◆ attach()

void TCA9534::attach ( TwoWire &  w)
inline

◆ config() [1/3]

uint8_t TCA9534::config ( )
inline

◆ config() [2/3]

uint8_t TCA9534::config ( const Config  cfg)
inline

◆ config() [3/3]

uint8_t TCA9534::config ( const uint8_t  port,
const Config  cfg 
)
inline

◆ input() [1/2]

uint8_t TCA9534::input ( )
inline

◆ input() [2/2]

uint8_t TCA9534::input ( const uint8_t  port)
inline

◆ output() [1/3]

uint8_t TCA9534::output ( )
inline

◆ output() [2/3]

uint8_t TCA9534::output ( const uint8_t  port,
const uint8_t  v 
)
inline

◆ output() [3/3]

uint8_t TCA9534::output ( const uint8_t  v)
inline

◆ polarity() [1/3]

uint8_t TCA9534::polarity ( )
inline

◆ polarity() [2/3]

uint8_t TCA9534::polarity ( const Polarity  pol)
inline

◆ polarity() [3/3]

uint8_t TCA9534::polarity ( const uint8_t  port,
const Polarity  pol 
)
inline

◆ readBit()

uint8_t TCA9534::readBit ( uint8_t  dev,
uint8_t  reg,
uint8_t  bit 
)
inlineprivate

◆ readByte()

uint8_t TCA9534::readByte ( uint8_t  dev,
uint8_t  reg 
)
inlineprivate

◆ readBytes()

int8_t TCA9534::readBytes ( uint8_t  dev,
uint8_t  reg,
uint8_t  size,
uint8_t *  data 
)
inlineprivate

◆ setDeviceAddress()

void TCA9534::setDeviceAddress ( const uint8_t  addr)
inline

◆ status()

uint8_t TCA9534::status ( ) const
inline

◆ writeBit()

bool TCA9534::writeBit ( uint8_t  dev,
uint8_t  reg,
uint8_t  bit,
uint8_t  data 
)
inlineprivate

◆ writeByte()

bool TCA9534::writeByte ( uint8_t  dev,
uint8_t  reg,
uint8_t  data 
)
inlineprivate

◆ writeBytes()

bool TCA9534::writeBytes ( uint8_t  dev,
uint8_t  reg,
uint8_t  size,
uint8_t *  data 
)
inlineprivate

Member Data Documentation

◆ I2C_ADDR

uint8_t TCA9534::I2C_ADDR = 0x20
private

◆ sts

uint8_t TCA9534::sts
private

◆ wire

TwoWire* TCA9534::wire
private

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