Hello,
I have two SPI displays (ILI9341 and ILI9163). Both are working fine alone but I can’t use them simultaneously
I think that it is because the OnFlush
event is a static event in the Graphics class. So there can’t be two instances of it :
ILI9163 = new ILI9163Controller(Hardware.SocketThree);
ILI9341 = new ILI9341Controller(Hardware.SocketTwo);
ILI9341.SetOrientation(180);
var d1 = Graphics.FromImage(new Bitmap(240, 320));
var d2 = Graphics.FromImage(new Bitmap(128, 128));
Graphics.OnFlushEvent += ????;
d1.Clear();
d1.Flush();
d2.Clear();
d2.Flush();
There is no parameter in the OnFlush
event that can tell which buffer is drawn or which “screen” needs a flush.
Any idea to solve this ?
Btw, the hdc
parameter is always 0. Is it expected ?