2019-03-25 15:02:24 +01:00
|
|
|
#ifndef TLC5615_H
|
|
|
|
#define TLC5615_H
|
|
|
|
|
|
|
|
#include "spi.h"
|
|
|
|
|
|
|
|
class TLC5615
|
|
|
|
{
|
|
|
|
public:
|
2019-04-03 13:35:12 +02:00
|
|
|
/**
|
2019-04-03 13:49:32 +02:00
|
|
|
* Erzeugt ein neues DAC Objekt mit fester Referenz
|
|
|
|
* zur SPI Verbindung und fester SPI-'Adresse'
|
2019-04-03 13:35:12 +02:00
|
|
|
*/
|
2019-04-03 13:30:57 +02:00
|
|
|
TLC5615(volatile SPI&, SPIADR adr);
|
2019-04-03 13:35:12 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Setzt den 10 Bit Wert dieses DACs via SPI
|
|
|
|
*/
|
2019-04-03 08:40:14 +02:00
|
|
|
void setValue(uint16_t) const volatile;
|
2019-03-25 15:02:24 +01:00
|
|
|
|
|
|
|
private:
|
2019-04-03 13:35:12 +02:00
|
|
|
// Referenz zur SPI Verbindung
|
2019-04-03 08:40:14 +02:00
|
|
|
volatile SPI& spi;
|
2019-04-03 13:35:12 +02:00
|
|
|
|
|
|
|
// SPI-'Adresse' dieses DACs
|
2019-04-03 13:30:57 +02:00
|
|
|
const SPIADR adr;
|
2019-03-25 15:02:24 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // TLC5615_H
|