Formatting fixes

This commit is contained in:
Robin Giese 2020-08-23 21:44:10 -07:00
parent 2fce4a24f2
commit b8da0bd043
1 changed files with 10 additions and 9 deletions

View File

@ -112,15 +112,16 @@ bool Adafruit_SPIDevice::begin(void) {
void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) { void Adafruit_SPIDevice::transfer(uint8_t *buffer, size_t len) {
if (_spi) { if (_spi) {
// hardware SPI is easy // hardware SPI is easy
#ifdef SPARK
// Spark uses asynchronous DMA for multi-byte transfers; #ifdef SPARK
// just use the single-byte method for sync transfers. // Spark uses asynchronous DMA for multi-byte transfers;
for (size_t i = 0; i < len; i++) { // just use the single-byte method for sync transfers.
_spi->transfer(buffer[i]); for (size_t i = 0; i < len; i++) {
} _spi->transfer(buffer[i]);
#else }
_spi->transfer(buffer, len); #else
#endif _spi->transfer(buffer, len);
#endif
return; return;
} }