// DeviceCode\Targets\Native\AT91\DeviceCode\AT91_I2C\AT91__I2C.cpp, line 123 if (g_AT91_I2C_Driver.m_currentXActionUnit->IsReadXActionUnit()) { address |= AT91_I2C::TWI_MMR_MREAD_R ; // Experimental: Master Read with hardcoded IADR -> repeated start bit address |= AT91_I2C::TWI_MMR_IADRSZ_1; // Size = 1 I2C.TWI_IADR = 0x7; // Melexis RAM Tobj1 Address }Although this fits my particular needs, it obviously cannot be used as a general solution. After a bit of further investigation, it seems to be possible to modify the I2CDevice::Execute() method (in spot_hardware_native_Microsoft_SPOT_Hardware_I2CDevice.cpp) to examine the list of transactions and replace Write+Read sequences with a Read transaction that takes the buffer from preceding Write transaction and sets it as internal address (up to three bytes supported). The internal address can be stored in new attributes of I2C_HAL_XACTION structure and the value can be set to TWI registers in AT91_I2C_Driver::MasterXAction_Start.
Note: I focused on the native layer, because most of the managed classes are sealed and modification would result in a need to rebuild and distribute the whole SDK (managed dlls) along with the firmware.
If anyone is interested in doing this (perhaps in a completely different/much better way), I will be glad to provide more detailed information and I can test the code - unfortunately, I cannot do it by myself right now, because I am busy finishing OneWire support.