File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 4040#if defined(__AVR_XMEGA__) // only tested with __AVR_ATmega4809__
4141#define AVR_WRITESPI (x ) \
4242 for (SPI0_DATA = (x); (!(SPI0_INTFLAGS & _BV (SPI_IF_bp)));)
43+ #elif defined(__LGT8F__)
44+ #define AVR_WRITESPI (x ) \
45+ SPDR = (x); \
46+ asm volatile (" nop" ); \
47+ while ((SPFR & _BV (RDEMPT))) \
48+ ; \
49+ SPFR = _BV(RDEMPT) | _BV(WREMPT)
4350#else
4451#define AVR_WRITESPI (x ) for (SPDR = (x); (!(SPSR & _BV (SPIF)));)
4552#endif
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ typedef uint32_t ADAGFX_PORT_t; ///< PORT values are 32-bit
6666#endif // end !ARM
6767typedef volatile ADAGFX_PORT_t *PORTreg_t; // /< PORT register type
6868
69- #if defined(__AVR__)
69+ #if defined(__AVR__) && !defined(__LGT8F__)
7070#define DEFAULT_SPI_FREQ 8000000L // /< Hardware SPI default speed
7171#else
7272#define DEFAULT_SPI_FREQ 16000000L // /< Hardware SPI default speed
You can’t perform that action at this time.
0 commit comments