23#if !defined(__GNUC__) && !defined(__clang__)
24#error "oveRTOS requires a GCC-compatible compiler (gcc or clang). Other toolchains (MSVC, etc.) are not supported: the substrate uses __attribute__ extensions, statement expressions, and other GCC-flavoured features throughout."
36#if defined(__BINDGEN__) || defined(__ZIG_CIMPORT__) || defined(__EMSCRIPTEN__) || \
38#define OVE_NONNULL(...)
40#define OVE_RETURNS_NONNULL
41#define OVE_DEPRECATED(msg)
52#define OVE_NONNULL(...) __attribute__((nonnull(__VA_ARGS__)))
61#define OVE_NODISCARD __attribute__((warn_unused_result))
64#define OVE_RETURNS_NONNULL __attribute__((returns_nonnull))
67#define OVE_DEPRECATED(msg) __attribute__((deprecated(msg)))
162#define OVE_WAIT_FOREVER UINT64_MAX
179#if defined(__cplusplus)
180#define OVE_STATIC_ASSERT(cond, msg) static_assert(cond, msg)
182#define OVE_STATIC_ASSERT(cond, msg) _Static_assert(cond, msg)
202OVE_STATIC_ASSERT(
OVE_ERR_EOF == -19,
"OVE_ERR_EOF drifted");
203OVE_STATIC_ASSERT(
OVE_ERR_INVAL == -20,
"OVE_ERR_INVAL drifted");
205OVE_STATIC_ASSERT(
OVE_WAIT_FOREVER == UINT64_MAX,
"OVE_WAIT_FOREVER drifted");
315#include "ove_config.h"
324#if defined(CONFIG_OVE_RTOS_FREERTOS)
325#define OVE_RTOS_NAME "FreeRTOS"
326#elif defined(CONFIG_OVE_RTOS_ZEPHYR)
327#define OVE_RTOS_NAME "Zephyr"
328#elif defined(CONFIG_OVE_RTOS_NUTTX)
329#define OVE_RTOS_NAME "NuttX"
330#elif defined(CONFIG_OVE_RTOS_POSIX)
331#define OVE_RTOS_NAME "POSIX"
333#define OVE_RTOS_NAME "Unknown"
struct ove_mqtt_client * ove_mqtt_client_t
Opaque handle for an MQTT client.
Definition types.h:259
struct ove_spi * ove_spi_t
Opaque handle for an SPI bus controller.
Definition types.h:265
void(* ove_dma_complete_cb)(int result, void *user_data)
DMA / async transfer completion callback signature.
Definition types.h:312
struct ove_netif * ove_netif_t
Opaque handle for a network interface.
Definition types.h:250
struct ove_eventgroup * ove_eventgroup_t
Opaque handle for an event-group (bit-field) object.
Definition types.h:223
struct ove_thread * ove_thread_t
Opaque handle for a thread object.
Definition types.h:208
struct ove_i2s * ove_i2s_t
Opaque handle for an I2S / SAI bus controller.
Definition types.h:271
struct ove_tls * ove_tls_t
Opaque handle for a TLS session.
Definition types.h:253
struct ove_uart * ove_uart_t
Opaque handle for a UART peripheral.
Definition types.h:262
uint32_t ove_eventbits_t
Bit-mask type used by the event-group API.
Definition types.h:279
struct ove_stream * ove_stream_t
Opaque handle for a byte-stream (ring-buffer) object.
Definition types.h:232
struct ove_event * ove_event_t
Opaque handle for a binary event (signal/wait) object.
Definition types.h:217
struct ove_dir * ove_dir_t
Opaque handle for an open directory.
Definition types.h:241
struct ove_sem * ove_sem_t
Opaque handle for a counting semaphore object.
Definition types.h:214
ove_err_t
oveRTOS error codes.
Definition types.h:81
struct ove_condvar * ove_condvar_t
Opaque handle for a condition variable object.
Definition types.h:220
struct ove_mutex * ove_mutex_t
Opaque handle for a mutex object.
Definition types.h:211
struct ove_workqueue * ove_workqueue_t
Opaque handle for a work queue object.
Definition types.h:226
struct ove_watchdog * ove_watchdog_t
Opaque handle for a software watchdog object.
Definition types.h:235
struct ove_i2c * ove_i2c_t
Opaque handle for an I2C bus controller.
Definition types.h:268
struct ove_socket * ove_socket_t
Opaque handle for a network socket.
Definition types.h:247
struct ove_file * ove_file_t
Opaque handle for an open file.
Definition types.h:238
struct ove_model * ove_model_t
Opaque handle for an ML inference model session.
Definition types.h:244
struct ove_http_client * ove_http_client_t
Opaque handle for an HTTP client.
Definition types.h:256
void(* ove_notify_cb)(void *user_data)
Notify-callback signature used by the _set_notify variants of the comm primitives (stream / queue / e...
Definition types.h:298
struct ove_work * ove_work_t
Opaque handle for a deferred work item.
Definition types.h:229
#define OVE_WAIT_FOREVER
Timeout value that means "block indefinitely".
Definition types.h:162
@ OVE_ERR_INVAL
Definition types.h:149
@ OVE_ERR_QUEUE_FULL
Definition types.h:101
@ OVE_ERR_NET_REFUSED
Definition types.h:107
@ OVE_ERR_BUS_BUSY
Definition types.h:128
@ OVE_ERR_NET_DNS_FAIL
Definition types.h:119
@ OVE_ERR_QUEUE_EMPTY
Definition types.h:134
@ OVE_ERR_BUS_NACK
Definition types.h:125
@ OVE_ERR_BUS_ERROR
Definition types.h:131
@ OVE_ERR_NOT_SUPPORTED
Definition types.h:98
@ OVE_ERR_NO_MEMORY
Definition types.h:92
@ OVE_ERR_NET_ADDR_IN_USE
Definition types.h:113
@ OVE_ERR_NET_CLOSED
Definition types.h:122
@ OVE_ERR_INVALID_PARAM
Definition types.h:89
@ OVE_ERR_NOT_REGISTERED
Definition types.h:86
@ OVE_ERR_NET_RESET
Definition types.h:116
@ OVE_ERR_NET_UNREACHABLE
Definition types.h:110
@ OVE_ERR_NOT_FOUND
Definition types.h:152
@ OVE_OK
Definition types.h:83
@ OVE_ERR_WOULD_BLOCK
Definition types.h:143
@ OVE_ERR_ML_FAILED
Definition types.h:104
@ OVE_ERR_EOF
Definition types.h:146
@ OVE_ERR_TIMEOUT
Definition types.h:95