2 static uint32_t command = 0;
5 static uint32_t CommandInit();
7 extern int tlc59711_init(const char *device)
9 command = CommandInit(); // need to set modes
16 int fd = spi_init(&modes, device);
19 extern int tlc59711_send(const uint16_t data[12])
21 uint8_t rx[24]; // throw away
24 tx[0] = command >> 24;
25 tx[1] = command >> 16;
29 if((ret = transfer(tx,rx,4)) < 0){
34 // 12 channels per TLC59711
35 for (int8_t c = 11; c >= 0; c--) {
37 // 16 bits per channel, send MSB first
38 //spiSend(data[c] >> 8);
42 return transfer(tx,rx,24);
46 static uint32_t CommandInit()
48 uint32_t commands = 0;