emfcamp/Mk2-Firmware — pull request #114 by jburgess777 (2014-09-14 21:11:45+00:00)
Title: Fix occasional screen corruption by changing GLCD locking

This moves mutex protection in GLCD up a layer which fixes the occasional
screen corruption seen in some of the apps.

The locking helps avoid the situation where multiple tasks could call
GotoXY() to update the internal position without taking a lock. This
position determines what data is accessed by ReadData() and WriteData().
An invalid position could cause memory access beyond the framebuffer.

Moving the locking up to the higher level drawing routines causes
the mutex to be held for longer but also means the display update
is more likely to be triggered after a complete drawing operation
instead of in the middle.