afiskon / stm32-ssd1306

STM32 library for working with OLEDs based on SSD1306, SH1106, SH1107 and SSD1309, supports I2C and SPI
https://eax.me/stm32-ssd1306/
MIT License
771 stars 213 forks source link

Add function to display bitmap image - port of Adafruit GFX function #51

Closed ryedwards closed 3 years ago

ryedwards commented 3 years ago

Copied over the function from the Adafruit GFX library to display a bitmap image. Generated an image using LCD assistant (https://en.radzio.dxp.pl/bitmap_converter/) and tested on a board with a STM32G4xx controller. Worked well on both a 64x64 image and a 128x64 image I tested.

I also added the define and comment for the STM32G4 as I confirmed it works.

afiskon commented 3 years ago

@ryedwards thanks for the PR! Could you please modify examples/oled-tester as well so that I could check the patch on my collection of LCDs? Or at least to provide an example or two of the images.

ryedwards commented 3 years ago

Absolutely!

Any specific logo requests?

I assume you want me to add code to the ssd1306_tests.c code. I'll add it to that file in my fork so you can test there before I attempt a merge.

--Ryan

ryedwards commented 3 years ago

OK,

I added test code to the ssd1306_tests.c code. It will display bitmaps as part of TestAll().

--Ryan

afiskon commented 3 years ago

@ryedwards Thanks! I have to check the PR with the displays I have but the code looks OK 👍

afiskon commented 3 years ago

@ryedwards Ryan, thanks for contributing. Your patch works great.