MySensors Library & Examples  2.3.2-62-ge298769
Public Member Functions | List of all members
SoftI2cMaster Class Reference

Detailed Description

AVR Software I2C master class.

Definition at line 112 of file SoftI2cMaster.h.

#include <SoftI2cMaster.h>

+ Inheritance diagram for SoftI2cMaster:
+ Collaboration diagram for SoftI2cMaster:

Public Member Functions

 SoftI2cMaster (uint8_t sclPin, uint8_t sdaPin)
 
void begin (uint8_t sclPin, uint8_t sdaPin)
 
uint8_t read (uint8_t last)
 
void start ()
 
void stop (void)
 
bool write (uint8_t b)
 
- Public Member Functions inherited from I2cMasterBase
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)
 

Member Function Documentation

◆ read()

uint8_t SoftI2cMaster::read ( uint8_t  last)
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

Implements I2cMasterBase.

◆ start()

void SoftI2cMaster::start ( )
virtual

Issue a start condition

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

Implements I2cMasterBase.

◆ stop()

void SoftI2cMaster::stop ( void  )
virtual

Issue a stop condition.

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

Implements I2cMasterBase.

◆ write()

bool SoftI2cMaster::write ( uint8_t  data)
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

Implements I2cMasterBase.


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