From 192b35ba9c57b3e7e5d652e9dbd3038a38c5e073 Mon Sep 17 00:00:00 2001 From: batt Date: Sat, 10 Oct 2009 11:20:09 +0000 Subject: [PATCH] Use log module. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3065 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_afsk.h | 16 ++++++++++++++++ bertos/net/afsk.c | 6 +++++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/bertos/cfg/cfg_afsk.h b/bertos/cfg/cfg_afsk.h index f5a27e42..d8bc1d56 100644 --- a/bertos/cfg/cfg_afsk.h +++ b/bertos/cfg/cfg_afsk.h @@ -39,6 +39,22 @@ #ifndef CFG_AFSK_H #define CFG_AFSK_H +/** + * Module logging level. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_level" + */ +#define AFSK_LOG_LEVEL LOG_LVL_WARN + +/** + * Module logging format. + * + * $WIZ$ type = "enum" + * $WIZ$ value_list = "log_format" + */ +#define AFSK_LOG_FORMAT LOG_FMT_TERSE + /** * AFSK discriminator filter type. diff --git a/bertos/net/afsk.c b/bertos/net/afsk.c index f8f29f9d..e492efef 100644 --- a/bertos/net/afsk.c +++ b/bertos/net/afsk.c @@ -46,6 +46,10 @@ #include +#define LOG_LEVEL AFSK_LOG_LEVEL +#define LOG_FORMAT AFSK_LOG_FORMAT +#include + #include #include @@ -508,7 +512,7 @@ void afsk_init(Afsk *af, int adc_ch, int dac_ch) AFSK_ADC_INIT(adc_ch, af); AFSK_DAC_INIT(dac_ch, af); AFSK_STROBE_INIT(); - kprintf("MARK_INC %d, SPACE_INC %d\n", MARK_INC, SPACE_INC); + LOG_INFO("MARK_INC %d, SPACE_INC %d\n", MARK_INC, SPACE_INC); DB(af->fd._type = KFT_AFSK); af->fd.write = afsk_write; -- 2.25.1