File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -218,7 +218,7 @@ uint8_t ArduinoSPI::transfer(uint8_t data)
218
218
else
219
219
{
220
220
_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 ) {}
222
222
rxbuf = _spi_ctrl.p_regs ->SPDR_BY ;
223
223
}
224
224
@@ -259,14 +259,14 @@ void ArduinoSPI::transfer(void *buf, size_t count)
259
259
}
260
260
else
261
261
{
262
- if (buf) {
262
+ if (buf) {
263
263
uint32_t *buffer32 = (uint32_t *) buf;
264
264
size_t ir = 0 ;
265
265
size_t it = 0 ;
266
266
size_t n32 = count / 4U ;
267
267
count &= 3U ;
268
268
269
- if (n32) {
269
+ if (n32) {
270
270
_spi_ctrl.p_regs ->SPCR_b .SPE = 0 ; /* disable SPI unit */
271
271
_spi_ctrl.p_regs ->SPDCR = R_SPI0_SPDCR_SPLW_Msk; /* SPI word access */
272
272
_spi_ctrl.p_regs ->SPCMD_b [0 ].SPB = 2 ; /* spi bit width = 32 */
@@ -557,7 +557,7 @@ void ArduinoSPI::configSpi(arduino::SPISettings const & settings)
557
557
_spi_ctrl.p_regs ->SPCR2 = 0 ;
558
558
559
559
/* 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 ) {
561
561
_spi_ctrl.p_regs ->SPCR_b .MSTR = 1 ;
562
562
}
563
563
You can’t perform that action at this time.
0 commit comments