b15f/firmware/TLC5615.cpp

14 lines
243 B
C++
Raw Normal View History

2019-03-25 14:02:24 +00:00
#include "TLC5615.h"
2019-03-27 14:48:36 +00:00
TLC5615::TLC5615(SPI& spi, uint8_t adr) : spi(spi), adr(adr)
2019-03-25 14:02:24 +00:00
{
}
void TLC5615::setValue(uint16_t val) const
{
spi.setAdr(adr);
spi.pushByte(val >> 6);
spi.pushByte(val << 2);
spi.setAdr(SPIADR::NONE);
}