-
Notifications
You must be signed in to change notification settings - Fork 59
Adding some support for devices like PCF2119R with a strange character set. #28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
…support display drivers like PCF2119R
|
There has been some discussion about supporting pcf2119x devices in the past. Here is one such discussion: I think it would be better to have a discussion on what is really needed to support this type of device to see how it could be best implemented before trying to actually implement something. I think the Arduino forum under the displays section would be a good place for this discussion to start, to get the high level details worked out. From my initial look, as is, this code cannot be pulled in.
|
|
I put the call to remap() in the write() function, not _write(). As far as I can tell, that function is only used when writing to the display RAM. I agree, it's a small overhead for all other display types, but I can't think of any other way to squeeze it into the existing classes. It might be possible to move the remap() call to the iowrite() function in hd44780_I2Clcd - at least then it would only be an overhead for pcf2119x devices. However, I was concerned that putting it there would break the CGRAM functionality. I would have liked to override an existing function without modifying the base classes, but there doesn't seem to be a suitable one. Unfortunately, my C++ skills are seriously outdated - I haven't used C++ seriously for > 20 years - so maybe I'm missing something... The clear_row() is a temporary workaround that's useful in my application. I'd be happy to move it out of the pcf2119r class and back into my application if you would prefer. That's where it was originally. |
|
Anyway, I'm still not going to accept this pull request as there are still other outstanding issues and it is incomplete. Like I said before, one way to make it work is to put all the code in to its own i/o class rather than attempt to wrap the hd44780_I2Clcd i/o class. I would prefer to move further discussion of pcf2119x support outside this pull request since there are still several outstanding things that need to resolved before any code can be written, much less pulled in. I would move the discussion to either an hd44780 issue or as a topic on the Arduino Forum under displays. |
This change modifies the base class slightly to add a virtual remap function with a default identity map.
The new class pcf2119r overrides the default with a mapping that attempts to make most of the ASCII set available. If also adds a clear_row() method to work around the problems with the build-in clear commands.