style: updated error macros
This commit is contained in:
1 parent
d04f61575d
commit
9e7236de42
1 file changed
+8
@@ -13,6 +13,14 @@ static const char *TAG = "zh_aht";
|
||||
return err; \
|
||||
}
|
||||
|
||||
#define ZH_ERROR_CHECK_VOID(cond, cleanup, msg, ...) \
|
||||
if (!(cond)) \
|
||||
{ \
|
||||
ZH_LOGE(msg, ESP_FAIL, ##__VA_ARGS__); \
|
||||
cleanup; \
|
||||
return; \
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Opaque handle structure for the AHT family sensor (AHT10/AHT15/AHT20/AHT21/AHT25/AHT30/AHT40).
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user