Move kfile interface to the io/ directory.
[bertos.git] / bertos / drv / tmp123.c
index 9fcc9165c16efe9f924a308b5dfd53e952bed436..7f8b4f09cd802c1af7d25b29e754772207bd51cb 100644 (file)
 
 #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.
  */
-deci_celsius_t tmp123_read(KFile *fd)
+deg_t tmp123_read(KFile *fd)
 {
        int16_t tmp;
 
-       CS_ENABLE();
+       TMP123_HW_CS_EN();
        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);