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 40
40
#if defined(__AVR_XMEGA__) // only tested with __AVR_ATmega4809__
41
41
#define AVR_WRITESPI (x ) \
42
42
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)
43
50
#else
44
51
#define AVR_WRITESPI (x ) for (SPDR = (x); (!(SPSR & _BV (SPIF)));)
45
52
#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
66
66
#endif // end !ARM
67
67
typedef volatile ADAGFX_PORT_t *PORTreg_t; // /< PORT register type
68
68
69
- #if defined(__AVR__)
69
+ #if defined(__AVR__) && !defined(__LGT8F__)
70
70
#define DEFAULT_SPI_FREQ 8000000L // /< Hardware SPI default speed
71
71
#else
72
72
#define DEFAULT_SPI_FREQ 16000000L // /< Hardware SPI default speed
You can’t perform that action at this time.
0 commit comments