Raspberry.IO.InterIntegratedCircuit.I2cDriver.SafeReadUInt32 C# (CSharp) Method

SafeReadUInt32() private static method

private static SafeReadUInt32 ( IntPtr address ) : uint
address System.IntPtr
return uint
        private static uint SafeReadUInt32(IntPtr address)
        {
            // Make sure we dont return the _last_ read which might get lost
            // if subsequent code changes to a different peripheral
            unchecked
            {
                var returnValue = (uint) Marshal.ReadInt32(address);
                Marshal.ReadInt32(address);

                return returnValue;
            }
        }