21#define PAL_ERR_NO_MEM -2
24#ifndef PAL_ERR_INVALID_ARG
25#define PAL_ERR_INVALID_ARG -3
28#ifndef PAL_ERR_INVALID_STATE
29#define PAL_ERR_INVALID_STATE -4
32#ifndef PAL_ERR_INVALID_SIZE
33#define PAL_ERR_INVALID_SIZE -5
36#ifndef PAL_ERR_NOT_FOUND
37#define PAL_ERR_NOT_FOUND -6
40#ifndef PAL_ERR_NOT_SUPPORTED
41#define PAL_ERR_NOT_SUPPORTED -7
44#ifndef PAL_ERR_TIMEOUT
45#define PAL_ERR_TIMEOUT -8
48#ifndef PAL_ERR_INVALID_CRC
49#define PAL_ERR_INVALID_CRC -9
52#ifndef PAL_ERR_NOT_FINISHED
53#define PAL_ERR_NOT_FINISHED -10
56#ifndef PAL_ERR_NOT_ALLOWED
57#define PAL_ERR_NOT_ALLOWED -11
60#ifndef PAL_ERR_TO_NAME
63 case PAL_OK:
return "PAL_OK";
75 default:
return "unknown";
78#define PAL_ERR_TO_NAME(err) _pal_err_to_name(err)
81#define PAL_CHECK(x, tag, msg) \
84 if ((__ = (x)) != PAL_OK) { \
85 PAL_LOGE(tag, "%s (%s)", msg, PAL_ERR_TO_NAME(__)); \
90#define PAL_CHECK_COND(cond, tag, msg) \
94 return PAL_ERR_INVALID_ARG; \
#define PAL_OK
Definition pal_err.h:13
#define PAL_ERR_NOT_ALLOWED
Definition pal_err.h:57
#define PAL_ERR_INVALID_CRC
Definition pal_err.h:49
#define PAL_ERR_NOT_FOUND
Definition pal_err.h:37
#define PAL_ERR_NOT_SUPPORTED
Definition pal_err.h:41
#define PAL_ERR_NO_MEM
Definition pal_err.h:21
int pal_err_t
Definition pal_err.h:9
#define PAL_ERR_TIMEOUT
Definition pal_err.h:45
static const char * _pal_err_to_name(pal_err_t err)
Definition pal_err.h:61
#define PAL_ERR_NOT_FINISHED
Definition pal_err.h:53
#define PAL_ERR_INVALID_ARG
Definition pal_err.h:25
#define PAL_FAIL
Definition pal_err.h:17
#define PAL_ERR_INVALID_SIZE
Definition pal_err.h:33
#define PAL_ERR_INVALID_STATE
Definition pal_err.h:29