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.
| Library | Description |
|---|---|
| pyserial | Serial ports (UART) for Python. |
Endpoint libraries
| Library | Description |
|---|---|
| GHIElectronics.Endpoint.Core | Core of the Endpoint libraries: board pin names and pin setup. |
| GHIElectronics.Endpoint.Devices.Adc | Analog inputs. |
| GHIElectronics.Endpoint.Devices.Camera | USB webcams, parallel-port cameras (DCMI), and shared camera settings and image conversion. |
| GHIElectronics.Endpoint.Devices.Can | CAN on the board's CAN ports. CanController.Initialize sets a port up. |
| GHIElectronics.Endpoint.Devices.Dac | The DAC driver for Endpoint. |
| GHIElectronics.Endpoint.Devices.Display | The display driver for Endpoint. |
| GHIElectronics.Endpoint.Devices.Gpio | Digital inputs and outputs. |
| GHIElectronics.Endpoint.Devices.I2c | I2C bus master. |
| GHIElectronics.Endpoint.Devices.Network | The network driver for Endpoint. |
| GHIElectronics.Endpoint.Devices.Pwm | PWM channels. |
| GHIElectronics.Endpoint.Devices.Rtc | The RTC driver for Endpoint. |
| GHIElectronics.Endpoint.Devices.Spi | SPI bus master. |
| GHIElectronics.Endpoint.Devices.Storage | SD cards and USB drives: insert and remove events, mounting. |
| GHIElectronics.Endpoint.Devices.Touch | Touchscreen 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.UsbHost | USB devices: connected and disconnected events, what each device is and its port or network interface. |
| GHIElectronics.Endpoint.Devices.Watchdog | The watchdog driver for Endpoint. |
| GHIElectronics.Endpoint.Drawing | Off-screen 2D drawing primitives: Canvas, Color, Font, Image, PixelFormat. Pure pixel drawing, independent of the LVGL-backed UI widget library. |
| GHIElectronics.Endpoint.UI | UI widgets for Endpoint: Button, Label, Container, Image, TextBox, Slider, CheckBox on top of the embedded LVGL in libendpoint. Pair with the GHI UI designer. |