|
oveRTOS C API
Embedded RTOS framework — build system, configuration, and portable C API
|
Common error codes, opaque handle types, and utility macros used throughout the oveRTOS public API. More...
Macros | |
| #define | OVE_NONNULL(...) |
| #define | OVE_NODISCARD |
| #define | OVE_RETURNS_NONNULL |
| #define | OVE_DEPRECATED(msg) |
| #define | OVE_WAIT_FOREVER UINT64_MAX |
| Timeout value that means "block indefinitely". | |
| #define | OVE_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg) |
| #define | OVE_RTOS_NAME "FreeRTOS" |
| Compile-time string identifying the active RTOS backend. | |
Typedefs | |
| typedef struct ove_thread * | ove_thread_t |
| Opaque handle for a thread object. | |
| typedef struct ove_mutex * | ove_mutex_t |
| Opaque handle for a mutex object. | |
| typedef struct ove_sem * | ove_sem_t |
| Opaque handle for a counting semaphore object. | |
| typedef struct ove_event * | ove_event_t |
| Opaque handle for a binary event (signal/wait) object. | |
| typedef struct ove_condvar * | ove_condvar_t |
| Opaque handle for a condition variable object. | |
| typedef struct ove_eventgroup * | ove_eventgroup_t |
| Opaque handle for an event-group (bit-field) object. | |
| typedef struct ove_workqueue * | ove_workqueue_t |
| Opaque handle for a work queue object. | |
| typedef struct ove_work * | ove_work_t |
| Opaque handle for a deferred work item. | |
| typedef struct ove_stream * | ove_stream_t |
| Opaque handle for a byte-stream (ring-buffer) object. | |
| typedef struct ove_watchdog * | ove_watchdog_t |
| Opaque handle for a software watchdog object. | |
| typedef struct ove_file * | ove_file_t |
| Opaque handle for an open file. | |
| typedef struct ove_dir * | ove_dir_t |
| Opaque handle for an open directory. | |
| typedef struct ove_model * | ove_model_t |
| Opaque handle for an ML inference model session. | |
| typedef struct ove_socket * | ove_socket_t |
| Opaque handle for a network socket. | |
| typedef struct ove_netif * | ove_netif_t |
| Opaque handle for a network interface. | |
| typedef struct ove_tls * | ove_tls_t |
| Opaque handle for a TLS session. | |
| typedef struct ove_http_client * | ove_http_client_t |
| Opaque handle for an HTTP client. | |
| typedef struct ove_mqtt_client * | ove_mqtt_client_t |
| Opaque handle for an MQTT client. | |
| typedef struct ove_uart * | ove_uart_t |
| Opaque handle for a UART peripheral. | |
| typedef struct ove_spi * | ove_spi_t |
| Opaque handle for an SPI bus controller. | |
| typedef struct ove_i2c * | ove_i2c_t |
| Opaque handle for an I2C bus controller. | |
| typedef struct ove_i2s * | ove_i2s_t |
| Opaque handle for an I2S / SAI bus controller. | |
| typedef uint32_t | ove_eventbits_t |
| Bit-mask type used by the event-group API. | |
| typedef void(* | ove_notify_cb) (void *user_data) |
Notify-callback signature used by the _set_notify variants of the comm primitives (stream / queue / eventgroup / semaphore). | |
| typedef void(* | ove_dma_complete_cb) (int result, void *user_data) |
| DMA / async transfer completion callback signature. | |
Enumerations | |
| enum | ove_err_t { OVE_OK = 0 , OVE_ERR_NOT_REGISTERED = -1 , OVE_ERR_INVALID_PARAM = -2 , OVE_ERR_NO_MEMORY = -3 , OVE_ERR_TIMEOUT = -4 , OVE_ERR_NOT_SUPPORTED = -5 , OVE_ERR_QUEUE_FULL = -6 , OVE_ERR_ML_FAILED = -7 , OVE_ERR_NET_REFUSED = -8 , OVE_ERR_NET_UNREACHABLE = -9 , OVE_ERR_NET_ADDR_IN_USE = -10 , OVE_ERR_NET_RESET = -11 , OVE_ERR_NET_DNS_FAIL = -12 , OVE_ERR_NET_CLOSED = -13 , OVE_ERR_BUS_NACK = -14 , OVE_ERR_BUS_BUSY = -15 , OVE_ERR_BUS_ERROR = -16 , OVE_ERR_QUEUE_EMPTY = -17 , OVE_ERR_WOULD_BLOCK = -18 , OVE_ERR_EOF = -19 , OVE_ERR_INVAL = -20 , OVE_ERR_NOT_FOUND = -21 } |
| oveRTOS error codes. More... | |
Functions | |
| OVE_STATIC_ASSERT (OVE_ERR_NOT_REGISTERED==-1, "OVE_ERR_NOT_REGISTERED drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_INVALID_PARAM==-2, "OVE_ERR_INVALID_PARAM drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NO_MEMORY==-3, "OVE_ERR_NO_MEMORY drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_TIMEOUT==-4, "OVE_ERR_TIMEOUT drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NOT_SUPPORTED==-5, "OVE_ERR_NOT_SUPPORTED drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_QUEUE_FULL==-6, "OVE_ERR_QUEUE_FULL drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_ML_FAILED==-7, "OVE_ERR_ML_FAILED drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_REFUSED==-8, "OVE_ERR_NET_REFUSED drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_UNREACHABLE==-9, "OVE_ERR_NET_UNREACHABLE drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_ADDR_IN_USE==-10, "OVE_ERR_NET_ADDR_IN_USE drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_RESET==-11, "OVE_ERR_NET_RESET drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_DNS_FAIL==-12, "OVE_ERR_NET_DNS_FAIL drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NET_CLOSED==-13, "OVE_ERR_NET_CLOSED drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_BUS_NACK==-14, "OVE_ERR_BUS_NACK drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_BUS_BUSY==-15, "OVE_ERR_BUS_BUSY drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_BUS_ERROR==-16, "OVE_ERR_BUS_ERROR drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_QUEUE_EMPTY==-17, "OVE_ERR_QUEUE_EMPTY drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_WOULD_BLOCK==-18, "OVE_ERR_WOULD_BLOCK drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_EOF==-19, "OVE_ERR_EOF drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_INVAL==-20, "OVE_ERR_INVAL drifted") | |
| OVE_STATIC_ASSERT (OVE_ERR_NOT_FOUND==-21, "OVE_ERR_NOT_FOUND drifted") | |
| OVE_STATIC_ASSERT (OVE_WAIT_FOREVER==UINT64_MAX, "OVE_WAIT_FOREVER drifted") | |
Common error codes, opaque handle types, and utility macros used throughout the oveRTOS public API.
| #define OVE_WAIT_FOREVER UINT64_MAX |
Timeout value that means "block indefinitely".
Pass this as the timeout_ns argument to any blocking API (or as the deadline_ns argument to an _until variant) to wait without a deadline.
| #define OVE_RTOS_NAME "FreeRTOS" |
Compile-time string identifying the active RTOS backend.
Resolved to a human-readable string literal ("FreeRTOS", "Zephyr", "NuttX", "POSIX", or "Unknown") based on which CONFIG_OVE_RTOS_* symbol is defined in ove_config.h.
| typedef struct ove_thread* ove_thread_t |
Opaque handle for a thread object.
| typedef struct ove_mutex* ove_mutex_t |
Opaque handle for a mutex object.
| typedef struct ove_sem* ove_sem_t |
Opaque handle for a counting semaphore object.
| typedef struct ove_event* ove_event_t |
Opaque handle for a binary event (signal/wait) object.
| typedef struct ove_condvar* ove_condvar_t |
Opaque handle for a condition variable object.
| typedef struct ove_model* ove_model_t |
Opaque handle for an ML inference model session.
| typedef struct ove_socket* ove_socket_t |
Opaque handle for a network socket.
| typedef struct ove_netif* ove_netif_t |
Opaque handle for a network interface.
| typedef struct ove_tls* ove_tls_t |
Opaque handle for a TLS session.
| typedef struct ove_http_client* ove_http_client_t |
Opaque handle for an HTTP client.
| typedef struct ove_mqtt_client* ove_mqtt_client_t |
Opaque handle for an MQTT client.
| typedef struct ove_uart* ove_uart_t |
Opaque handle for a UART peripheral.
| typedef struct ove_spi* ove_spi_t |
Opaque handle for an SPI bus controller.
| typedef struct ove_i2c* ove_i2c_t |
Opaque handle for an I2C bus controller.
| typedef struct ove_i2s* ove_i2s_t |
Opaque handle for an I2S / SAI bus controller.
| typedef uint32_t ove_eventbits_t |
Bit-mask type used by the event-group API.
Each bit represents a distinct event flag. Up to 32 independent flags can be combined in a single event group.
| typedef void(* ove_notify_cb) (void *user_data) |
Notify-callback signature used by the _set_notify variants of the comm primitives (stream / queue / eventgroup / semaphore).
Invoked from inside the producing call (e.g. ove_stream_send) after a successful update. The implementation must be short, non-blocking, and safe to call from whatever context the originating send/give/set ran in — typically a Rust AtomicWaker::wake bridge for the async runtime.
_set_notify registration is setup-time only: it is NOT safe to call concurrently with producing operations on the same primitive, since those read the callback pointer without synchronisation. Register the callback once before the primitive is shared across contexts (the async bridge registers it at construction).| [in] | user_data | Opaque pointer supplied at _set_notify time. |
| typedef void(* ove_dma_complete_cb) (int result, void *user_data) |
DMA / async transfer completion callback signature.
Invoked by ove_spi_transfer_async / ove_i2c_write_read_async (and similar) when a transfer finishes. Runs in whatever context the backend's completion fires in: ISR on real DMA-capable hardware (STM32F7 HAL), thread on simulator / worker-thread fallback paths. Implementations must be non-blocking and ISR-safe.
| [in] | result | OVE_OK on success, negative OVE_ERR_* on failure. |
| [in] | user_data | Opaque pointer passed to the _async call. |
| enum ove_err_t |
oveRTOS error codes.
Convention: zero (OVE_OK) on success, negative values on error. Numeric values are pinned by the _Static_assert block below — the names and codes form the stable C ABI between substrate and bindings.
Function APIs return int (not ove_err_t) for ABI compatibility and to keep the int rc = ...; if (rc < 0) idiom unchanged. Bindings consume the typed enum via bindgen / @cImport.