projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update example project to new bertos api.
[bertos.git]
/
bertos
/
drv
/
ntc.c
diff --git
a/bertos/drv/ntc.c
b/bertos/drv/ntc.c
index cc74e306250867d74631b9034085971b1e879973..8f03732e33ab1702e561c984dcc1dfe6270cf663 100644
(file)
--- a/
bertos/drv/ntc.c
+++ b/
bertos/drv/ntc.c
@@
-32,8
+32,6
@@
*
* \brief Driver for NTC (reads a temperature through an ADC)
*
*
* \brief Driver for NTC (reads a temperature through an ADC)
*
- * \version $Id$
- *
* \author Giovanni Bajo <rasky@develer.com>
* \author Francesco Sacchi <batt@develer.com>
*
* \author Giovanni Bajo <rasky@develer.com>
* \author Francesco Sacchi <batt@develer.com>
*
@@
-46,6
+44,12
@@
#include "hw/hw_ntc.h"
#include "hw/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 <cfg/log.h>
#include <cfg/debug.h>
#include <drv/ntc.h>
#include <cfg/debug.h>
#include <drv/ntc.h>
@@
-102,9
+106,9
@@
deg_t ntc_read(NtcDev dev)
const NtcHwInfo* hw = ntc_hw_getInfo(dev);
const res_t* r = hw->resistances;
const NtcHwInfo* hw = ntc_hw_getInfo(dev);
const res_t* r = hw->resistances;
-
floa
t rx;
+
res_
t rx;
size_t i;
size_t i;
- deg_t degrees;
+ deg_t degrees
= 0
;
rx = ntc_hw_read(dev);
rx = ntc_hw_read(dev);