ms-iot / BusProviders

Repository for Windows IoT Core Bus Provider Libraries
MIT License
40 stars 44 forks source link

Any ways to control ACK and NACK on I2C #39

Closed AlexandrSurkov closed 7 years ago

AlexandrSurkov commented 8 years ago

Hello! Is there any way to control ACK\NACK responses for I2C from C#? I need to simulate some device that respond NACK for START condition when device is busy...

jordanrh1 commented 7 years ago

If the device fails to acknowledge its slave address, an exception will be thrown. If you wish to handle this in an exception-free way, use I2cDevice.WritePartial/ReadPartial/WriteReadPartial. They will return I2cTransferStatus.SlaveAddressNotAcknowledged if the slave address is not acknowledged.

It is not possible to simulate an I2C device on Windows because we support host mode only. We do not support I2C slave mode.

IoTGirl commented 7 years ago

Answer given - Closing issue