b15f/firmware/tlc5615.cpp
2019-04-02 15:32:51 +02:00

14 lines
243 B
C++

#include "tlc5615.h"
TLC5615::TLC5615(SPI& spi, uint8_t adr) : spi(spi), adr(adr)
{
}
void TLC5615::setValue(uint16_t val) const
{
spi.setAdr(adr);
spi.pushByte(val >> 6);
spi.pushByte(val << 2);
spi.setAdr(SPIADR::NONE);
}