Fork the MAX31855 library. Allows a fxn to be called to select and unselect the TC. Now using a shift register array we can multiplex a great number of these TC chips!

Dependents:   elixys

Fork of MAX31855 by Joe Staton

max31855.h

Committer:
henryeherman
Date:
2013-10-30
Revision:
2:b978f1503c27
Parent:
1:5eeee89cb281

File content as of revision 2:b978f1503c27:

#ifndef MAX31855_h
#define MAX31855_h

#include "mbed.h"

class max31855
{
    SPI& spi;
    void(*selectfxn)(void);
    void(*unselectfxn)(void);
    //DigitalOut ncs;
    Timer pollTimer;
  public:
  
    max31855(SPI& _spi, void(*sel)(void), void(*usel)(void));
    void select();
    void deselect();
    void initialise(int setType=0);
        
    int faultCode;
    
    float chipTemp;
    float read_temp();
  private:
    PinName _CS_pin;
    PinName _SO_pin;
    PinName _SCK_pin;
    int _units;
    float _error;
};

#endif