ESP32-P4 OBC Firmware
ESP-IDF firmware for Plant-B CubeSat OBC
 
Loading...
Searching...
No Matches
pal_err.h File Reference

Go to the source code of this file.

Macros

#define PAL_OK   0
 
#define PAL_FAIL   -1
 
#define PAL_ERR_NO_MEM   -2
 
#define PAL_ERR_INVALID_ARG   -3
 
#define PAL_ERR_INVALID_STATE   -4
 
#define PAL_ERR_INVALID_SIZE   -5
 
#define PAL_ERR_NOT_FOUND   -6
 
#define PAL_ERR_NOT_SUPPORTED   -7
 
#define PAL_ERR_TIMEOUT   -8
 
#define PAL_ERR_INVALID_CRC   -9
 
#define PAL_ERR_NOT_FINISHED   -10
 
#define PAL_ERR_NOT_ALLOWED   -11
 
#define PAL_ERR_TO_NAME(err)
 
#define PAL_CHECK(x, tag, msg)
 
#define PAL_CHECK_COND(cond, tag, msg)
 

Typedefs

typedef int pal_err_t
 

Functions

static const char * _pal_err_to_name (pal_err_t err)
 

Macro Definition Documentation

◆ PAL_CHECK

#define PAL_CHECK ( x,
tag,
msg )
Value:
do { \
pal_err_t __; \
if ((__ = (x)) != PAL_OK) { \
PAL_LOGE(tag, "%s (%s)", msg, PAL_ERR_TO_NAME(__)); \
return __; \
} \
} while (0)
#define PAL_ERR_TO_NAME(err)
Definition pal_err.h:78
#define PAL_OK
Definition pal_err.h:13
int pal_err_t
Definition pal_err.h:9

◆ PAL_CHECK_COND

#define PAL_CHECK_COND ( cond,
tag,
msg )
Value:
do { \
if (!(cond)) { \
PAL_LOGE(tag, msg); \
} \
} while (0)
#define PAL_ERR_INVALID_ARG
Definition pal_err.h:25

◆ PAL_ERR_INVALID_ARG

#define PAL_ERR_INVALID_ARG   -3

◆ PAL_ERR_INVALID_CRC

#define PAL_ERR_INVALID_CRC   -9

◆ PAL_ERR_INVALID_SIZE

#define PAL_ERR_INVALID_SIZE   -5

◆ PAL_ERR_INVALID_STATE

#define PAL_ERR_INVALID_STATE   -4

◆ PAL_ERR_NO_MEM

#define PAL_ERR_NO_MEM   -2

◆ PAL_ERR_NOT_ALLOWED

#define PAL_ERR_NOT_ALLOWED   -11

◆ PAL_ERR_NOT_FINISHED

#define PAL_ERR_NOT_FINISHED   -10

◆ PAL_ERR_NOT_FOUND

#define PAL_ERR_NOT_FOUND   -6

◆ PAL_ERR_NOT_SUPPORTED

#define PAL_ERR_NOT_SUPPORTED   -7

◆ PAL_ERR_TIMEOUT

#define PAL_ERR_TIMEOUT   -8

◆ PAL_ERR_TO_NAME

#define PAL_ERR_TO_NAME ( err)
Value:
static const char * _pal_err_to_name(pal_err_t err)
Definition pal_err.h:61

◆ PAL_FAIL

#define PAL_FAIL   -1

◆ PAL_OK

#define PAL_OK   0

Typedef Documentation

◆ pal_err_t

typedef int pal_err_t

Function Documentation

◆ _pal_err_to_name()

static const char * _pal_err_to_name ( pal_err_t err)
inlinestatic