#include <cfg/log.h>
#include <drv/i2c.h>
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
#define SELECT_ADDRESS(addr) LM75_ADDRESS_BYTE | (addr << 1)
-deci_celsius_t lm75_read(addr_t sens_addr)
+deg_t lm75_read(addr_t sens_addr)
{
uint8_t data[2];
int16_t degree;
#include <cpu/types.h>
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
+
#define LM75_ADDRESS_BYTE 0x91
#define LM75_PAD_BYTE 0x0
-typedef int16_t deci_celsius_t;
typedef uint8_t addr_t;
-deci_celsius_t lm75_read(addr_t sens_addr);
+deg_t lm75_read(addr_t sens_addr);
void lm75_init(void);
#include <kern/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;
#include <kern/kfile.h>
-typedef int16_t deci_celsius_t;
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
-deci_celsius_t tmp123_read(KFile *fd);
+deg_t tmp123_read(KFile *fd);
void tmp123_init(void);