Prevent compilation of unused u8g-oriented code

This commit is contained in:
Scott Lahteine
2018-05-14 05:35:05 -05:00
parent 35258dd50b
commit fb608938f8
14 changed files with 386 additions and 368 deletions

View File

@@ -8,11 +8,8 @@
*/
#include "../inc/MarlinConfigPre.h"
#include "../inc/MarlinConfig.h"
#define USE_LCDPRINT_U8G ENABLED(ULTRA_LCD) && ENABLED(DOGLCD)
#if USE_LCDPRINT_U8G
#if ENABLED(DOGLCD)
#include <U8glib.h>
extern U8GLIB *pu8g;
@@ -72,9 +69,9 @@ int lcd_put_u8str_max_rom(const char * utf8_str_P, pixel_len_t max_length) {
return ret;
}
#else // !USE_LCDPRINT_U8G
#else // !ULTRA_LCD
#define _lcd_write(a) TRACE("Write LCD: %c (%d)", (a), (int)(a));
#define _lcd_setcursor(col, row) TRACE("Set cursor LCD: (%d,%d)", (col), (row));
#define _lcd_write(a) TRACE("Write LCD: %c (%d)", (a), (int)(a));
#define _lcd_setcursor(col, row) TRACE("Set cursor LCD: (%d,%d)", (col), (row));
#endif // !USE_LCDPRINT_U8G
#endif // !ULTRA_LCD