extras/sntp: SNTP_LOGD_WITH_PRINTF enables logging
Can continue to define own SNTP_LOGD
This commit is contained in:
parent
cf112955ed
commit
86fa1add10
2 changed files with 10 additions and 1 deletions
|
|
@ -5,4 +5,9 @@ INC_DIRS += $(sntp_ROOT)
|
||||||
# args for passing into compile rule generation
|
# args for passing into compile rule generation
|
||||||
sntp_SRC_DIR = $(sntp_ROOT)
|
sntp_SRC_DIR = $(sntp_ROOT)
|
||||||
|
|
||||||
|
# For SNTP logging, either supply own SNTP_LOGD
|
||||||
|
# or define SNTP_LOGD_WITH_PRINTF (see sntp_fun.c)
|
||||||
|
|
||||||
|
# sntp_CFLAGS = $(CFLAGS) -DSNTP_LOGD_WITH_PRINTF
|
||||||
|
|
||||||
$(eval $(call component_compile_rules,sntp))
|
$(eval $(call component_compile_rules,sntp))
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,11 @@
|
||||||
#include <esp/rtc_regs.h>
|
#include <esp/rtc_regs.h>
|
||||||
#include <sntp.h>
|
#include <sntp.h>
|
||||||
|
|
||||||
// #define SNTP_LOGD(FMT, ...) printf(FMT "\n", ##__VA_ARGS__)
|
|
||||||
|
#ifdef SNTP_LOGD_WITH_PRINTF
|
||||||
|
#define SNTP_LOGD(FMT, ...) printf(FMT "\n", ##__VA_ARGS__)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef SNTP_LOGD
|
#ifndef SNTP_LOGD
|
||||||
#define SNTP_LOGD(...)
|
#define SNTP_LOGD(...)
|
||||||
#define SKIP_DIAGNOSTICS
|
#define SKIP_DIAGNOSTICS
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue