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 subsystemnx_hal_deinit()- Deinitialize HAL subsystemnx_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 devicenx_factory_gpio_with_config(port, pin, config)- Create GPIO with configurationnx_factory_gpio_release(device)- Release GPIO device
UART Factory¶
nx_factory_uart(instance)- Create UART devicenx_factory_uart_with_config(instance, config)- Create UART with configurationnx_factory_uart_release(device)- Release UART device
SPI Factory¶
nx_factory_spi(instance)- Create SPI devicenx_factory_spi_with_config(instance, config)- Create SPI with configurationnx_factory_spi_release(device)- Release SPI device
I2C Factory¶
nx_factory_i2c(instance)- Create I2C devicenx_factory_i2c_with_config(instance, config)- Create I2C with configurationnx_factory_i2c_release(device)- Release I2C device
GPIO Interface¶
gpio->write(gpio, value)- Write GPIO pingpio->read(gpio)- Read GPIO pingpio->toggle(gpio)- Toggle GPIO pingpio->set_mode(gpio, mode)- Set GPIO modegpio->set_pull(gpio, pull)- Set GPIO pull resistorgpio->set_exti(gpio, trigger, callback, ctx)- Configure external interrupt
UART Interface¶
uart->get_tx_sync(uart)- Get synchronous TX interfaceuart->get_rx_sync(uart)- Get synchronous RX interfaceuart->get_tx_async(uart)- Get asynchronous TX interfaceuart->get_rx_async(uart)- Get asynchronous RX interface
OSAL API¶
Core OSAL Functions¶
osal_init()- Initialize OSALosal_start()- Start OSAL schedulerosal_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 taskosal_task_delete(task)- Delete taskosal_task_suspend(task)- Suspend taskosal_task_resume(task)- Resume taskosal_task_delay(ms)- Delay taskosal_task_get_current()- Get current task handle
Synchronization¶
Mutex¶
osal_mutex_create()- Create mutexosal_mutex_delete(mutex)- Delete mutexosal_mutex_lock(mutex, timeout)- Lock mutexosal_mutex_unlock(mutex)- Unlock mutexosal_mutex_try_lock(mutex)- Try to lock mutex
Semaphore¶
osal_sem_create(initial_count, max_count)- Create semaphoreosal_sem_delete(sem)- Delete semaphoreosal_sem_wait(sem, timeout)- Wait on semaphoreosal_sem_post(sem)- Post semaphoreosal_sem_get_count(sem)- Get semaphore count
Message Queue¶
osal_queue_create(length, item_size)- Create queueosal_queue_delete(queue)- Delete queueosal_queue_send(queue, item, timeout)- Send to queueosal_queue_receive(queue, item, timeout)- Receive from queueosal_queue_available(queue)- Get available items
Timer¶
osal_timer_create(name, period, auto_reload, callback, arg)- Create timerosal_timer_delete(timer)- Delete timerosal_timer_start(timer)- Start timerosal_timer_stop(timer)- Stop timerosal_timer_reset(timer)- Reset timer
Config Manager API¶
nx_config_init()- Initialize Config Managernx_config_deinit()- Deinitialize Config Managernx_config_set(key, value, type)- Set configuration valuenx_config_get(key, value, type)- Get configuration valuenx_config_delete(key)- Delete configuration keynx_config_commit()- Commit changes to storagenx_config_rollback()- Rollback uncommitted changes
See Config Manager API Reference for complete Config Manager API documentation.
Log Framework API¶
nx_log_init()- Initialize Log Frameworknx_log_deinit()- Deinitialize Log FrameworkNX_LOG_ERROR(tag, fmt, ...)- Log error messageNX_LOG_WARN(tag, fmt, ...)- Log warning messageNX_LOG_INFO(tag, fmt, ...)- Log info messageNX_LOG_DEBUG(tag, fmt, ...)- Log debug messageNX_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 Frameworknx_shell_deinit()- Deinitialize Shell Frameworknx_shell_register_command(name, handler, help)- Register commandnx_shell_unregister_command(name)- Unregister commandnx_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 functionNX_INIT_BOARD(func)- Register board-level initNX_INIT_PREV(func)- Register pre-BSP initNX_INIT_BSP(func)- Register BSP-level initNX_INIT_DRIVER(func)- Register driver-level initNX_INIT_COMPONENT(func)- Register component-level initNX_INIT_APP(func)- Register application-level init
See Init Framework API Reference for complete Init Framework API documentation.
See Also¶
API Reference - API Reference Overview
Configuration Options Index - Configuration Options Index
Index - General Index
Module Index - Module Index
Search Page - Search Documentation