Skip to content

Commit

Permalink
Merge branch 'charclo-nano-every'
Browse files Browse the repository at this point in the history
  • Loading branch information
Nkawu committed Jul 19, 2020
2 parents a081bfe + 1b1455c commit 0268ece
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/TFT_22_ILI9225.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,18 @@
#else
// Standard Byte-by-Byte SPI

#if defined (__AVR__) || defined(TEENSYDUINO)
#if defined(__AVR_ATmega4809__)
static inline uint8_t _avr_spi_read(void) __attribute__((always_inline));
static inline uint8_t _avr_spi_read(void) {
uint8_t r = 0;
SPI0_DATA = r;
while(!(SPI0_INTFLAGS & _BV(SPI_IF_bp)));
r = SPI0_DATA;
return r;
}
#define HSPI_WRITE(b) {SPI0_DATA = (b); while(!(SPI0_INTFLAGS & _BV(SPI_IF_bp)));}
// #define HSPI_READ() _avr_spi_read()
#elif defined (__AVR__) || defined(TEENSYDUINO)
static inline uint8_t _avr_spi_read(void) __attribute__((always_inline));
static inline uint8_t _avr_spi_read(void) {
uint8_t r = 0;
Expand Down

0 comments on commit 0268ece

Please sign in to comment.