We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2c0786c commit ba6fea7Copy full SHA for ba6fea7
src/Hardware/SPI.h
@@ -115,8 +115,8 @@ class SPI : public ::SPI {
115
while (--count) {
116
value = *sp++;
117
loop_until_bit_is_set(SPSR, SPIF);
118
- *dp++ = SPDR;
119
SPDR = value;
+ *dp++ = SPDR;
120
}
121
122
*dp = SPDR;
@@ -132,13 +132,12 @@ class SPI : public ::SPI {
132
{
133
if (count == 0 || buf == NULL) return;
134
uint8_t* bp = (uint8_t*) buf;
135
- uint8_t value;
136
SPDR = 0;
137
+ __asm__ __volatile__("nop");
138
139
- value = SPDR;
140
141
- *bp++ = value;
+ *bp++ = SPDR;
142
143
144
*bp = SPDR;
0 commit comments