temperature: add a temperature framework
This commit adds data structures, methods and a process to manage
temperature. Currently the only temperature being read is the onewire
thermometer, so there is no difference with what we had before.
The cost is 1.1 kB in binary size.
Well, there is a difference: only the stat engine was reading
temperature, while now the thermometer is read continuously (every 15
seconds, or another Kconfig-urable interval). This takes quite some
CPU time (18.5ms per polling loop, but allows any user to read
temperature (using the API we now provide) without re-reading the
onewire bus.
The real aim of this is monitoring a board-specific set of sensors,
as implemented and show in the next commit.
Signed-off-by: Alessandro Rubini <rubini@gnudd.com>
Showing
dev/temp-w1.c
0 → 100644
dev/temperature.c
0 → 100644
include/temperature.h
0 → 100644
Please
register
or
sign in
to comment