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

Go to the source code of this file.

Macros

#define PAL_LOGI(tag, fmt, ...)
 
#define PAL_LOGE(tag, fmt, ...)
 
#define PAL_LOGW(tag, fmt, ...)
 
#define PAL_LOGD(tag, fmt, ...)
 
#define PAL_LOGV(tag, fmt, ...)
 
#define PAL_LOG_BUFFER_HEX(tag, buf, len, level)
 
#define PAL_LOG_BUFFER_HEXDUMP(tag, buf, len, level)
 

Enumerations

enum  pal_log_level_t {
  PAL_LOG_ERROR = 0 , PAL_LOG_WARN , PAL_LOG_INFO , PAL_LOG_DEBUG ,
  PAL_LOG_VERBOSE
}
 

Variables

static const char * _pal_level_str [] = { "E", "W", "I", "D", "V" }
 

Macro Definition Documentation

◆ PAL_LOG_BUFFER_HEX

#define PAL_LOG_BUFFER_HEX ( tag,
buf,
len,
level )
Value:
do { \
const uint8_t *_b = (const uint8_t *)(buf); \
for (size_t _i = 0; _i < (len); _i += 16) { \
char _line[64]; \
int _off = 0; \
for (size_t _j = _i; _j < (len) && _j < _i + 16; _j++) \
_off += snprintf(_line + _off, sizeof(_line) - _off, "%02x ", _b[_j]); \
printf("[%s] %s: %s\n", _pal_level_str[level], tag, _line); \
} \
} while(0)
static const char * _pal_level_str[]
Definition pal_log.h:37

◆ PAL_LOG_BUFFER_HEXDUMP

#define PAL_LOG_BUFFER_HEXDUMP ( tag,
buf,
len,
level )
Value:
PAL_LOG_BUFFER_HEX(tag, buf, len, level)
#define PAL_LOG_BUFFER_HEX(tag, buf, len, level)
Definition pal_log.h:38

◆ PAL_LOGD

#define PAL_LOGD ( tag,
fmt,
... )
Value:
printf("[D] %s: " fmt "\n", tag, ##__VA_ARGS__)

◆ PAL_LOGE

#define PAL_LOGE ( tag,
fmt,
... )
Value:
printf("[E] %s: " fmt "\n", tag, ##__VA_ARGS__)

◆ PAL_LOGI

#define PAL_LOGI ( tag,
fmt,
... )
Value:
printf("[I] %s: " fmt "\n", tag, ##__VA_ARGS__)

◆ PAL_LOGV

#define PAL_LOGV ( tag,
fmt,
... )
Value:
printf("[V] %s: " fmt "\n", tag, ##__VA_ARGS__)

◆ PAL_LOGW

#define PAL_LOGW ( tag,
fmt,
... )
Value:
printf("[W] %s: " fmt "\n", tag, ##__VA_ARGS__)

Enumeration Type Documentation

◆ pal_log_level_t

Enumerator
PAL_LOG_ERROR 
PAL_LOG_WARN 
PAL_LOG_INFO 
PAL_LOG_DEBUG 
PAL_LOG_VERBOSE 

Variable Documentation

◆ _pal_level_str

const char* _pal_level_str[] = { "E", "W", "I", "D", "V" }
static