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)
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
You can’t perform that action at this time.
0 commit comments