Skip to content

Commit

Permalink
Remove a number of extui instructions
Browse files Browse the repository at this point in the history
Using a uint8_t for the loop counter resulted
in a number of 8-bit extract (extui) instructions.
Using a uint32_t prevents this.
  • Loading branch information
rsaxvc authored and igrr committed Jun 7, 2017
1 parent 00815f2 commit 40c159f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libraries/SPI/SPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@ void SPIClass::writeBytes_(uint8_t * data, uint8_t size) {

uint32_t * fifoPtr = (uint32_t*)&SPI1W0;
uint32_t * dataPtr = (uint32_t*) data;
uint8_t dataSize = ((size + 3) / 4);
uint32_t dataSize = ((size + 3) / 4);

while(dataSize--) {
*fifoPtr = *dataPtr;
Expand Down

0 comments on commit 40c159f

Please sign in to comment.