SqueezeBrains SDK 1.18
common.h File Reference

Examples - Common header. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "../lib/sb.h"
Include dependency graph for common.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define CHECK_FN_GOTO(function)
 

Functions

EXTERN_C sb_t_err wait_license (void)
 The functions wait until the license status is active. More...
 

Detailed Description

Examples - Common header.

Definition in file common.h.

Macro Definition Documentation

◆ CHECK_FN_GOTO

#define CHECK_FN_GOTO (   function)
Value:
{ sb_t_err __err; \
__err = function; \
if (__err) { \
printf(#function " failed, err=%d - %s\n", __err, sb_err_format(__err)); \
err = __err; \
goto FnExit; \
} \
}
sb_t_err
Errors code enum.
Definition: sb.h:6230
const char * sb_err_format(sb_t_err code)
Returns the error message.

The macro runs the function and checks the return code.
In case of error prints a message and jumps to the label FnExit.

Definition at line 34 of file common.h.

Function Documentation

◆ wait_license()

EXTERN_C sb_t_err wait_license ( void  )

The functions wait until the license status is active.

Returns
If successful, returns SB_ERR_NONE. Otherwise, it returns an error code sb_t_err.

Definition at line 11 of file common.c.

Here is the call graph for this function: