Nkawu / TFT_22_ILI9225

Arduino library for 2.2" TFT display modules with ILI9225 driver
GNU General Public License v3.0
82 stars 43 forks source link

Bug in fastmode #43

Closed Bolukan closed 5 years ago

Bolukan commented 5 years ago

Hi again,

I discovered another bug. drawChar applies startWrite/checkSPI but if fastmode becomes enabled, the code calls _setWindow, which also calls startWrite. Hence a hangup.

Before proposing a pull request (currently I disable fastMode), I wonder how we are supposed to deal with these startWrite/checkSPI functions. The current idea is that only the first function opens the SPI transaction. But as also helper functions can be called directly themselves (p.e. drawText calls drawChar, drawChar calls _setWindows, etc), the code has to check whether it is a main function or a helper function.

@Nkawu (or others): how to proceed?

PS: For example use a counter: only '0' starts the transaction, and helpers '1' or helper-helpers '2', etc only transmit.

Bolukan commented 5 years ago

@Nkawu, I propose to add a counter, shall I propose a pull?

Nkawu commented 5 years ago

Yes please do. Thank you for taking the lead on this, unfortunately I don't have too much time to spend on personal projects any more.

Bolukan commented 5 years ago

Applied changes to https://github.com/Bolukan/TFT_22_ILI9225 Code compiles and works with my sketch. I would be grateful to any who also test it with some of their own sketches and report back.

Bolukan commented 5 years ago

solved see #44