Skip to content

Commit

Permalink
Merge pull request #829 from kiki-lamb/adafruit-gfx-compat
Browse files Browse the repository at this point in the history
Adafruit_ILI9341_STM (stm32f1): Compatibility with current HEAD versions of Adafruit GFX
  • Loading branch information
stevstrong committed Nov 3, 2023
2 parents 819ed8e + ad73d1c commit 73cb0a6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions STM32F1/libraries/Adafruit_GFX_AS/Adafruit_GFX_AS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ POSSIBILITY OF SUCH DAMAGE.
#define pgm_read_byte(addr) (*(const unsigned char *)(addr))
#endif

#define textsize textsize_x

Adafruit_GFX_AS::Adafruit_GFX_AS(int16_t w, int16_t h): Adafruit_GFX(w, h)
{
}
Expand Down Expand Up @@ -377,3 +379,5 @@ int16_t Adafruit_GFX_AS::drawFloat(float floatNumber, int16_t decimal, int16_t p
}
return sumX;
}

#undef textsize
6 changes: 6 additions & 0 deletions STM32F1/libraries/SPI/src/SPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,12 @@ class SPIClass {
*/
void write(const void * buffer, uint32 length);

// Some libraries (like recent Adafruit graphics libraries) require
// the write function be availabe under the name transfer, so here it is:
inline void transfer(const void * buffer, size_t length) {
write(buffer, (uint32)length);
}

/**
* @brief Transmit a byte, then return the next unread byte.
*
Expand Down

0 comments on commit 73cb0a6

Please sign in to comment.