add support for LGT8F cpu

This commit is contained in:
Oliver committed 2020-08-07 01:48:15 +02:00
1 parent 14aa943754
commit 2bfe2cbad2
1 file changed
+6 -1
+6 -1
View File
@@ -40,7 +40,12 @@
#define AVR_WRITESPI(x) \
for (SPI0_DATA = (x); (!(SPI0_INTFLAGS & _BV(SPI_IF_bp)));)
#elif defined(__LGT8F__)
#define AVR_WRITESPI(x) SPDR = (x);asm volatile("nop");while((SPFR & _BV(RDEMPT)));SPFR = _BV(RDEMPT) | _BV(WREMPT)
#define AVR_WRITESPI(x) \
SPDR = (x); \
asm volatile("nop"); \
while ((SPFR & _BV(RDEMPT))) \
; \
SPFR = _BV(RDEMPT) | _BV(WREMPT)
#else
#define AVR_WRITESPI(x) for (SPDR = (x); (!(SPSR & _BV(SPIF)));)
#endif