common.h File Reference

Common helper macros. More...

Detailed Description

Common helper macros.

Author
Gunar Schorcht gunar.nosp@m.@sch.nosp@m.orcht.nosp@m..net

Definition in file common.h.

Go to the source code of this file.

#define ICACHE_RAM_ATTR   __attribute__((section(".iram.text")))
 Places the code with this attribute in the IRAM. More...
 
#define NOT_YET_IMPLEMENTED()   LOG_INFO("%s not yet implemented\n", __func__)
 Print out a message that function is not yet implementd.
 
#define NOT_SUPPORTED()   LOG_INFO("%s not supported\n", __func__)
 Print out a message that function is not supported.
 
#define CHECK_PARAM_RET(cond, err)
 Parameter check with return a value. More...
 
#define CHECK_PARAM(cond)
 Parameter check without return value. More...
 
#define LOG_TAG_ERROR(tag, fmt, ...)   LOG_ERROR("[%s] " fmt, tag, ##__VA_ARGS__)
 
#define LOG_TAG_WARNING(tag, fmt, ...)   LOG_WARNING("[%s] " fmt, tag, ##__VA_ARGS__)
 
#define LOG_TAG_INFO(tag, fmt, ...)   LOG_INFO("[%s] " fmt, tag, ##__VA_ARGS__)
 
#define LOG_TAG_DEBUG(tag, fmt, ...)   LOG_DEBUG("[%s] " fmt, tag, ##__VA_ARGS__)
 

Macro Definition Documentation

◆ CHECK_PARAM

#define CHECK_PARAM (   cond)
Value:
if (!(cond)) \
{ \
DEBUG("%s\n", "parameter condition (" #cond ") not fulfilled"); \
return; \
}

Parameter check without return value.

If ENABLE_DEBUG is true, the macro checks a condition and returns without a value if the condition is not fulfilled.

Parameters
condthe condition

Definition at line 76 of file common.h.

◆ CHECK_PARAM_RET

#define CHECK_PARAM_RET (   cond,
  err 
)
Value:
if (!(cond)) \
{ \
DEBUG("%s\n", "parameter condition (" #cond ") not fulfilled"); \
return err; \
}

Parameter check with return a value.

If ENABLE_DEBUG is true, the macro checks a condition and returns with a value if the condition is not fulfilled.

Parameters
condthe condition
errthe return value in the case the condition is not fulfilled.

Definition at line 63 of file common.h.

◆ ICACHE_RAM_ATTR

#define ICACHE_RAM_ATTR   __attribute__((section(".iram.text")))

Places the code with this attribute in the IRAM.

Definition at line 40 of file common.h.