olikraus / ucglib

Arduino True Color Library for TFTs and OLEDs
https://github.com/olikraus/ucglib/wiki
Other
261 stars 76 forks source link

Add support for a pointer to user data. #126

Closed basilfx closed 4 years ago

basilfx commented 4 years ago

This PR adds ucg_GetUserPtr and ucg_SetUserPtr to store user data. This feature is disabled by default, and can be enabled by adding WITH_USER_PTR.

If enabled, the ucg_t structure is extended with an additional void* user_ptr.

This feature is copy/pasted from the U8g2 library (commit). I'm using this for the RIOT-OS port of Ucglib.

basilfx commented 4 years ago

Hi @olikraus, do you have the time to look at this PR? Thanks!

olikraus commented 4 years ago

excause... yes, looks ok...:-)