From d47fbf791b5369510344b09c0486b6d8b4ad9712 Mon Sep 17 00:00:00 2001 From: Bob-the-Kuhn Date: Wed, 8 Nov 2017 15:48:35 -0600 Subject: [PATCH] Arduini IDE compatibility changes changed includes to make Arduino IDE happy --- .../HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp | 2 +- .../HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp | 2 +- ..._HAL_LPC1768_ssd_sw_i2c.cpp under construction | 2 +- .../u8g_com_HAL_LPC1768_st7920_hw_spi.cpp | 2 +- .../u8g_com_HAL_LPC1768_st7920_sw_spi.cpp | 2 +- .../HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp | 1 - .../lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp | 14 ++------------ Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp | 4 ++-- Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp | 4 ++-- .../lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp | 2 +- Marlin/src/lcd/ultralcd_impl_DOGM.h | 2 +- platformio.ini | 11 +---------- 12 files changed, 14 insertions(+), 34 deletions(-) diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp index 93974ac9c8..c7771eeb30 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp @@ -64,7 +64,7 @@ // #include "src/core/macros.h" // #include "Configuration.h" - #include + #include #define SPI_FULL_SPEED 0 #define SPI_HALF_SPEED 1 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp index ce5ac199f6..514bfa5874 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp @@ -77,7 +77,7 @@ #ifdef TARGET_LPC1768 - #include + #include #define I2C_SLA (0x3c*2) //#define I2C_CMD_MODE 0x080 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction index 11fd77f7c4..876c8db7a0 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction @@ -64,7 +64,7 @@ #ifdef TARGET_LPC1768 - #include + #include void delayMicroseconds(uint32_t us); //void pinMode(int16_t pin, uint8_t mode); diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp index f9b0890f78..f07dbef165 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp @@ -62,7 +62,7 @@ // #include "src/core/macros.h" // #include "Configuration.h" - #include + #include #define SPI_FULL_SPEED 0 #define SPI_HALF_SPEED 1 diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp index 47a4f443f2..0f861c96b4 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp @@ -57,7 +57,7 @@ #ifdef TARGET_LPC1768 - #include + #include #include diff --git a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp index eca12685a7..88601adcd7 100644 --- a/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp @@ -60,7 +60,6 @@ #if defined (TARGET_LPC1768) -#include #include #include diff --git a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp index 8d0221fc89..c17f3e5bef 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp @@ -69,8 +69,8 @@ * beginning. */ -#include -#include +#include +#include "HAL_LCD_com_defines.h" #define WIDTH 128 #define HEIGHT 64 @@ -150,11 +150,6 @@ uint8_t u8g_dev_sh1106_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t m } -uint8_t u8g_dev_sh1106_128x64_2x_buf[WIDTH*2] U8G_NOCOMMON ; -u8g_pb_t u8g_dev_sh1106_128x64_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_sh1106_128x64_2x_buf}; -u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c = { u8g_dev_sh1106_128x64_2x_2_wire_fn, &u8g_dev_sh1106_128x64_2x_pb, U8G_COM_SSD_I2C_HAL }; - - uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ; u8g_pb_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf}; u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire = { u8g_dev_sh1106_128x64_2x_2_wire_fn, &u8g_dev_sh1106_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL }; @@ -229,11 +224,6 @@ uint8_t u8g_dev_ssd1306_128x64_2x_2_wire_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t } -uint8_t u8g_dev_ssd1306_128x64_2x_buf[WIDTH*2] U8G_NOCOMMON ; -u8g_pb_t u8g_dev_ssd1306_128x64_2x_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_buf}; -u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_pb, U8G_COM_SSD_I2C_HAL }; - - uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ; u8g_pb_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb = { {16, HEIGHT, 0, 0, 0}, WIDTH, u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf}; u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire = { u8g_dev_ssd1306_128x64_2x_2_wire_fn, &u8g_dev_ssd1306_128x64_2x_i2c_2_wire_pb, U8G_COM_SSD_I2C_HAL }; diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp index 6019b82282..0bd87ae205 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp @@ -57,9 +57,9 @@ */ -#include +#include -#include +#include "HAL_LCD_com_defines.h" #define WIDTH 128 #define HEIGHT 64 diff --git a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp index d3f7f66eeb..e5830bdffe 100644 --- a/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp +++ b/Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp @@ -56,9 +56,9 @@ */ -#include +#include -#include +#include "HAL_LCD_com_defines.h" #define WIDTH 128 #define HEIGHT 64 diff --git a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp index 261b72607f..66a21d1334 100644 --- a/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp +++ b/Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp @@ -25,7 +25,7 @@ #ifndef U8G_HAL_LINKS -#include +#include "../../Marlin.h" //#if ENABLED(U8GLIB_ST7920) //#if ( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) && LCD_PINS_D4 >= 0) && (defined(LCD_PINS_ENABLE) && LCD_PINS_ENABLE >= 0)) diff --git a/Marlin/src/lcd/ultralcd_impl_DOGM.h b/Marlin/src/lcd/ultralcd_impl_DOGM.h index bb6fddfd85..84117c1ad8 100644 --- a/Marlin/src/lcd/ultralcd_impl_DOGM.h +++ b/Marlin/src/lcd/ultralcd_impl_DOGM.h @@ -59,7 +59,7 @@ #endif #include -#include +#include "dogm/HAL_LCD_class_defines.h" #if ENABLED(AUTO_BED_LEVELING_UBL) #include "../feature/bedlevel/ubl/ubl.h" diff --git a/platformio.ini b/platformio.ini index 337c6474b4..9d2890dd5c 100644 --- a/platformio.ini +++ b/platformio.ini @@ -19,7 +19,7 @@ env_default = megaatmega2560 [common] lib_deps = - + U8glib-HAL LiquidCrystal_I2C@1.1.2 https://github.com/lincomatic/LiquidTWI2.git https://github.com/teemuatlut/TMC2130Stepper.git @@ -51,7 +51,6 @@ board = megaatmega2560 build_flags = -I $BUILDSRC_DIR board_f_cpu = 16000000L lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -64,7 +63,6 @@ board = megaatmega1280 build_flags = -I $BUILDSRC_DIR board_f_cpu = 16000000L lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -76,7 +74,6 @@ framework = arduino board = sanguino_atmega1284p upload_speed = 57600 lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -91,7 +88,6 @@ framework = arduino board = due build_flags = -I $BUILDSRC_DIR lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -154,7 +150,6 @@ board = reprap_rambo build_flags = -I $BUILDSRC_DIR board_f_cpu = 16000000L lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -165,7 +160,6 @@ platform = atmelavr framework = arduino board = sanguino_atmega644p lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} [env:STM32F1] @@ -174,7 +168,6 @@ framework = arduino board = genericSTM32F103RE build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -191,7 +184,6 @@ board = teensy20pp build_flags = -I $BUILDSRC_DIR #board_f_cpu = 20000000L ; Bug in Arduino framework disallows boards running at 20Mhz lib_deps = ${common.lib_deps} - U8glib-HAL src_filter = ${common.default_src_filter} # @@ -203,6 +195,5 @@ framework = arduino board = teensy35 build_flags = -I $BUILDSRC_DIR lib_deps = ${common.lib_deps} - U8glib-HAL lib_ignore = Adafruit NeoPixel src_filter = ${common.default_src_filter}