New panel design
This commit is contained in:
1 parent
face2432e4
commit
b5d6b4a897
30 files changed
+4540
-171
No files matched your search
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* Host stand-in for ESP-IDF's esp_check.h -- see compat/esp_err.h.
|
||||
*/
|
||||
#ifndef ESP_CHECK_H
|
||||
#define ESP_CHECK_H
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
|
||||
#define ESP_RETURN_ON_ERROR(x, tag, fmt, ...) \
|
||||
do { \
|
||||
const esp_err_t err_rc_ = (x); \
|
||||
if (err_rc_ != ESP_OK) { \
|
||||
ESP_LOGE(tag, fmt, ##__VA_ARGS__); \
|
||||
return err_rc_; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define ESP_RETURN_ON_FALSE(a, err_code, tag, fmt, ...) \
|
||||
do { \
|
||||
if (!(a)) { \
|
||||
ESP_LOGE(tag, fmt, ##__VA_ARGS__); \
|
||||
return (err_code); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define ESP_GOTO_ON_ERROR(x, goto_tag, tag, fmt, ...) \
|
||||
do { \
|
||||
const esp_err_t err_rc_ = (x); \
|
||||
if (err_rc_ != ESP_OK) { \
|
||||
ret = err_rc_; \
|
||||
ESP_LOGE(tag, fmt, ##__VA_ARGS__); \
|
||||
goto goto_tag; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define ESP_GOTO_ON_FALSE(a, err_code, goto_tag, tag, fmt, ...) \
|
||||
do { \
|
||||
if (!(a)) { \
|
||||
ret = (err_code); \
|
||||
ESP_LOGE(tag, fmt, ##__VA_ARGS__); \
|
||||
goto goto_tag; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user