Skip to content

Commit 8c6c694

Browse files
committed
- minor coding guideline fixes
1 parent cf597fc commit 8c6c694

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libraries/SPI/SPI.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ uint8_t ArduinoSPI::transfer(uint8_t data)
218218
else
219219
{
220220
_spi_ctrl.p_regs->SPDR_BY = data;
221-
while (0 == _spi_ctrl.p_regs->SPSR_b.SPRF) {}
221+
while (0U == _spi_ctrl.p_regs->SPSR_b.SPRF) {}
222222
rxbuf = _spi_ctrl.p_regs->SPDR_BY;
223223
}
224224

@@ -259,14 +259,14 @@ void ArduinoSPI::transfer(void *buf, size_t count)
259259
}
260260
else
261261
{
262-
if(buf) {
262+
if (buf) {
263263
uint32_t *buffer32 = (uint32_t *) buf;
264264
size_t ir = 0;
265265
size_t it = 0;
266266
size_t n32 = count / 4U;
267267
count &= 3U;
268268

269-
if(n32) {
269+
if (n32) {
270270
_spi_ctrl.p_regs->SPCR_b.SPE = 0; /* disable SPI unit */
271271
_spi_ctrl.p_regs->SPDCR = R_SPI0_SPDCR_SPLW_Msk; /* SPI word access */
272272
_spi_ctrl.p_regs->SPCMD_b[0].SPB = 2; /* spi bit width = 32 */
@@ -557,7 +557,7 @@ void ArduinoSPI::configSpi(arduino::SPISettings const & settings)
557557
_spi_ctrl.p_regs->SPCR2 = 0;
558558

559559
/* SPMS = 0 -> SPI operation, TXMD = 0 -> full-duplex, SPxIE = 0 -> no interrupts */
560-
if(SPI_MODE_MASTER == _spi_cfg.operating_mode) {
560+
if (SPI_MODE_MASTER == _spi_cfg.operating_mode) {
561561
_spi_ctrl.p_regs->SPCR_b.MSTR = 1;
562562
}
563563

0 commit comments

Comments
 (0)