Skip to content

Commit 40c159f

Browse files
rsaxvcigrr
authored andcommitted
Remove a number of extui instructions
Using a uint8_t for the loop counter resulted in a number of 8-bit extract (extui) instructions. Using a uint32_t prevents this.
1 parent 00815f2 commit 40c159f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libraries/SPI/SPI.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ void SPIClass::writeBytes_(uint8_t * data, uint8_t size) {
400400

401401
uint32_t * fifoPtr = (uint32_t*)&SPI1W0;
402402
uint32_t * dataPtr = (uint32_t*) data;
403-
uint8_t dataSize = ((size + 3) / 4);
403+
uint32_t dataSize = ((size + 3) / 4);
404404

405405
while(dataSize--) {
406406
*fifoPtr = *dataPtr;

0 commit comments

Comments
 (0)