i created custom application for use CP2112 in MSVC2017 15.7.1 ( adding SLABHIDDevice.dll SLABHIDDevice.h SLABHIDtoSMBus.dll SLABHIDtoSMBus.lib )
sometimes there is such behavior that nothing happens on the I2Cbus
but HidSmbus_Open return HID_SMBUS_SUCCESS ( and all other commands )
In the VisualStudio in the window Output writes CHIDDevice::Close(): device not open on function HidSmbus_Close
what could have happened and how to fix it ?
Full command sequence
HidSmbus_GetNumDevices return HID_SMBUS_SUCCESS dwNumDevices=1
HidSmbus_Open return HID_SMBUS_SUCCESS
HidSmbus_GetSmbusConfig return HID_SMBUS_SUCCESS bitRate=40000 ackAddress=2 autoRespond=1 writeTimeout=100 readTimeout=100 sclLowTimeout=0 transferRetries=1
HidSmbus_SetSmbusConfig return HID_SMBUS_SUCCESS bitRate=40000 ackAddress=2 autoRespond=1 writeTimeout=100 readTimeout=100 sclLowTimeout=0 transferRetries=1
HidSmbus_SetTimeouts return HID_SMBUS_SUCCESS
HidSmbus_CancelIo return HID_SMBUS_SUCCESS
HidSmbus_GetUsbConfig return HID_SMBUS_SUCCESS vid=10C4 pid=EA90 power=50mA powerMode=0 releaseVersion=100
HidSmbus_WriteRequest return HID_SMBUS_SUCCESS
HidSmbus_TransferStatusRequest return HID_SMBUS_SUCCESS
HidSmbus_GetTransferStatusResponse return HID_SMBUS_SUCCESS status0=1 status1=1 numRetries=0 bytesRead=0
HidSmbus_Close return HID_SMBUS_SUCCESS <-- VisualStudio in the window Output writes CHIDDevice::Close(): device not open
Could you upload your code? Could you verify that the HidSmbus_Close hasn't been called twice by accident?
Could you upload your code in the forum?
For an unknow reason, I cannot access your link.
It's a minor bug in SLABHIDtoSMBus which displays this kind of warning and it doesn't have any side effect on the program.
I think it'll be fixed in the future release of our SDK.