Skip to main content

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)​

static void JpegtoRGB888(const std::vector<uint8_t>& src, int32_t size, const std::vector<uint8_t>& dest);

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.

ParameterTypeDescription
srcbyte[]JPEG-encoded bytes.
sizeintNumber of valid bytes in src.
destbyte[]Destination buffer, large enough for width * height * 3 bytes.

WaitForInterrupt()​

static void WaitForInterrupt();

Blocks the calling thread with the ARM WFI (wait-for-interrupt) instruction. The core sleeps until the next interrupt is delivered.