Sming Framework API
Sming - Open Source framework for high efficiency WiFi SoC ESP8266 native development with C++ language.
I2cMasterBase Class Referenceabstract

Base class for SoftI2cMaster and TwiMaster. More...

#include <I2cMaster.h>

Inheritance diagram for I2cMasterBase:
SoftI2cMaster

Public Member Functions

virtual uint8_t read (uint8_t last)=0
 
virtual bool restart (uint8_t addressRW)=0
 
virtual bool start (uint8_t addressRW)=0
 
virtual void stop (void)=0
 
virtual bool write (uint8_t data)=0
 

Detailed Description

Base class for SoftI2cMaster and TwiMaster.

Member Function Documentation

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

Read a byte

Parameters
[in]lastsend Ack if last is false else Nak to terminate read
Returns
byte read from I2C bus

Implemented in SoftI2cMaster.

virtual bool I2cMasterBase::restart ( uint8_t  addressRW)
pure virtual

Send new address and read/write bit without sending a stop.

Parameters
[in]addressRWi2c address with read/write bit
Returns
true for success false for failure

Implemented in SoftI2cMaster.

virtual bool I2cMasterBase::start ( uint8_t  addressRW)
pure virtual

Issue a start condition

Parameters
[in]addressRWi2c address with read/write bit
Returns
true for success false for failure

Implemented in SoftI2cMaster.

virtual void I2cMasterBase::stop ( void  )
pure virtual

Issue a stop condition.

Implemented in SoftI2cMaster.

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

Write a byte

Parameters
[in]databyte to write
Returns
true for Ack or false for Nak

Implemented in SoftI2cMaster.