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