EV3RT C API Reference [English]
An RTOS-based development platform for LEGO Mindstorms EV3.
 All Data Structures Functions Variables Enumerations Enumerator Groups
api_common.h
1 /*
2  * api_common.h
3  *
4  * Created on: Mar 29, 2014
5  * Author: liyixiao
6  */
7 
8 #include <t_syslog.h>
9 #include "platform_interface_layer.h"
10 
11 #define CHECK_COND(exp, _ercd) do { \
12  if (!(exp)) { \
13  ercd = _ercd; \
14  goto error_exit; \
15  } \
16 } while (false)
17 
18 
24 #define API_ERROR(fmt, ...) syslog(LOG_ERROR, "API %s() error: "fmt, __func__, ##__VA_ARGS__)
25 #define API_WARN(fmt, ...) syslog(LOG_WARNING, "API %s() warning: "fmt, __func__, ##__VA_ARGS__)
26 
27 extern brickinfo_t _global_ev3_brick_info;