Techshop JAPANのボランティアリフロープログラムです。誰か改造して

Fork of MAX31855 by Joe Staton

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers max31855.h Source File

max31855.h

00001 #ifndef MAX31855_h
00002 #define MAX31855_h
00003 
00004 #include "mbed.h"
00005 
00006 class max31855
00007 {
00008     SPI& spi;
00009     DigitalOut ncs;
00010     Timer pollTimer;
00011   public:
00012   
00013     max31855(SPI& _spi, PinName _ncs);
00014     void select();
00015     void deselect();
00016     void initialise(int setType=0);
00017     
00018     int ready();
00019     int faultCode;
00020     
00021     float chipTemp;
00022     float read_temp();
00023   private:
00024     PinName _CS_pin;
00025     PinName _SO_pin;
00026     PinName _SCK_pin;
00027     int _units;
00028     float _error;
00029 };
00030 
00031 #endif