projet3_temperature/lib/LTC2439/LTC2439.h
2020-05-13 15:59:24 +02:00

45 lines
734 B
C++

//
// LTC2439.hpp
// libLTC
//
// Created by Tim THUREL on 04/03/2020.
// Copyright © 2020 Tim THUREL. All rights reserved.
//
#ifndef LTC2439_hpp
#define LTC2439_hpp
#include <stdint.h>
#include "SPI.h"
#include <Arduino.h>
#define DEBUG
//#define ARDUINO
#ifdef ARDUINO
static bool toggle = 0;
static int pinF0;
#endif
class LTC
{
public:
LTC(int CSpin);
LTC(int CSpin, int SDOpin);
LTC(int CSpin, int SDOpin, int F0pin);
long readValue(int channel); // renvoie la valeur du channel en cours
#ifdef ARDUINO
void startTimer(int frequency);
#endif
private:
int selectPin,pinConv;
int tableChanel[16]{0,8,1,9,2,10,3,11,4,12,5,13,6,14,7,15}; // tableau des Pins
};
#endif /* LTC2439_hpp */