Added debug logging to ProviderSpi.cpp on writes. (#213)

* Added debug logging to ProviderSpi.cpp on writes.
If you have more leds configured than the SPI buffer can support you now get this:
[HYPERIOND LedDevice] <DEBUG> <ProviderSpi.cpp:92:writeBytes()> SPI failed to write. errno: 90, Message too long

* changed debug to error
This commit is contained in:
redPanther 2016-08-31 10:11:09 +02:00 committed by GitHub
commit 6277a280a1

View File

@ -89,6 +89,7 @@ int ProviderSpi::writeBytes(const unsigned size, const uint8_t * data)
} }
int retVal = ioctl(_fid, SPI_IOC_MESSAGE(1), &_spi); int retVal = ioctl(_fid, SPI_IOC_MESSAGE(1), &_spi);
ErrorIf((retVal < 0), _log, "SPI failed to write. errno: %d, %s", errno, strerror(errno) );
if (retVal == 0 && _latchTime_ns > 0) if (retVal == 0 && _latchTime_ns > 0)
{ {