Skip to main content

SerialPortController Class

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

Chip-neutral entry point for UART / serial-port setup. Call once before using System.IO.Ports.SerialPort: it muxes the TX/RX pins (plus RTS/CTS when flow control is on) and makes /dev/ttyS* usable.

class SerialPortController: ...

Methods​

Initialize(string portName, bool enableHardwareFlowControl)​

@staticmethod
def Initialize(portName: str, enableHardwareFlowControl: bool) -> None:

Muxes the port's pins. When enableHardwareFlowControl is set, RTS and (where bonded out) CTS are muxed too.

UnInitialize(string portName)​

@staticmethod
def UnInitialize(portName: str) -> None:

Releases the port's pins back to free GPIO.