cpu/esp8266/include/common.h¶
Common helper macros.
-
ICACHE_RAM_ATTR
¶ Places the code with this attribute in the IRAM.
1
__attribute__((section(".iram.text")))
-
NOT_YET_IMPLEMENTED
()¶ Print out a message that function is not yet implementd.
1
LOG_INFO("%s not yet implemented\n", __func__)
-
NOT_SUPPORTED
()¶ Print out a message that function is not supported.
1
LOG_INFO("%s not supported\n", __func__)
-
CHECK_PARAM_RET
( cond, err)¶ Parameter check with return a value.
1 2 3 4 5
if (!(cond)) \ { \ DEBUG("%s\n", "parameter condition (" #cond ") not fulfilled"); \ return err; \ }
If ENABLE_DEBUG is true, the macro checks a condition and returns with a value if the condition is not fulfilled.
Parameters
cond: the condition err: the return value in the case the condition is not fulfilled.
-
CHECK_PARAM
( cond)¶ Parameter check without return value.
1 2 3 4 5
if (!(cond)) \ { \ DEBUG("%s\n", "parameter condition (" #cond ") not fulfilled"); \ return; \ }
If ENABLE_DEBUG is true, the macro checks a condition and returns without a value if the condition is not fulfilled.
Parameters
cond: the condition