MySensors Library & Examples  2.3.2
Public Member Functions | List of all members
FastI2cMaster< sclPin, sdaPin > Class Template Reference

Detailed Description

template<uint8_t sclPin, uint8_t sdaPin>
class FastI2cMaster< sclPin, sdaPin >

AVR Fast software I2C master class.

Definition at line 176 of file SoftI2cMaster.h.

#include <SoftI2cMaster.h>

+ Inheritance diagram for FastI2cMaster< sclPin, sdaPin >:
+ Collaboration diagram for FastI2cMaster< sclPin, sdaPin >:

Public Member Functions

void begin ()
 
uint8_t read (uint8_t last)
 
void start ()
 
void stop (void)
 
bool write (uint8_t data)
 
- 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

◆ begin()

template<uint8_t sclPin, uint8_t sdaPin>
void FastI2cMaster< sclPin, sdaPin >::begin ( )
inline

Initialize I2C bus pins.

Definition at line 186 of file SoftI2cMaster.h.

◆ read()

template<uint8_t sclPin, uint8_t sdaPin>
uint8_t FastI2cMaster< sclPin, sdaPin >::read ( uint8_t  last)
inlinevirtual

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.

Definition at line 195 of file SoftI2cMaster.h.

◆ start()

template<uint8_t sclPin, uint8_t sdaPin>
void FastI2cMaster< sclPin, sdaPin >::start ( )
inlinevirtual

Issue a start condition

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

Implements I2cMasterBase.

Definition at line 219 of file SoftI2cMaster.h.

◆ stop()

template<uint8_t sclPin, uint8_t sdaPin>
void FastI2cMaster< sclPin, sdaPin >::stop ( void  )
inlinevirtual

Issue a stop condition.

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

Implements I2cMasterBase.

Definition at line 234 of file SoftI2cMaster.h.

◆ write()

template<uint8_t sclPin, uint8_t sdaPin>
bool FastI2cMaster< sclPin, sdaPin >::write ( uint8_t  data)
inlinevirtual

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.

Definition at line 244 of file SoftI2cMaster.h.


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