Browse Source

Merge pull request #8341 from Bob-the-Kuhn/u8g-try-4-Arduino-IDE-compatibility

2.0.x - U8G HAL LCD support - Arduino IDE compatibility
Bob-the-Kuhn 7 years ago
parent
commit
10896b9431
No account linked to committer's email address

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_hw_spi.cpp View File

64
 //  #include "src/core/macros.h"
64
 //  #include "src/core/macros.h"
65
 //  #include "Configuration.h"
65
 //  #include "Configuration.h"
66
 
66
 
67
-  #include <lib/u8g.h>
67
+  #include <U8glib.h>
68
 
68
 
69
   #define SPI_FULL_SPEED 0
69
   #define SPI_FULL_SPEED 0
70
   #define SPI_HALF_SPEED 1
70
   #define SPI_HALF_SPEED 1

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp View File

77
 
77
 
78
 #ifdef TARGET_LPC1768
78
 #ifdef TARGET_LPC1768
79
 
79
 
80
-  #include <lib/u8g.h>
80
+  #include <U8glib.h>
81
 
81
 
82
   #define I2C_SLA         (0x3c*2)
82
   #define I2C_SLA         (0x3c*2)
83
   //#define I2C_CMD_MODE  0x080
83
   //#define I2C_CMD_MODE  0x080

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_ssd_sw_i2c.cpp under construction View File

64
 
64
 
65
 #ifdef TARGET_LPC1768
65
 #ifdef TARGET_LPC1768
66
 
66
 
67
-  #include <lib/u8g.h>
67
+  #include <U8glib.h>
68
 
68
 
69
 void delayMicroseconds(uint32_t us);
69
 void delayMicroseconds(uint32_t us);
70
 //void pinMode(int16_t pin, uint8_t mode);
70
 //void pinMode(int16_t pin, uint8_t mode);

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp View File

62
 //  #include "src/core/macros.h"
62
 //  #include "src/core/macros.h"
63
 //  #include "Configuration.h"
63
 //  #include "Configuration.h"
64
 
64
 
65
-  #include <lib/u8g.h>
65
+  #include <U8glib.h>
66
 
66
 
67
   #define SPI_FULL_SPEED 0
67
   #define SPI_FULL_SPEED 0
68
   #define SPI_HALF_SPEED 1
68
   #define SPI_HALF_SPEED 1

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_st7920_sw_spi.cpp View File

57
 
57
 
58
 #ifdef TARGET_LPC1768
58
 #ifdef TARGET_LPC1768
59
 
59
 
60
-  #include <lib/u8g.h>
60
+  #include <U8glib.h>
61
 
61
 
62
   #include <lpc17xx_pinsel.h>
62
   #include <lpc17xx_pinsel.h>
63
 
63
 

+ 0
- 1
Marlin/src/HAL/HAL_LPC1768/u8g_com_HAL_LPC1768_sw_spi.cpp View File

60
 #if defined (TARGET_LPC1768)
60
 #if defined (TARGET_LPC1768)
61
 
61
 
62
 
62
 
63
-#include <lib/u8g.h>
64
 #include <U8glib.h>
63
 #include <U8glib.h>
65
 
64
 
66
 #include <lpc17xx_pinsel.h>
65
 #include <lpc17xx_pinsel.h>

+ 2
- 12
Marlin/src/lcd/dogm/u8g_dev_ssd1306_sh1106_128x64_I2C.cpp View File

69
  * beginning.
69
  * beginning.
70
  */
70
  */
71
 
71
 
72
-#include <lib/u8g.h>
73
-#include <src/lcd/dogm/HAL_LCD_com_defines.h>
72
+#include <U8glib.h>
73
+#include "HAL_LCD_com_defines.h"
74
 
74
 
75
 #define WIDTH 128
75
 #define WIDTH 128
76
 #define HEIGHT 64
76
 #define HEIGHT 64
150
 }
150
 }
151
 
151
 
152
 
152
 
153
-uint8_t u8g_dev_sh1106_128x64_2x_buf[WIDTH*2] U8G_NOCOMMON ;
154
-u8g_pb_t u8g_dev_sh1106_128x64_2x_pb = { {16, HEIGHT, 0, 0, 0},  WIDTH, u8g_dev_sh1106_128x64_2x_buf};
155
-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 };
156
-
157
-
158
 uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
