|
WISP ERT (Client)
1.0.0
The WISP Extended Runtime (WISP side)
|
#include <stdbool.h>#include <stddef.h>#include <stdint.h>Go to the source code of this file.
Data Structures | |
| struct | wio_closure_t |
| WIO closure type. More... | |
Macros | |
| #define | WIO_TRY(expr) |
| WIO error handling marco. More... | |
| #define | WIO_CALLBACK(name) wio_status_t name(void* data, wio_status_t status, void* result) |
| Shorthand for declaring a WIO callback function. More... | |
| #define | WIO_INST_PTR(type) &((type){}) |
| Create an anonymous variable on stack and return a pointer to it. More... | |
| #define | WIO_RETURN(ret_var, ret_val) |
| Check pointer and return value through pointer. More... | |
| #define | WIO_MIN(x, y) ((x<y)?x:y) |
| Minimum value of two numbers. More... | |
| #define | WIO_MIN3(x, y, z) WIO_MIN(WIO_MIN(x, y), z) |
| Minimum value of three numbers. More... | |
Typedefs | |
| typedef uint8_t | wio_status_t |
| WIO status type. More... | |
| typedef wio_status_t(* | wio_callback_t) (void *, wio_status_t, void *) |
| WIO callback type. More... | |
Variables | |
| static const wio_status_t | WIO_OK = 0x00 |
| No error. More... | |
| static const wio_status_t | WIO_ERR_OUT_OF_RANGE = 0x01 |
| Out of range. More... | |
| static const wio_status_t | WIO_ERR_NO_MEMORY = 0x02 |
| No memory. More... | |
| static const wio_status_t | WIO_ERR_ALREADY = 0x03 |
| Already in use. More... | |
| static const wio_status_t | WIO_ERR_INVALID = 0x04 |
| Invalid parameter. More... | |
| static const wio_status_t | WIO_ERR_EMPTY = 0x05 |
| Empty data structure. More... | |
| #define WIO_CALLBACK | ( | name | ) | wio_status_t name(void* data, wio_status_t status, void* result) |
Shorthand for declaring a WIO callback function.
| #define WIO_INST_PTR | ( | type | ) | &((type){}) |
Create an anonymous variable on stack and return a pointer to it.
| #define WIO_MIN | ( | x, | |
| y | |||
| ) | ((x<y)?x:y) |
Minimum value of two numbers.
| #define WIO_RETURN | ( | ret_var, | |
| ret_val | |||
| ) |
Check pointer and return value through pointer.
| #define WIO_TRY | ( | expr | ) |
WIO error handling marco.
The marco continues execution if expression returns WIO_OK, or immediately return from current function is expression returns something else. Its usage is similar to rust's "try!" marco.
| typedef wio_status_t(* wio_callback_t) (void *, wio_status_t, void *) |
WIO callback type.
| typedef uint8_t wio_status_t |
WIO status type.
|
static |
Already in use.
|
static |
Empty data structure.
|
static |
Invalid parameter.
|
static |
No memory.
|
static |
Out of range.
|
static |
No error.