projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
USB: coding style fixes (structure naming)
[bertos.git]
/
bertos
/
drv
/
tmp123.c
diff --git
a/bertos/drv/tmp123.c
b/bertos/drv/tmp123.c
index 9fcc9165c16efe9f924a308b5dfd53e952bed436..7f8b4f09cd802c1af7d25b29e754772207bd51cb 100644
(file)
--- a/
bertos/drv/tmp123.c
+++ b/
bertos/drv/tmp123.c
@@
-44,19
+44,21
@@
#include <cpu/byteorder.h>
#include <cpu/byteorder.h>
-#include <kern/kfile.h>
+#include <io/kfile.h>
+
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
/**
* Read temperature from TMP123 chip.
*/
/**
* Read temperature from TMP123 chip.
*/
-de
ci_celsius
_t tmp123_read(KFile *fd)
+de
g
_t tmp123_read(KFile *fd)
{
int16_t tmp;
{
int16_t tmp;
-
CS_ENABLE
();
+
TMP123_HW_CS_EN
();
kfile_read(fd, &tmp, sizeof(tmp));
tmp = be16_to_cpu(tmp);
kfile_read(fd, &tmp, sizeof(tmp));
tmp = be16_to_cpu(tmp);
-
CS_DISABLE
();
+
TMP123_HW_CS_DIS
();
tmp >>= 3;
return DIV_ROUND((tmp * 10), 16);
tmp >>= 3;
return DIV_ROUND((tmp * 10), 16);