MarlinFirmware / U8glib-HAL

Customized U8glib for use in Marlin 2.0
Other
45 stars 33 forks source link

Add support for SSD1306 and SH1106 I2C displays for STM32F1 and STM32F4. #4

Closed jmz52 closed 5 years ago

jmz52 commented 5 years ago

Description

Add support for SSD1306 and SH1106 I2C displays for STM32F1 and STM32F4. Fix compilation problem for LPC1768 introduced by initial pull request.

Tested on STM32F103C8T6 board - works with both 1.3" SH1106 and 0.96" SSD1306 I2C displays. Compiled successfully for LPC1768 (configuration files for MKS SBASE mainboard).

Benefits

STM32F1-based systems can use I2C OLED displays based on SSD1306 and SH1106 controllers.

Additional information

The binary.h file required by lcd/dogm/dogm_bitmaps.h is not present in stm32duino environment. Binary macro are defined in other file in stm32duino, so binary.h needs to be created in HAL_STM32F1 either empty or with following code #include "bit_constants.h"

Including Arduino.h from .c u8glib file causes compilation errors on stm32duino. Including Arduino.h from .cpp works just fine.

Related Issues

https://github.com/MarlinFirmware/Marlin/pull/11583 https://travis-ci.org/MarlinFirmware/Marlin/jobs/418816675

jmz52 commented 5 years ago

Added support for MKS MINI 12864 controller. Pull request closed to open new one.

parsa-0x1 commented 4 years ago

Hello sir. do you have ssd1306 example for LPC1768??? i need it seriously