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 #3

Closed jmz52 closed 5 years ago

jmz52 commented 5 years ago

Description

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

Tested on STM32F103C8T6 board with 1.3" SH1106 and 0.96" SSD1306 I2C displays.

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

thinkyhead commented 5 years ago

Thanks!