File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change 3939#if defined(__AVR_XMEGA__) // only tested with __AVR_ATmega4809__
4040#define AVR_WRITESPI (x ) \
4141 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)
4244#else
4345#define AVR_WRITESPI (x ) for (SPDR = (x); (!(SPSR & _BV (SPIF)));)
4446#endif
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
6565#endif // end !ARM
6666typedef volatile ADAGFX_PORT_t *PORTreg_t; // /< PORT register type
6767
68- #if defined(__AVR__)
68+ #if defined(__AVR__) && !defined(__LGT8F__)
6969#define DEFAULT_SPI_FREQ 8000000L // /< Hardware SPI default speed
7070#else
7171#define DEFAULT_SPI_FREQ 16000000L // /< Hardware SPI default speed
You can’t perform that action at this time.
0 commit comments