Maybe not really relevant, but I'm currently hacking Mike Sheldon's 3D Tie Fighter demo to work on a 128x64 mono DOG LCD from Electronic Assembly (it was originally made for MobileLCD). I modified his Graphics class to take a pointer to an instance of a class I named AbstractLCD. Right now I have the following functions in it:
class AbstractLCD
{
public:
virtual ~AbstractLCD() {};
virtual int width() = 0;
virtual int height() = 0;
virtual void pixel(int x, int y, int colour) = 0;
virtual void fill(int x, int y, int width, int height, int colour) = 0;
virtual void beginupdate() = 0;
virtual void endupdate() = 0;
};
I think this approach works better than inheriting from MobileLCD, as different LCD implementations can be plugged in more easily.
I'd like to hack the MobileLCD license to make an OLED driver as close as possible to the same API. I figured it would be useful to more people if it is a plug-in replacement.
The source file just says "Copyright (c) 2007/8, sford" but doesn't explicitly say what license it is under. I assume "sford" is Simon Ford so, since I couldn't find a private message facility, I'm hoping I can get this clarified via the forums.
I would like to release my own OLED driver under the MIT license to be as mbed-dev-friendly as possible when it is done.
Thanks & regards,
Simon Blandford