Arduino_STM32 icon indicating copy to clipboard operation
Arduino_STM32 copied to clipboard

Adafruit_ILI9341_STM (stm32f1): Compatibility with current HEAD versions of Adafruit GFX

Open kiki-lamb opened this issue 4 years ago • 2 comments

The ILI9341 has depended on a fairly ancient (1.5.3) version of the Adafruit GFX Library.

This commit makes it compatible with the current HEAD versions of the Adafruit GFX Library by making the following two changes:

  • Update references to use textsize_x (renamed in version 1.5.4 of the graphics library) when calculating positions/sizes in Adafruit_GFX_AS.cpp.
  • Provides the SPIClass::transfer(...) method expected by Adafruit BusIO's SPIDevice class.

kiki-lamb avatar Nov 25 '20 09:11 kiki-lamb

While changing all occurrences is one way to solve the issue, wouldn't be nicer to use #define textsize textsize_x before the first occurrence?

stevstrong avatar Nov 25 '20 10:11 stevstrong

I think whether a #define would be 'nicer' is sort of a toss-up: it's more concise, but on the other hand it's one more macro to remember. If you'd prefer to solve it that way I'll happily concede, though.

kiki-lamb avatar Nov 25 '20 21:11 kiki-lamb

It is not a clean solution but I will merge this though. If anyone needs more transfer functions for SPI, then I would recommend to use my repo.

stevstrong avatar Nov 03 '23 09:11 stevstrong