#include <cfg/log.h>
#include <drv/i2c.h>
#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)
#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;
{
uint8_t data[2];
int16_t degree;
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
+
#define LM75_ADDRESS_BYTE 0x91
#define LM75_PAD_BYTE 0x0
#define LM75_ADDRESS_BYTE 0x91
#define LM75_PAD_BYTE 0x0
-typedef int16_t deci_celsius_t;
-deci_celsius_t lm75_read(addr_t sens_addr);
+deg_t lm75_read(addr_t sens_addr);
+#include <drv/ntc.h> // Macro and data type to manage celsius degree
+
/**
* Read temperature from TMP123 chip.
*/
/**
* Read temperature from TMP123 chip.
*/
-deci_celsius_t tmp123_read(KFile *fd)
+deg_t tmp123_read(KFile *fd)
-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);