библиотека для подключения модуля термопары к микроконтроллеру

Dependents:   NUCLEO_F410RB_MAX6675 PanelaSTM

Fork of max6675 by Jason Engelman

Committer:
zelmic
Date:
Mon Jun 11 06:48:27 2018 +0000
Revision:
4:f0cdf38c7cfc
Parent:
0:b49d36e03092
ver 1.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tecnosys 0:b49d36e03092 1 #ifndef MAX6675_h
tecnosys 0:b49d36e03092 2 #define MAX6675_h
tecnosys 0:b49d36e03092 3
tecnosys 0:b49d36e03092 4 #include "mbed.h"
tecnosys 0:b49d36e03092 5
tecnosys 0:b49d36e03092 6 class max6675
tecnosys 0:b49d36e03092 7 {
tecnosys 0:b49d36e03092 8 SPI& spi;
zelmic 4:f0cdf38c7cfc 9 DigitalOut ncs;// pin CS для выбора чипа
tecnosys 0:b49d36e03092 10 public:
tecnosys 0:b49d36e03092 11
zelmic 4:f0cdf38c7cfc 12 max6675(SPI& _spi, PinName _ncs);
zelmic 4:f0cdf38c7cfc 13 void select(); //захват линии SPI для данного чипа
zelmic 4:f0cdf38c7cfc 14 void deselect();// освобождение SPI
tecnosys 0:b49d36e03092 15
zelmic 4:f0cdf38c7cfc 16 float read_temp(); //чтение температуры
tecnosys 0:b49d36e03092 17 private:
tecnosys 0:b49d36e03092 18 PinName _CS_pin;
tecnosys 0:b49d36e03092 19 PinName _SO_pin;
tecnosys 0:b49d36e03092 20 PinName _SCK_pin;
zelmic 4:f0cdf38c7cfc 21 //int _units;
zelmic 4:f0cdf38c7cfc 22 //float _error;
tecnosys 0:b49d36e03092 23 };
tecnosys 0:b49d36e03092 24
tecnosys 0:b49d36e03092 25 #endif