Andrey Zheleznyakov / max6675

Dependents:   NUCLEO_F410RB_MAX6675 PanelaSTM

Fork of max6675 by Jason Engelman

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers max6675.h Source File

max6675.h

00001 #ifndef MAX6675_h
00002 #define MAX6675_h
00003 
00004 #include "mbed.h"
00005 
00006 class max6675
00007 {
00008     SPI& spi;
00009     DigitalOut ncs;// pin CS для выбора чипа
00010   public:
00011   
00012     max6675(SPI& _spi, PinName _ncs); 
00013     void select(); //захват линии SPI для данного чипа
00014     void deselect();// освобождение SPI
00015     
00016     float read_temp(); //чтение температуры
00017   private:
00018     PinName _CS_pin;
00019     PinName _SO_pin;
00020     PinName _SCK_pin;
00021     //int _units;
00022     //float _error;
00023 };
00024 
00025 #endif