public static ushort ReadWordUsingByteBigEndian(this IBytePeripheral peripheral, long address) { unchecked { return((ushort)(peripheral.ReadByte(address + 1) | peripheral.ReadByte(address) << 8)); } }
public static uint ReadDoubleWordUsingByteBigEndian(this IBytePeripheral peripheral, long address) { unchecked { return((uint) (peripheral.ReadByte(address + 3) | peripheral.ReadByte(address + 2) << 8 | peripheral.ReadByte(address + 1) << 16 | peripheral.ReadByte(address) << 24)); } }