153
 uint8_t u8g_dev_sh1106_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
159
 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};
154
 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};
160
 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 };
155
 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
 }
224
 }
230
 
225
 
231
 
226
 
232
-uint8_t u8g_dev_ssd1306_128x64_2x_buf[WIDTH*2] U8G_NOCOMMON ;
233
-u8g_pb_t u8g_dev_ssd1306_128x64_2x_pb = { {16, HEIGHT, 0, 0, 0},  WIDTH, u8g_dev_ssd1306_128x64_2x_buf};
234
-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 };
235
-
236
-
237
 uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
227
 uint8_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire_buf[WIDTH*2] U8G_NOCOMMON ;
238
 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};
228
 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};
239
 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 };
229
 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 };

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp View File

57
 
57
 
58
 */
58
 */
59
 
59
 
60
-#include <lib/u8g.h>
60
+#include <U8glib.h>
61
 
61
 
62
-#include <src/lcd/dogm/HAL_LCD_com_defines.h>
62
+#include "HAL_LCD_com_defines.h"
63
 
63
 
64
 #define WIDTH 128
64
 #define WIDTH 128
65
 #define HEIGHT 64
65
 #define HEIGHT 64

+ 2
- 2
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp View File

56
 
56
 
57
 */
57
 */
58
 
58
 
59
-#include <lib/u8g.h>
59
+#include <U8glib.h>
60
 
60
 
61
-#include <src/lcd/dogm/HAL_LCD_com_defines.h>
61
+#include "HAL_LCD_com_defines.h"
62
 
62
 
63
 #define WIDTH 128
63
 #define WIDTH 128
64
 #define HEIGHT 64
64
 #define HEIGHT 64

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp View File

25
 
25
 
26
 #ifndef U8G_HAL_LINKS
26
 #ifndef U8G_HAL_LINKS
27
 
27
 
28
-#include <src/Marlin.h>
28
+#include "../../Marlin.h"
29
 
29
 
30
 //#if ENABLED(U8GLIB_ST7920)
30
 //#if ENABLED(U8GLIB_ST7920)
31
 //#if ( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) &&  LCD_PINS_D4 >= 0) &&  (defined(LCD_PINS_ENABLE) &&  LCD_PINS_ENABLE >= 0))
31
 //#if ( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) &&  LCD_PINS_D4 >= 0) &&  (defined(LCD_PINS_ENABLE) &&  LCD_PINS_ENABLE >= 0))

+ 1
- 1
Marlin/src/lcd/ultralcd_impl_DOGM.h View File

59
 #endif
59
 #endif
60
 
60
 
61
 #include <U8glib.h>
61
 #include <U8glib.h>
62
-#include <src/lcd/dogm/HAL_LCD_class_defines.h>
62
+#include "dogm/HAL_LCD_class_defines.h"
63
 
63
 
64
 #if ENABLED(AUTO_BED_LEVELING_UBL)
64
 #if ENABLED(AUTO_BED_LEVELING_UBL)
65
   #include "../feature/bedlevel/ubl/ubl.h"
65
   #include "../feature/bedlevel/ubl/ubl.h"

+ 1
- 10
platformio.ini View File

19
 
19
 
20
 [common]
20
 [common]
21
 lib_deps =
21
 lib_deps =
22
-
22
+  U8glib-HAL
23
   LiquidCrystal_I2C@1.1.2
23
   LiquidCrystal_I2C@1.1.2
24
   https://github.com/lincomatic/LiquidTWI2.git
24
   https://github.com/lincomatic/LiquidTWI2.git
25
   https://github.com/teemuatlut/TMC2130Stepper.git
25
   https://github.com/teemuatlut/TMC2130Stepper.git
51
 build_flags = -I $BUILDSRC_DIR
51
 build_flags = -I $BUILDSRC_DIR
52
 board_f_cpu = 16000000L
52
 board_f_cpu = 16000000L
53
 lib_deps    = ${common.lib_deps}
53
 lib_deps    = ${common.lib_deps}
54
-  U8glib-HAL
55
 src_filter  = ${common.default_src_filter}
