Raspberry Pio Pico Drivers project
Loading...
Searching...
No Matches
Public Member Functions
rpp_driver::MockI2cMaster Class Reference

Mock class for test. More...

#include <i2cmaster.hpp>

Inheritance diagram for rpp_driver::MockI2cMaster:
Inheritance graph
[legend]
Collaboration diagram for rpp_driver::MockI2cMaster:
Collaboration graph
[legend]

Public Member Functions

 MockI2cMaster (SdkWrapper &sdk)
 
 MOCK_METHOD4 (ReadBlocking, int(uint8_t addr, uint8_t *dst, size_t len, bool nostop))
 
 MOCK_METHOD4 (WriteBlocking, int(uint8_t addr, const uint8_t *src, size_t len, bool nostop))
 
 MOCK_METHOD1 (IsDeviceExisting, bool(uint8_t addr))
 
- Public Member Functions inherited from rpp_driver::I2cMaster
 I2cMaster (SdkWrapper &sdk, i2c_inst_t &i2c, uint clock_freq, uint scl_pin, uint sda_pin)
 Initialize the given I2C port and setup the pins.
 
virtual ~I2cMaster ()
 deinit the I2C by SdkWrapper::i2c_deinit();
 
virtual int ReadBlocking (uint8_t addr, uint8_t *dst, size_t len, bool nostop)
 Attempt to read specified number of bytes from address, blocking.
 
virtual int WriteBlocking (uint8_t addr, const uint8_t *src, size_t len, bool nostop)
 Attempt to write specified number of bytes to address, blocking.
 
virtual bool IsDeviceExisting (uint8_t addr)
 Check wether device at specified I2C address exists or not.
 

Detailed Description

Mock class for test.


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