Skip to main content

GHIElectronics.TinyCLR.Native

NuGet package containing 19 types.

Classes

ClassNamespaceSummary
DeviceInformationGHIElectronics.TinyCLR.NativeRead-only metadata about the running device (name, manufacturer, firmware version) plus debug-interface and unique-ID controls.
FlashGHIElectronics.TinyCLR.NativeControls how the firmware uses the device's flash storage. Most apps don't need this — call EnableExtendDeployment only on devices with external flash that should be used to extend the deployment region.
InteropGHIElectronics.TinyCLR.NativeRepresents an interop module — a native C library whose methods are callable from managed code via [MethodImpl(InternalCall)]. Use FindAll to enumerate every interop module the firmware exposes.
InterruptGHIElectronics.TinyCLR.NativeCPU interrupt mask. Wrap a tight critical section in Disable/Enable to prevent context switches and hardware interrupts from running during it. Keep the disabled window short — while interrupts are off, RTOS threads cannot preempt and ISR latencies grow.
MemoryGHIElectronics.TinyCLR.NativeAllocator façade exposing both the managed (GC) heap and the unmanaged heap. Most apps don't touch this directly — use UnmanagedBuffer when you need a fixed-address byte buffer (for DMA, native interop, etc.).
NativeApiGHIElectronics.TinyCLR.NativeHandle to a native API surfaced by the firmware. Use Find to obtain a specific API by name, or FindAll to enumerate everything the firmware exposes.
NativeEventDispatcherGHIElectronics.TinyCLR.NativeMarshals native ISR events to managed handlers. One dispatcher exists per well-known event name (e.g. GHIElectronics.TinyCLR.NativeEventNames.Gpio.PinChanged); retrieve the singleton with GetDispatcher(string) and subscribe to OnInterrupt. The first subscription enables the native interrupt; removing the last one disables it.
PowerGHIElectronics.TinyCLR.NativePower-management entry points: Reset for a soft reset, Sleep() for low-power stop with wake-up, Shutdown for power-off with RTC/pin wake-up, and SetSystemClock for dynamic clock scaling.
SystemTimeGHIElectronics.TinyCLR.NativeReads and writes the system wall clock (separate from the GHIElectronics.TinyCLR.Devices.Rtc.RtcController chip register). Time zone is carried as a minutes-from-UTC offset.
UnmanagedBufferGHIElectronics.TinyCLR.NativeA fixed-address byte buffer suitable for DMA targets and native interop. The Bytes property exposes it as a regular byte[]. Dispose to release the underlying memory.

Interfaces

InterfaceNamespaceSummary
IApiImplementationGHIElectronics.TinyCLR.NativeImplemented by managed wrappers that expose their underlying native handle.

Enums

EnumNamespaceSummary
DebugInterfaceGHIElectronics.TinyCLR.NativeTransport used by the debugger to attach to the device.
NativeApiTypeGHIElectronics.TinyCLR.Native
ResetSourceGHIElectronics.TinyCLR.NativeReasons reported by Power.GetResetSource.
SystemClockGHIElectronics.TinyCLR.NativeCore-clock profile.
UnmanagedBufferLocationGHIElectronics.TinyCLR.NativeWhich heap an UnmanagedBuffer draws from.
WakeupEdgeGHIElectronics.TinyCLR.NativePolarity of the wake-up pin.

Delegates

DelegateNamespaceSummary
DefaultCreatorGHIElectronics.TinyCLR.NativeFactory used when a managed library asks for the "default" API of a given type.
NativeEventHandlerGHIElectronics.TinyCLR.NativeHandler signature for NativeEventDispatcher.OnInterrupt.