YAHAL
Yet Another Hardware Abstraction Library
Loading...
Searching...
No Matches
soft_i2c_master Class Reference
Inheritance diagram for soft_i2c_master:
i2c_interface

Public Member Functions

 soft_i2c_master (gpio_interface &sda, gpio_interface &scl, void(*delay)(uint32_t us), bool pullup=false)
 
int16_t i2cRead (uint16_t addr, uint8_t *rxbuf, uint16_t len, bool sendStop=true) override
 
int16_t i2cWrite (uint16_t addr, uint8_t *txbuf, uint16_t len, bool sendStop=true) override
 
void setSpeed (uint32_t)
 
void init ()
 
 soft_i2c_master (const soft_i2c_master &)=delete
 
soft_i2c_masteroperator= (const soft_i2c_master &)=delete
 
- Public Member Functions inherited from i2c_interface

Detailed Description

Definition at line 23 of file soft_i2c_master.h.

Constructor & Destructor Documentation

◆ soft_i2c_master()

soft_i2c_master::soft_i2c_master ( gpio_interface & sda,
gpio_interface & scl,
void(* delay )(uint32_t us),
bool pullup = false )

Definition at line 17 of file soft_i2c_master.cpp.

◆ ~soft_i2c_master()

soft_i2c_master::~soft_i2c_master ( )
virtual

Definition at line 28 of file soft_i2c_master.cpp.

Member Function Documentation

◆ i2cRead()

int16_t soft_i2c_master::i2cRead ( uint16_t addr,
uint8_t * rxbuf,
uint16_t len,
bool sendStop = true )
overridevirtual

Implements i2c_interface.

Definition at line 35 of file soft_i2c_master.cpp.

◆ i2cWrite()

int16_t soft_i2c_master::i2cWrite ( uint16_t addr,
uint8_t * txbuf,
uint16_t len,
bool sendStop = true )
overridevirtual

Implements i2c_interface.

Definition at line 54 of file soft_i2c_master.cpp.

◆ init()

void soft_i2c_master::init ( )

Definition at line 84 of file soft_i2c_master.cpp.

◆ setSpeed()

void soft_i2c_master::setSpeed ( uint32_t hz)
virtual

Implements i2c_interface.

Definition at line 75 of file soft_i2c_master.cpp.


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