Skip to main content

Python API Reference

Endpoint on Python: the same libraries as .NET, with identical class and method names, so code reads the same between the two.

Standard Python​

Python has no standard peripheral API, so GPIO, I2C, SPI, PWM, and the rest are published by GHI with class and method names identical to .NET. Serial ports use the de-facto standard third-party library.

LibraryDescription
pyserialSerial ports (UART) for Python.

Endpoint libraries​

LibraryDescription
GHIElectronics.Endpoint.CoreCore of the Endpoint libraries: board pin names and pin setup.
GHIElectronics.Endpoint.Devices.AdcAnalog inputs.
GHIElectronics.Endpoint.Devices.CameraUSB webcams, parallel-port cameras (DCMI), and shared camera settings and image conversion.
GHIElectronics.Endpoint.Devices.CanCAN on the board's CAN ports. CanController.Initialize sets a port up.
GHIElectronics.Endpoint.Devices.DacThe DAC driver for Endpoint.
GHIElectronics.Endpoint.Devices.DisplayThe display driver for Endpoint.
GHIElectronics.Endpoint.Devices.GpioDigital inputs and outputs.
GHIElectronics.Endpoint.Devices.I2cI2C bus master.
GHIElectronics.Endpoint.Devices.NetworkThe network driver for Endpoint.
GHIElectronics.Endpoint.Devices.PwmPWM channels.
GHIElectronics.Endpoint.Devices.RtcThe RTC driver for Endpoint.
GHIElectronics.Endpoint.Devices.SpiSPI bus master.
GHIElectronics.Endpoint.Devices.StorageSD cards and USB drives: insert and remove events, mounting.
GHIElectronics.Endpoint.Devices.TouchTouchscreen support. The Touch class is abstract: subclass it for your panel's chip (I2C, SPI, custom). Ships one concrete subclass, InputTouch, that wraps a kernel /dev/input/eventN (used for USB touchscreens).
GHIElectronics.Endpoint.Devices.UsbHostUSB devices: connected and disconnected events, what each device is and its port or network interface.
GHIElectronics.Endpoint.Devices.WatchdogThe watchdog driver for Endpoint.
GHIElectronics.Endpoint.DrawingOff-screen 2D drawing primitives: Canvas, Color, Font, Image, PixelFormat. Pure pixel drawing, independent of the LVGL-backed UI widget library.
GHIElectronics.Endpoint.UIUI widgets for Endpoint: Button, Label, Container, Image, TextBox, Slider, CheckBox on top of the embedded LVGL in libendpoint. Pair with the GHI UI designer.