API Functions Index

This page provides a comprehensive index of all API functions available in the Nexus Embedded Platform, organized by module.

HAL API

Core HAL Functions

  • nx_hal_init() - Initialize HAL subsystem

  • nx_hal_deinit() - Deinitialize HAL subsystem

  • nx_hal_get_version() - Get HAL version

See HAL API Reference for complete HAL API documentation.

Factory Functions

GPIO Factory

  • nx_factory_gpio(port, pin) - Create GPIO device

  • nx_factory_gpio_with_config(port, pin, config) - Create GPIO with configuration

  • nx_factory_gpio_release(device) - Release GPIO device

UART Factory

  • nx_factory_uart(instance) - Create UART device

  • nx_factory_uart_with_config(instance, config) - Create UART with configuration

  • nx_factory_uart_release(device) - Release UART device

SPI Factory

  • nx_factory_spi(instance) - Create SPI device

  • nx_factory_spi_with_config(instance, config) - Create SPI with configuration

  • nx_factory_spi_release(device) - Release SPI device

I2C Factory

  • nx_factory_i2c(instance) - Create I2C device

  • nx_factory_i2c_with_config(instance, config) - Create I2C with configuration

  • nx_factory_i2c_release(device) - Release I2C device

GPIO Interface

  • gpio->write(gpio, value) - Write GPIO pin

  • gpio->read(gpio) - Read GPIO pin

  • gpio->toggle(gpio) - Toggle GPIO pin

  • gpio->set_mode(gpio, mode) - Set GPIO mode

  • gpio->set_pull(gpio, pull) - Set GPIO pull resistor

  • gpio->set_exti(gpio, trigger, callback, ctx) - Configure external interrupt

UART Interface

  • uart->get_tx_sync(uart) - Get synchronous TX interface

  • uart->get_rx_sync(uart) - Get synchronous RX interface

  • uart->get_tx_async(uart) - Get asynchronous TX interface

  • uart->get_rx_async(uart) - Get asynchronous RX interface

OSAL API

Core OSAL Functions

  • osal_init() - Initialize OSAL

  • osal_start() - Start OSAL scheduler

  • osal_get_backend() - Get current backend name

See OSAL API Reference for complete OSAL API documentation.

Task Management

  • osal_task_create(name, func, arg, priority, stack_size) - Create task

  • osal_task_delete(task) - Delete task

  • osal_task_suspend(task) - Suspend task

  • osal_task_resume(task) - Resume task

  • osal_task_delay(ms) - Delay task

  • osal_task_get_current() - Get current task handle

Synchronization

Mutex

  • osal_mutex_create() - Create mutex

  • osal_mutex_delete(mutex) - Delete mutex

  • osal_mutex_lock(mutex, timeout) - Lock mutex

  • osal_mutex_unlock(mutex) - Unlock mutex

  • osal_mutex_try_lock(mutex) - Try to lock mutex

Semaphore

  • osal_sem_create(initial_count, max_count) - Create semaphore

  • osal_sem_delete(sem) - Delete semaphore

  • osal_sem_wait(sem, timeout) - Wait on semaphore

  • osal_sem_post(sem) - Post semaphore

  • osal_sem_get_count(sem) - Get semaphore count

Message Queue

  • osal_queue_create(length, item_size) - Create queue

  • osal_queue_delete(queue) - Delete queue

  • osal_queue_send(queue, item, timeout) - Send to queue

  • osal_queue_receive(queue, item, timeout) - Receive from queue

  • osal_queue_available(queue) - Get available items

Timer

  • osal_timer_create(name, period, auto_reload, callback, arg) - Create timer

  • osal_timer_delete(timer) - Delete timer

  • osal_timer_start(timer) - Start timer

  • osal_timer_stop(timer) - Stop timer

  • osal_timer_reset(timer) - Reset timer

Config Manager API

  • nx_config_init() - Initialize Config Manager

  • nx_config_deinit() - Deinitialize Config Manager

  • nx_config_set(key, value, type) - Set configuration value

  • nx_config_get(key, value, type) - Get configuration value

  • nx_config_delete(key) - Delete configuration key

  • nx_config_commit() - Commit changes to storage

  • nx_config_rollback() - Rollback uncommitted changes

See Config Manager API Reference for complete Config Manager API documentation.

Log Framework API

  • nx_log_init() - Initialize Log Framework

  • nx_log_deinit() - Deinitialize Log Framework

  • NX_LOG_ERROR(tag, fmt, ...) - Log error message

  • NX_LOG_WARN(tag, fmt, ...) - Log warning message

  • NX_LOG_INFO(tag, fmt, ...) - Log info message

  • NX_LOG_DEBUG(tag, fmt, ...) - Log debug message

  • NX_LOG_TRACE(tag, fmt, ...) - Log trace message

See Log Framework API Reference for complete Log Framework API documentation.

Shell Framework API

  • nx_shell_init() - Initialize Shell Framework

  • nx_shell_deinit() - Deinitialize Shell Framework

  • nx_shell_register_command(name, handler, help) - Register command

  • nx_shell_unregister_command(name) - Unregister command

  • nx_shell_run() - Run shell main loop

See Shell Framework API Reference for complete Shell Framework API documentation.

Init Framework API

  • nx_init_register(level, func) - Register initialization function

  • NX_INIT_BOARD(func) - Register board-level init

  • NX_INIT_PREV(func) - Register pre-BSP init

  • NX_INIT_BSP(func) - Register BSP-level init

  • NX_INIT_DRIVER(func) - Register driver-level init

  • NX_INIT_COMPONENT(func) - Register component-level init

  • NX_INIT_APP(func) - Register application-level init

See Init Framework API Reference for complete Init Framework API documentation.

See Also