max31723: made it work with SPI but the data looks like incorrect

Signed-off-by: Kiveisha Yevgeniy <yevgeniy.kiveisha@intel.com>
This commit is contained in:
Kiveisha Yevgeniy
2014-08-06 16:41:40 +00:00
parent 1747fbbe19
commit d0e83d7076
3 changed files with 52 additions and 23 deletions

View File

@@ -46,6 +46,8 @@ class MAX31723 {
static const uint8_t R_TEMPERATURE_LSB = 0x01;
static const uint8_t R_TEMPERATURE_MSB = 0x02;
static const uint8_t B_CONT_READING = 0x00;
/**
* Instanciates a MAX31723 object
*
@@ -62,7 +64,7 @@ class MAX31723 {
/**
* Get on board temperature.
*/
uint16_t getTemperature ();
short getTemperature ();
/**
* Return name of the component
@@ -76,6 +78,9 @@ class MAX31723 {
mraa_spi_context m_spi;
mraa_gpio_context m_csnPinCtx;
uint8_t readRegister (uint8_t reg);
void writeRegister (uint8_t reg, uint8_t data);
/**
* Set chip select pin LOW
*/