X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fdrv%2Fntc.c;h=8f03732e33ab1702e561c984dcc1dfe6270cf663;hb=41718ab2098bd5640da265c34f1ecb79a4123d39;hp=c148e7c05c52c25fc5ca31a68c95ac7e1bc01b42;hpb=0fbabc305e65dfc5538cfcae10c04f6be9daf657;p=bertos.git diff --git a/bertos/drv/ntc.c b/bertos/drv/ntc.c index c148e7c0..8f03732e 100644 --- a/bertos/drv/ntc.c +++ b/bertos/drv/ntc.c @@ -32,8 +32,6 @@ * * \brief Driver for NTC (reads a temperature through an ADC) * - * \version $Id$ - * * \author Giovanni Bajo * \author Francesco Sacchi * @@ -43,9 +41,15 @@ * */ -#include "hw_ntc.h" -#include "ntc_map.h" +#include "hw/hw_ntc.h" +#include "hw/ntc_map.h" + +#include "cfg/cfg_ntc.h" +// Define logging setting (for cfg/log.h module). +#define LOG_LEVEL CONFIG_NTC_LOG_LEVEL +#define LOG_VERBOSITY CONFIG_NTC_LOG_FORMAT +#include #include #include @@ -102,9 +106,9 @@ deg_t ntc_read(NtcDev dev) const NtcHwInfo* hw = ntc_hw_getInfo(dev); const res_t* r = hw->resistances; - float rx; + res_t rx; size_t i; - deg_t degrees; + deg_t degrees = 0; rx = ntc_hw_read(dev);