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 14aa943 commit 2bfe2cbCopy full SHA for 2bfe2cb
Adafruit_SPITFT.cpp
@@ -40,7 +40,12 @@
40
#define AVR_WRITESPI(x) \
41
for (SPI0_DATA = (x); (!(SPI0_INTFLAGS & _BV(SPI_IF_bp)));)
42
#elif defined(__LGT8F__)
43
-#define AVR_WRITESPI(x) SPDR = (x);asm volatile("nop");while((SPFR & _BV(RDEMPT)));SPFR = _BV(RDEMPT) | _BV(WREMPT)
+#define AVR_WRITESPI(x) \
44
+ SPDR = (x); \
45
+ asm volatile("nop"); \
46
+ while ((SPFR & _BV(RDEMPT))) \
47
+ ; \
48
+ SPFR = _BV(RDEMPT) | _BV(WREMPT)
49
#else
50
#define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
51
#endif
0 commit comments