VSF Documented
Macros
esp_check.h File Reference
#include "esp_err.h"
#include "esp_log.h"
#include "esp_compiler.h"

Go to the source code of this file.

Macros

#define ESP_RETURN_ON_ERROR(x, log_tag, format, ...)
 
#define ESP_RETURN_ON_ERROR_ISR(x, log_tag, format, ...)
 
#define ESP_RETURN_VOID_ON_ERROR(x, log_tag, format, ...)
 
#define ESP_RETURN_VOID_ON_ERROR_ISR(x, log_tag, format, ...)
 
#define ESP_GOTO_ON_ERROR(x, goto_tag, log_tag, format, ...)
 
#define ESP_GOTO_ON_ERROR_ISR(x, goto_tag, log_tag, format, ...)
 
#define ESP_RETURN_ON_FALSE(a, err_code, log_tag, format, ...)
 
#define ESP_RETURN_ON_FALSE_ISR(a, err_code, log_tag, format, ...)
 
#define ESP_RETURN_VOID_ON_FALSE(a, log_tag, format, ...)
 
#define ESP_RETURN_VOID_ON_FALSE_ISR(a, log_tag, format, ...)
 
#define ESP_GOTO_ON_FALSE(a, err_code, goto_tag, log_tag, format, ...)
 
#define ESP_GOTO_ON_FALSE_ISR(a, err_code, goto_tag, log_tag, format, ...)
 
#define ESP_RETURN_ON_ERROR_CLEANUP(x, ...)
 

Macro Definition Documentation

◆ ESP_RETURN_ON_ERROR

#define ESP_RETURN_ON_ERROR (   x,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return err_rc_; \
} \
} while(0)
#define unlikely(x)
Definition esp_compiler.h:60
int esp_err_t
Definition esp_err.h:41
#define ESP_OK
Definition esp_err.h:45
SDL_PixelFormat format
Definition vsf_sdl2_pixelformat.c:32

◆ ESP_RETURN_ON_ERROR_ISR

#define ESP_RETURN_ON_ERROR_ISR (   x,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return err_rc_; \
} \
} while(0)

◆ ESP_RETURN_VOID_ON_ERROR

#define ESP_RETURN_VOID_ON_ERROR (   x,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return; \
} \
} while(0)

◆ ESP_RETURN_VOID_ON_ERROR_ISR

#define ESP_RETURN_VOID_ON_ERROR_ISR (   x,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return; \
} \
} while(0)

◆ ESP_GOTO_ON_ERROR

#define ESP_GOTO_ON_ERROR (   x,
  goto_tag,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
ret = err_rc_; \
goto goto_tag; \
} \
} while(0)

◆ ESP_GOTO_ON_ERROR_ISR

#define ESP_GOTO_ON_ERROR_ISR (   x,
  goto_tag,
  log_tag,
  format,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
ret = err_rc_; \
goto goto_tag; \
} \
} while(0)

◆ ESP_RETURN_ON_FALSE

#define ESP_RETURN_ON_FALSE (   a,
  err_code,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return err_code; \
} \
} while(0)

◆ ESP_RETURN_ON_FALSE_ISR

#define ESP_RETURN_ON_FALSE_ISR (   a,
  err_code,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return err_code; \
} \
} while(0)

◆ ESP_RETURN_VOID_ON_FALSE

#define ESP_RETURN_VOID_ON_FALSE (   a,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return; \
} \
} while(0)

◆ ESP_RETURN_VOID_ON_FALSE_ISR

#define ESP_RETURN_VOID_ON_FALSE_ISR (   a,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
return; \
} \
} while(0)

◆ ESP_GOTO_ON_FALSE

#define ESP_GOTO_ON_FALSE (   a,
  err_code,
  goto_tag,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
ret = err_code; \
goto goto_tag; \
} \
} while(0)

◆ ESP_GOTO_ON_FALSE_ISR

#define ESP_GOTO_ON_FALSE_ISR (   a,
  err_code,
  goto_tag,
  log_tag,
  format,
  ... 
)
Value:
do { \
if (unlikely(!(a))) { \
ESP_EARLY_LOGE(log_tag, "%s(%d): " format, \
__FUNCTION__, __LINE__, ##__VA_ARGS__); \
ret = err_code; \
goto goto_tag; \
} \
} while(0)

◆ ESP_RETURN_ON_ERROR_CLEANUP

#define ESP_RETURN_ON_ERROR_CLEANUP (   x,
  ... 
)
Value:
do { \
esp_err_t err_rc_ = (x); \
if (unlikely(err_rc_ != ESP_OK)) { \
__VA_ARGS__; \
return err_rc_; \
} \
} while(0)
Generated from commit: vsfteam/vsf@c3767bf