Skip to content

First, What Is It

  • API: functions the SDK exposes to applications. This column is sourced from the SDK public headers (drivers/lhal/include, components/*) and organizes 1800+ APIs by component.
  • Universal pattern: almost every driver API follows "get device handle → init → operate → handle result", see Kernel & System APIs.
  • Descriptions: based on the SDK header doxygen comments and driver implementations; Chinese pages use Chinese descriptions, English pages use the English originals.

Chip scope

This column targets the Ai-M61 / Ai-M62 (BL616/BL618). In the SDK, BL616CL corresponds to the Ai-Thinker Ai-M64 series; its exclusive peripherals (e.g., touch v2, ADC v2, PEC, DSI, video decode, DMA2D) are marked with "(Ai-M64 only)" and are not supported by Ai-M61/Ai-M62.

API Category Index

CategoryContentsPage
Kernel & Systemdevice handle, interrupt, clock, reset, timer, multi-core syncKernel & System APIs
Basic PeripheralsGPIO/UART/SPI/I2C/ADC/PWM/Timer/DMA/Flash, etc.Basic Peripheral APIs
Multimediadisplay (DBI/DSI/DVP/OSD/touch) and audio/video (I2S/AUADC/AUDAC/CAM/MJPEG)Multimedia APIs
Security & EncryptionAES/SHA/PKA/TRNG/ECDSA/DSA security enginesSecurity & Encryption APIs
System, Storage & UpgradeMTD/EasyFlash, FATFS/LittleFS, coredump, OTASystem, Storage & Upgrade APIs
FreeRTOStasks, queues, semaphores, mutexes, event groups, timersFreeRTOS APIs
WiFi & Networkwifi_mgmr, fhost, lwIP socketWiFi & Network APIs
BLEcontroller, host stack, GAP/GATT/connectionBLE APIs
Shell & Loggingserial shell, bflog levelsShell & Logging APIs

Usage Pattern (Learn One, Apply to All)

c
/* 1. Get the device handle */
struct bflb_device_s *dev = bflb_device_get_by_name("uart0");
/* 2. Init (mode/parameters/rate) */
bflb_uart_init(dev, config);
/* 3. Operate (read/write/start/stop) */
/* 4. Handle result/status */

Common Exam & Interview Questions

Why does every SDK API start with bflb_device_get_by_name?

The device model maps "device name → handle (address/IRQ/operation table)"; driver APIs work through the handle, so changing instances or chips keeps the code style stable.

How to quickly find the API for a peripheral?

The API prefix is the peripheral name (GPIO is bflb_gpio_*, UART is bflb_uart_*, Wi-Fi is wifi_mgmr_*, BLE is bt_*); locate the category here, then check the header file.

Have questions?

For any other questions, visit the unified Q&A and discussion board: Ai-Thinker Discussions

Released under the MIT License. Build Time 2026-09-11 14:52:23