Skip to content

Commit

Permalink
Run formatter
Browse files Browse the repository at this point in the history
  • Loading branch information
multiplemonomials committed Aug 23, 2023
1 parent f736da9 commit 2d1b27e
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions storage/blockdevice/COMPONENT_SD/source/SDBlockDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -731,11 +731,9 @@ uint8_t SDBlockDevice::_cmd_spi(SDBlockDevice::cmdSupported cmd, uint32_t arg)

// send a command
#if DEVICE_SPI_ASYNCH
if(_async_spi_enabled)
{
if (_async_spi_enabled) {
_spi.transfer_and_wait(cmdPacket, PACKET_SIZE, nullptr, 0);
}
else
} else
#endif
{
_spi.write(cmdPacket, PACKET_SIZE, nullptr, 0);
Expand Down Expand Up @@ -926,11 +924,9 @@ int SDBlockDevice::_read_bytes(uint8_t *buffer, uint32_t length)

// read data
#if DEVICE_SPI_ASYNCH
if(_async_spi_enabled)
{
if (_async_spi_enabled) {
_spi.transfer_and_wait(nullptr, 0, buffer, length);
}
else
} else
#endif
{
_spi.write(nullptr, 0, buffer, length);
Expand Down Expand Up @@ -971,14 +967,11 @@ int SDBlockDevice::_read(uint8_t *buffer, uint32_t length)

// read data
#if DEVICE_SPI_ASYNCH
if(_async_spi_enabled)
{
if(_spi.transfer_and_wait(nullptr, 0, buffer, length) != 0)
{
if (_async_spi_enabled) {
if (_spi.transfer_and_wait(nullptr, 0, buffer, length) != 0) {
return SD_BLOCK_DEVICE_ERROR_WRITE;
}
}
else
} else
#endif
{
_spi.write(NULL, 0, (char *) buffer, length);
Expand Down Expand Up @@ -1016,11 +1009,9 @@ uint8_t SDBlockDevice::_write(const uint8_t *buffer, uint8_t token, uint32_t len

// write the data
#if DEVICE_SPI_ASYNCH
if(_async_spi_enabled)
{
if (_async_spi_enabled) {
_spi.transfer_and_wait(buffer, length, nullptr, 0);
}
else
} else
#endif
{
_spi.write(buffer, length, nullptr, 0);
Expand Down

0 comments on commit 2d1b27e

Please sign in to comment.