This interface defines the contract that a backend-specific test harness (NativeResponderTest) must implement to be used with the generic pw::i2c::Responder tests.
|
static void | SetUpTestSuite () |
|
static void | TearDownTestSuite () |
|
static bool | HasFailure () |
|
virtual void | SetUp () |
|
virtual void | TearDown () |
|
◆ GetResponder()
virtual Responder & pw::i2c::test::NativeResponderTestInterface::GetResponder |
( |
| ) |
|
|
pure virtual |
Provides access to the backend-specific responder instance. The responder should have been configured with the callbacks provided to the NativeResponderTest constructor.
◆ SimulateInitiatorRead()
virtual Status pw::i2c::test::NativeResponderTestInterface::SimulateInitiatorRead |
( |
ByteSpan |
buffer, |
|
|
bool |
send_stop |
|
) |
| |
|
pure virtual |
Simulates an I2C initiator reading data from the responder.
- Parameters
-
buffer | The buffer into which the initiator will read data. |
send_stop | If true, a STOP condition is simulated after the read. |
- Returns
- OK: on success, all bytes were written.
- Error code when not all the bytes could be written.
◆ SimulateInitiatorWrite()
virtual Status pw::i2c::test::NativeResponderTestInterface::SimulateInitiatorWrite |
( |
ConstByteSpan |
write_data, |
|
|
bool |
send_stop |
|
) |
| |
|
pure virtual |
Simulates an I2C initiator writing data to the responder.
- Parameters
-
write_data | The data to be written by the initiator. |
send_stop | If true, a STOP condition is simulated after the write. |
- Returns
- OK: on successful simulation
- Error status otherwise.
The documentation for this class was generated from the following file: