Move DCE_CHECK in the esp_modem_dce

Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch>
Signed-off-by: Liu Han <liuhan@espressif.com>
This commit is contained in:
Jonathan Dreyer
2021-01-30 23:31:53 +01:00
committed by bot
parent de239f151f
commit 3968660b2a
8 changed files with 16 additions and 58 deletions

View File

@@ -19,20 +19,7 @@
#define MODEM_RESULT_CODE_POWERDOWN "POWER DOWN"
/**
* @brief Macro defined for error checking
*
*/
static const char *DCE_TAG = "sim800";
#define DCE_CHECK(a, str, goto_tag, ...) \
do \
{ \
if (!(a)) \
{ \
ESP_LOGE(DCE_TAG, "%s(%d): " str, __FUNCTION__, __LINE__, ##__VA_ARGS__); \
goto goto_tag; \
} \
} while (0)
/**
* @brief Handle response from AT+CPOWD=1