NativeUtils Class
Package: GHIElectronics.Endpoint.Core
Namespace: GHIElectronics.Endpoint.Core
Low-level helpers backed by the native nativeutils.so library: a CPU wait-for-interrupt and a hardware-assisted JPEG to RGB888 decoder.
class NativeUtils: ...
Methods
JpegtoRGB888(byte[] src, int size, byte[] dest)
@staticmethod
def JpegtoRGB888(src: list[int], size: int, dest: list[int]) -> None:
Decodes a JPEG image to packed 24-bit RGB888 pixels. Uses the hardware JPEG decoder when the chip has one; otherwise a software decoder in the native library.
| Parameter | Type | Description |
|---|---|---|
src | byte[] | JPEG-encoded bytes. |
size | int | Number of valid bytes in src. |
dest | byte[] | Destination buffer, large enough for width * height * 3 bytes. |
WaitForInterrupt()
@staticmethod
def WaitForInterrupt() -> None:
Blocks the calling thread with the ARM WFI (wait-for-interrupt) instruction. The core sleeps until the next interrupt is delivered.