Comment formatting.

This commit is contained in:
Monroe Williams 2022-01-21 18:28:04 -08:00
parent 67bd6e7db5
commit 5efa09dbe7
1 changed files with 14 additions and 14 deletions

View File

@ -311,13 +311,13 @@ bool Adafruit_SPIDevice::write(uint8_t *buffer, size_t len,
} }
} else } else
#elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_) #elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_)
// The variant of transfer() used below currently only exists in the Adafruit core. // The variant of transfer() used below currently only exists in the Adafruit
// It causes a build failure when building against the main Arduino SAMD core. // core. It causes a build failure when building against the main Arduino SAMD
// Unfortunately there doesn't seem to be a supported #define that this code // core. Unfortunately there doesn't seem to be a supported #define that this
// can use to tell which core it's building against. This hack // code can use to tell which core it's building against. This hack (checking
// (checking for the include guard that gets defined when the Adafruit core's // for the include guard that gets defined when the Adafruit core's SPI.h
// SPI.h includes Adafruit_ZeroDMA.h) works for now, but it should be improved // includes Adafruit_ZeroDMA.h) works for now, but it should be improved when
// when possible. // possible.
if (_spi) { if (_spi) {
if (prefix_len > 0) { if (prefix_len > 0) {
_spi->transfer(prefix_buffer, nullptr, prefix_len); _spi->transfer(prefix_buffer, nullptr, prefix_len);
@ -431,13 +431,13 @@ bool Adafruit_SPIDevice::write_then_read(uint8_t *write_buffer,
} }
} else } else
#elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_) #elif defined(ARDUINO_ARCH_SAMD) && defined(_ADAFRUIT_ZERODMA_H_)
// The variant of transfer() used below currently only exists in the Adafruit core. // The variant of transfer() used below currently only exists in the Adafruit
// It causes a build failure when building against the main Arduino SAMD core. // core. It causes a build failure when building against the main Arduino SAMD
// Unfortunately there doesn't seem to be a supported #define that this code // core. Unfortunately there doesn't seem to be a supported #define that this
// can use to tell which core it's building against. This hack // code can use to tell which core it's building against. This hack (checking
// (checking for the include guard that gets defined when the Adafruit core's // for the include guard that gets defined when the Adafruit core's SPI.h
// SPI.h includes Adafruit_ZeroDMA.h) works for now, but it should be improved // includes Adafruit_ZeroDMA.h) works for now, but it should be improved when
// when possible. // possible.
if (_spi) { if (_spi) {
if (write_len > 0) { if (write_len > 0) {
_spi->transfer(write_buffer, nullptr, write_len); _spi->transfer(write_buffer, nullptr, write_len);