MySensors Library & Examples  2.3.2
Public Member Functions | List of all members
I2cMasterBase Class Referenceabstract

Detailed Description

Base class for FastI2cMaster, SoftI2cMaster.

Definition at line 62 of file SoftI2cMaster.h.

#include <SoftI2cMaster.h>

+ Inheritance diagram for I2cMasterBase:
+ Collaboration diagram for I2cMasterBase:

Public Member Functions

virtual uint8_t read (uint8_t last)=0
 
virtual void start ()=0
 
virtual void stop ()=0
 
bool transfer (uint8_t addressRW, void *buf, size_t nbyte, uint8_t option=I2C_STOP)
 
bool transferContinue (void *buf, size_t nbyte, uint8_t option=I2C_STOP)
 
virtual bool write (uint8_t data)=0
 

Member Function Documentation

◆ read()

virtual uint8_t I2cMasterBase::read ( uint8_t  last)
pure virtual

Read a byte

Note
This function should only be used by experts. Data should be accessed by calling transfer() and transferContinue()
Parameters
[in]lastsend a NACK to terminate read if last is true else send an ACK to continue the read.
Returns
byte read from I2C bus

Implemented in FastI2cMaster< sclPin, sdaPin >, and SoftI2cMaster.

◆ start()

virtual void I2cMasterBase::start ( )
pure virtual

Issue a start condition

Note
This function should only be used by experts. Data should be accessed by calling transfer() and transferContinue()

Implemented in FastI2cMaster< sclPin, sdaPin >, and SoftI2cMaster.

◆ stop()

virtual void I2cMasterBase::stop ( )
pure virtual

Issue a stop condition.

Note
This function should only be used by experts. Data should be accessed by calling transfer() and transferContinue()

Implemented in FastI2cMaster< sclPin, sdaPin >, and SoftI2cMaster.

◆ write()

virtual bool I2cMasterBase::write ( uint8_t  data)
pure virtual

Write a byte

Note
This function should only be used by experts. Data should be accessed by calling transfer() and transferContinue()
Parameters
[in]databyte to write
Returns
true for ACK or false for NACK

Implemented in FastI2cMaster< sclPin, sdaPin >, and SoftI2cMaster.


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