Raspberry Pio Pico Drivers project
|
Mock class for test. More...
#include <i2cmaster.hpp>
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)) | |
![]() | |
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. | |
Mock class for test.