54
 src_filter  = ${common.default_src_filter}
56
 
55
 
57
 #
56
 #
64
 build_flags = -I $BUILDSRC_DIR
63
 build_flags = -I $BUILDSRC_DIR
65
 board_f_cpu = 16000000L
64
 board_f_cpu = 16000000L
66
 lib_deps    = ${common.lib_deps}
65
 lib_deps    = ${common.lib_deps}
67
-  U8glib-HAL
68
 src_filter  = ${common.default_src_filter}
66
 src_filter  = ${common.default_src_filter}
69
 
67
 
70
 #
68
 #
76
 board        = sanguino_atmega1284p
74
 board        = sanguino_atmega1284p
77
 upload_speed = 57600
75
 upload_speed = 57600
78
 lib_deps     = ${common.lib_deps}
76
 lib_deps     = ${common.lib_deps}
79
-  U8glib-HAL
80
 src_filter   = ${common.default_src_filter}
77
 src_filter   = ${common.default_src_filter}
81
 
78
 
82
 #
79
 #
91
 board       = due
88
 board       = due
92
 build_flags = -I $BUILDSRC_DIR
89
 build_flags = -I $BUILDSRC_DIR
93
 lib_deps    = ${common.lib_deps}
90
 lib_deps    = ${common.lib_deps}
94
-  U8glib-HAL
95
 src_filter  = ${common.default_src_filter}
91
 src_filter  = ${common.default_src_filter}
96
 
92
 
97
 #
93
 #
154
 build_flags = -I $BUILDSRC_DIR
150
 build_flags = -I $BUILDSRC_DIR
155
 board_f_cpu = 16000000L
151
 board_f_cpu = 16000000L
156
 lib_deps    = ${common.lib_deps}
152
 lib_deps    = ${common.lib_deps}
157
-  U8glib-HAL
158
 src_filter  = ${common.default_src_filter}
153
 src_filter  = ${common.default_src_filter}
159
 
154
 
160
 #
155
 #
165
 framework  = arduino
160
 framework  = arduino
166
 board      = sanguino_atmega644p
161
 board      = sanguino_atmega644p
167
 lib_deps   = ${common.lib_deps}
162
 lib_deps   = ${common.lib_deps}
168
-  U8glib-HAL
169
 src_filter = ${common.default_src_filter}
163
 src_filter = ${common.default_src_filter}
170
 
164
 
171
 [env:STM32F1]
165
 [env:STM32F1]
174
 board       = genericSTM32F103RE
168
 board       = genericSTM32F103RE
175
 build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py
169
 build_flags = !python Marlin/src/HAL/HAL_STM32F1/stm32f1_flag_script.py
176
 lib_deps    = ${common.lib_deps}
170
 lib_deps    = ${common.lib_deps}
177
-  U8glib-HAL
178
 src_filter  = ${common.default_src_filter}
171
 src_filter  = ${common.default_src_filter}
179
 
172
 
180
 #
173
 #
191
 build_flags   = -I $BUILDSRC_DIR
184
 build_flags   = -I $BUILDSRC_DIR
192
 #board_f_cpu  = 20000000L     ; Bug in Arduino framework disallows boards running at 20Mhz
185
 #board_f_cpu  = 20000000L     ; Bug in Arduino framework disallows boards running at 20Mhz
193
 lib_deps      = ${common.lib_deps}
186
 lib_deps      = ${common.lib_deps}
194
-  U8glib-HAL
195
 src_filter    = ${common.default_src_filter}
187
 src_filter    = ${common.default_src_filter}
196
 
188
 
197
 #
189
 #
203
 board       = teensy35
195
 board       = teensy35
204
 build_flags = -I $BUILDSRC_DIR
196
 build_flags = -I $BUILDSRC_DIR
205
 lib_deps    = ${common.lib_deps}
197
 lib_deps    = ${common.lib_deps}
206
-  U8glib-HAL
207
 lib_ignore  = Adafruit NeoPixel
198
 lib_ignore  = Adafruit NeoPixel
208
 src_filter  = ${common.default_src_filter}
199
 src_filter  = ${common.default_src_filter}

Loading…
Cancel
Save