On 6/16/21 2:42 PM, Philippe Mathieu-Daudé wrote:
+static int i2c_do_start_transfer(I2CBus *bus, uint8_t address,
+ enum i2c_event event)
{
I2CSlaveClass *sc;
I2CNode *node;
bool bus_scanned = false;
+ assert(event == I2C_START_RECV || event == I2C_START_SEND);
I don't think you need the assert, given that its scope is limited, and there will be exactly 3 users that immediately follow. Document it if you like.
Otherwise, Reviewed-by: Richard Henderson <[email protected]> r~
