Skip to main content

DeviceInformation Class

Namespace: GHIElectronics.TinyCLR.Native · Assembly: GHIElectronics.TinyCLR.Native

Read-only metadata about the running device (name, manufacturer, firmware version) plus debug-interface and unique-ID controls.

public static class DeviceInformation

Properties

DeviceName

public static string DeviceName { get; }

The device's friendly name (settable via SetDeviceName).

ManufacturerName

public static string ManufacturerName { get; }

The manufacturer reported by the firmware.

Version

public static ulong Version { get; }

Firmware version (packed major/minor/build).

DebugInterface

public static DebugInterface DebugInterface { get; }

Active debugger transport.

DebugPort

public static uint DebugPort { get; }

Hardware port the debugger is bound to (controller index).

Methods

SetDebugInterface(DebugInterface debugInterface)

public static void SetDebugInterface(DebugInterface debugInterface)

Routes the debugger to a different transport without specifying a port.

ParameterTypeDescription
debugInterfaceDebugInterface

SetDebugInterface(DebugInterface debugInterface, int debugPort)

public static extern void SetDebugInterface(DebugInterface debugInterface, int debugPort)

Routes the debugger to a specific transport and port (e.g. UART2).

ParameterTypeDescription
debugInterfaceDebugInterface
debugPortint

IsModePinDisabled()

public static extern bool IsModePinDisabled()

True when the bootloader-mode pin has been disabled by firmware policy.

Returns bool

AppPinDisable()

public static extern void AppPinDisable()

Permanently disables the app-mode pin. Cannot be undone.

IsAppPinDisabled()

public static extern bool IsAppPinDisabled()

True when the app-mode pin has been disabled by AppPinDisable.

Returns bool

SetDeviceName(string name)

public static extern void SetDeviceName(string name)

Writes a new value for DeviceName. Persisted in secure storage.

ParameterTypeDescription
namestring

GetUniqueId()

public static extern byte[] GetUniqueId()

Returns the chip's unique 96-bit identifier (12 bytes).

Returns byte[]

GetCpuUsageStatistic()

extern static public double GetCpuUsageStatistic()

Returns a 0.0..1.0 estimate of recent CPU load.

Returns double