WISP ERT (Client)  1.0.0
The WISP Extended Runtime (WISP side)
runtime.h File Reference
#include <stdint.h>
#include <wio.h>
#include <wtp.h>
#include <ert/urpc.h>
#include <ucontext.h>

Go to the source code of this file.

Macros

#define ERT_AWAIT(status_var, result_type, result_var, func_name, ...)
 Asynchronously wait for the completion of function. More...
 
#define _ERT_BW_SIZE   0x20
 BlockWrite data buffer size (Marco) More...
 

Typedefs

typedef wio_status_t ert_status_t
 ERT status type. More...
 

Functions

void __attribute__ ((weak)) ert_pre_init()
 ERT pre-init hook. More...
 
void ert_user_suspend (ert_status_t *_status_var, uint16_t result_size, void *_result_var)
 Suspend execution of user context. More...
 
 WIO_CALLBACK (ert_user_resume)
 
void main (void)
 WISP program entry point. More...
 

Variables

static const uint8_t ERT_BW_SIZE = _ERT_BW_SIZE
 BlockWrite data buffer size. More...
 
static const uint8_t ERT_EPC_SIZE = 12
 EPC size. More...
 
static const uint8_t ERT_WISP_CLASS = 0x10
 WISP class. More...
 
static const uint16_t ERT_USER_STACK_SIZE = 200
 ERT user stack size. More...
 
static const uint8_t ERT_ERR_SYS_FAILED = 0x30
 Error code for failed remote system call. More...
 
wtp_tert_wtp_ep
 ERT WTP endpoint. More...
 
urpc_t * ert_rpc_ep
 ERT u-RPC endpoint. More...
 

Macro Definition Documentation

◆ _ERT_BW_SIZE

#define _ERT_BW_SIZE   0x20

BlockWrite data buffer size (Marco)

◆ ERT_AWAIT

#define ERT_AWAIT (   status_var,
  result_type,
  result_var,
  func_name,
  ... 
)
Value:
{ \
func_name(__VA_ARGS__, NULL, ert_user_resume); \
ert_user_suspend(&status_var, sizeof(result_type), &result_var); \
}

Asynchronously wait for the completion of function.

Typedef Documentation

◆ ert_status_t

ERT status type.

Function Documentation

◆ __attribute__()

void __attribute__ ( (weak)  )

ERT pre-init hook.

ERT user main routine.

◆ ert_user_suspend()

void ert_user_suspend ( ert_status_t _status_var,
uint16_t  result_size,
void *  _result_var 
)

Suspend execution of user context.

Parameters
_status_varPointer to status variable
result_sizeSize of result variable
_result_varPointer to result variable

◆ main()

void main ( void  )

WISP program entry point.

WISP program entry point.

These are used by the WISP as a unique ID and for RN16 generation in Aloha protocol.

◆ WIO_CALLBACK()

WIO_CALLBACK ( ert_user_resume  )

Resume execution of user context

Variable Documentation

◆ ERT_BW_SIZE

const uint8_t ERT_BW_SIZE = _ERT_BW_SIZE
static

BlockWrite data buffer size.

◆ ERT_EPC_SIZE

const uint8_t ERT_EPC_SIZE = 12
static

EPC size.

◆ ERT_ERR_SYS_FAILED

const uint8_t ERT_ERR_SYS_FAILED = 0x30
static

Error code for failed remote system call.

◆ ert_rpc_ep

urpc_t* ert_rpc_ep

ERT u-RPC endpoint.

ERT u-RPC endpoint.

◆ ERT_USER_STACK_SIZE

const uint16_t ERT_USER_STACK_SIZE = 200
static

ERT user stack size.

◆ ERT_WISP_CLASS

const uint8_t ERT_WISP_CLASS = 0x10
static

WISP class.

◆ ert_wtp_ep

wtp_t* ert_wtp_ep

ERT WTP endpoint.

ERT WTP endpoint.