Skip to content

More features desired? XOR / partial redraw / C++ #106

@Clausplusplus

Description

@Clausplusplus

Hi,

thanks for the SSD106 lib. I tried it with STM32G474 via SPI and it works fine.
I have some changes/extensions in mind and can do them locally or you may find it useful enough to publish here.

  1. I need drawing not with a specific colour but with XORing the previuos content. This way you can draw something like a line and remove it again with the same parameters. Long time ago there was a game called quix working this way, maybe you remember it. See https://youtu.be/P-vpgL7ryuQ -
    This change was really simple (add an entry like Invert to SSD1306_COLOR in ssd1306.h and set a pixel with ^= in ssd1306_DrawPixel() if color is Invert.

  2. Keep track of changed area or pages, this could speed up redrawing in ssd1306_UpdateScreen() if only a small portion of the screen is invalidated.

  3. Port to C++ to facilitate simple handling and usage of multi displays simultaneously without colliding global configurations.

Do you want to follow some of this changes?

BTW STM32G4 is missing in the config template, but works when you add #define STM32G4 manually.

Thanks for sharing!

BR Klaus

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions