Skip to main content

SpiController Class

Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core

Chip-neutral entry point for SPI setup. Call once before using Spi.SpiDevice: it brings up the bus and muxes its pins.

public static class SpiController

Methods​

Initialize(int bus, int bufferSize)​

public static void Initialize(int bus, int bufferSize)

Connects the bus's SCK/MISO/MOSI pins. On EPM815, also sizes the kernel transfer buffer; on EPN256/EPN128 bufferSize is accepted for signature parity and otherwise ignored (the Nuvoton driver uses a fixed DMA buffer).

UnInitialize(int bus)​

public static void UnInitialize(int bus)

Releases the bus's pins back to free GPIO.