Skip to main content

API Reference

The ALP SDK's public surface lives under include/alp/. Every header is C99-compatible and Doxygen-documented; this page summarises what each one provides.

Conventions

All public APIs follow the same shape:

// Open a peripheral
alp_<class>_t *handle = alp_<class>_open(&(alp_<class>_config_t){ ... });
if (handle == NULL) {
int err = alp_last_error(); // ALP_ERR_NOSUPPORT, OUT_OF_RANGE, ...
}

// Operate
alp_err_t rc = alp_<class>_<op>(handle, ...);

// Close
alp_<class>_close(handle);
  • Handles are opaque pointers returned by _open(). NULL indicates failure.
  • alp_last_error() is a thread-local diagnostic. Read it whenever _open() returns NULL or *_op returns an error.
  • Instance IDs (E1M_I2C0, E1M_PWM3, …) come from <alp/e1m_pinout.h> and are portable across every E1M-conformant SoM.
  • alp_err_t is an integer; ALP_OK == 0. Failure codes are documented per-call but use a small common set (see Architecture).

Headers

Peripherals

HeaderPageWhat it provides
<alp/peripheral.h>PeripheralI²C, SPI, GPIO, UART — the four core bus classes
<alp/pwm.h>PWMPWM channels
<alp/adc.h>ADCAnalog-to-digital sampling, streaming, filters
<alp/counter.h>CounterCounters + quadrature encoder
<alp/i2s.h>I²SI²S / SAI audio bus
<alp/can.h>CANCAN / CAN-FD
<alp/rtc.h>RTCReal-time clock
<alp/wdt.h>WDTWatchdog timer
<alp/usb.h>USBUSB 2.0 / 3.0

Audio / camera / display

HeaderPageWhat it provides
<alp/audio.h>AudioPDM in + I²S out, ALP-default DSP chain
<alp/camera.h>CameraMIPI CSI / parallel camera, ISP
<alp/display.h>DisplayDisplay subsystem (raw)
<alp/gui.h>GUILVGL re-export with ALP defaults

Inference

HeaderPageWhat it provides
<alp/inference.h>InferenceNPU dispatcher (Ethos-U / DRP-AI / DEEPX / CPU)
<alp/dsp.h>DSPFIR/IIR/FFT chains over CMSIS-DSP

Connectivity & security

HeaderPageWhat it provides
<alp/iot.h>IoTWi-Fi station + MQTT
<alp/ble.h>BLEBLE 5.4 peripheral + central
<alp/security.h>SecurityMbedTLS PSA Crypto (hash / AEAD / TRNG)

System

HeaderPageWhat it provides
<alp/rpc.h>RPCFramed RPC over OpenAMP/RPMsg (heterogeneous IPC)
<alp/mproc.h>MprocRaw mailbox / shared mem / hwsem primitives
<alp/hw_info.h>HW InfoEEPROM manifest + BOARD_ID ADC
<alp/power.h>PowerSystem power modes
<alp/storage.h>StorageBlock storage, optional inline AES

Capability / portability

HeaderWhat it provides
<alp/soc_caps.h>(generated) Active-SoC capability constants used by *_open().
<alp/e1m_pinout.h>E1M-spec instance IDs + portability bounds (E1M_<CLASS>_COUNT).
<alp/boards/<carrier>.h>Carrier-feature names (e.g. EVK pin map).

Generated headers

HeaderWhat it provides
<alp/system_ipc.h>Endpoint IDs, addresses, mailbox channel macros — emitted from board.yaml's ipc: block. Both halves of a heterogeneous project #include it.
<alp_hw_info_build.h>ALP_HW_BUILD_* macros baked from board.yaml's som: / carrier: blocks.

Chip drivers

50+ drivers under <alp/chips/...> — opt-in via board.yaml's chips: array. Each driver follows the same shape: <chip>_init(&ctx, bus, ...) → per-feature getters / setters. Driver names use the chip's natural manufacturer name (lsm6dso_*, ssd1306_*, gd32g553_*); the alp_ prefix is reserved for SDK-level abstractions.

ABI stability

Every public header is annotated [ABI-STABLE] or [ABI-EXPERIMENTAL] at the file-level Doxygen block. The SDK ships an ABI snapshot + a pr-abi-snapshot.yml CI job that blocks merges which change the binary surface without an explicit bump. Stable headers carry that contract until the next major bump; experimental headers (e.g. <alp/gpu2d.h>, the wave-2 <alp/dsp.h> chain types, <alp/power.h>'s mode setter) reserve the right to evolve pre-v1.0.

Pin your SDK to a specific commit if you depend on an experimental surface. See docs/abi-stability.md for the policy.

Per-row implementation status

Some headers are surface-only on certain (OS × SoM) combinations — the call returns NULL + ALP_ERR_NOSUPPORT. The authoritative per-row status lives in the SDK repo:

Doxygen

The full Doxygen-rendered reference is available in the SDK repo at docs/doxygen/. Build locally with doxygen Doxyfile.

Where next

Questions about this page? Discuss in Community Forum