Пример #1
0
        private int _I2cWrite(byte devAddr, byte length, byte[] data)
        {
            int rv;

            if (i2cMaster.connected == false)
            {
                if (_I2cMasterConnect() < 0)
                {
                    return(-1);
                }
            }

            rv = i2cMaster.WriteRawApi(devAddr, length, data);
            if (rv < 0)
            {
                MessageBox.Show("QSFP+ module no response!!");
                _I2cMasterDisconnect();
            }

            return(rv);
        }