Skip to main content

Class DebugInformation

This class provides static helper methods used for debugging

Assembly: Meadow.Foundation.dll
View Source
public class DebugInformation

Methods

Hexadecimal(byte[])

Convert a byte array to a series of hexadecimal numbers separated by a minus sign.

View Source
public static string Hexadecimal(byte[] bytes)
Returns

System.String: series of hexadecimal bytes in the format xx-yy-zz

Parameters
TypeNameDescription
System.Byte[]bytesArray of bytes to convert.

Hexadecimal(byte)

Convert a byte into hexadecimal including the "0x" prefix.

View Source
public static string Hexadecimal(byte b)
Returns

System.String: Hexadecimal string including the 0x prefix.

Parameters
TypeNameDescription
System.BytebValue to convert.

Hexadecimal(ushort)

Convert an unsigned short into hexadecimal.

View Source
public static string Hexadecimal(ushort us)
Returns

System.String: Hexadecimal representation of the unsigned short.

Parameters
TypeNameDescription
System.UInt16usUnsigned short value to convert.

Hexadecimal(int)

Convert an integer into hexadecimal.

View Source
public static string Hexadecimal(int i)
Returns

System.String: Hexadecimal representation of the unsigned short.

Parameters
TypeNameDescription
System.Int32iInteger to convert to hexadecimal.

DisplayRegisters(byte, Span<byte>)

Dump the array of bytes to the debug output in hexadecimal.

View Source
public static void DisplayRegisters(byte startAddress, Span<byte> registers)
Parameters
TypeNameDescription
System.BytestartAddressStarting address of the register.
System.Span<System.Byte>registersByte array of the register contents.