Prevent compilation of unused u8g-oriented code
This commit is contained in:
@ -65,7 +65,7 @@
|
||||
* beginning.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
|
||||
|
@ -67,43 +67,43 @@
|
||||
|
||||
/* init sequence from https://github.com/adafruit/ST7565-LCD/blob/master/ST7565/ST7565.cpp */
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_init_seq[] PROGMEM = {
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_ADR(0), // instruction mode
|
||||
U8G_ESC_CS(1), // enable chip
|
||||
U8G_ESC_RST(15), // do reset low pulse with (15*16)+2 milliseconds (=maximum delay)*/
|
||||
|
||||
0x0A2, // 0x0A2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
|
||||
0x0A0, // Normal ADC Select (according to Displaytech 64128N datasheet)
|
||||
0x0A2, // 0x0A2: LCD bias 1/9 (according to Displaytech 64128N datasheet)
|
||||
0x0A0, // Normal ADC Select (according to Displaytech 64128N datasheet)
|
||||
|
||||
0x0C8, // common output mode: set scan direction normal operation/SHL Select, 0x0C0 --> SHL = 0, normal, 0x0C8 --> SHL = 1
|
||||
0x040, // Display start line for Displaytech 64128N
|
||||
0x0C8, // common output mode: set scan direction normal operation/SHL Select, 0x0C0 --> SHL = 0, normal, 0x0C8 --> SHL = 1
|
||||
0x040, // Display start line for Displaytech 64128N
|
||||
|
||||
0x028 | 0x04, // power control: turn on voltage converter
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
0x028 | 0x04, // power control: turn on voltage converter
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
|
||||
0x028 | 0x06, // power control: turn on voltage regulator
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
0x028 | 0x06, // power control: turn on voltage regulator
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
|
||||
0x028 | 0x07, // power control: turn on voltage follower
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
0x028 | 0x07, // power control: turn on voltage follower
|
||||
U8G_ESC_DLY(50), // delay 50 ms
|
||||
|
||||
0x010, // Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N
|
||||
0x010, // Set V0 voltage resistor ratio. Setting for controlling brightness of Displaytech 64128N
|
||||
|
||||
0x0A6, // display normal, bit val 0: LCD pixel off.
|
||||
0x0A6, // display normal, bit val 0: LCD pixel off.
|
||||
|
||||
0x081, // set contrast
|
||||
0x01E, // Contrast value. Setting for controlling brightness of Displaytech 64128N
|
||||
0x081, // set contrast
|
||||
0x01E, // Contrast value. Setting for controlling brightness of Displaytech 64128N
|
||||
|
||||
|
||||
0x0AF, // display on
|
||||
0x0AF, // display on
|
||||
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
0x0A5, // display all points, ST7565
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
0x0A4, // normal display
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_END // end of sequence
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
0x0A5, // display all points, ST7565
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
U8G_ESC_DLY(100), // delay 100 ms
|
||||
0x0A4, // normal display
|
||||
U8G_ESC_CS(0), // disable chip
|
||||
U8G_ESC_END // end of sequence
|
||||
};
|
||||
|
||||
static const uint8_t u8g_dev_st7565_64128n_HAL_data_start[] PROGMEM = {
|
||||
@ -211,7 +211,6 @@ uint8_t u8g_dev_st7565_64128n_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg,
|
||||
return u8g_dev_pb16v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
|
||||
U8G_PB_DEV(u8g_dev_st7565_64128n_HAL_sw_spi, WIDTH, HEIGHT, PAGE_HEIGHT, u8g_dev_st7565_64128n_HAL_fn, U8G_COM_HAL_SW_SPI_FN);
|
||||
|
||||
uint8_t u8g_dev_st7565_64128n_HAL_2x_buf[WIDTH*2] U8G_NOCOMMON ;
|
||||
|
@ -53,7 +53,7 @@
|
||||
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
|
||||
|
@ -57,7 +57,7 @@
|
||||
|
||||
*/
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../inc/MarlinConfigPre.h"
|
||||
|
||||
#if ENABLED(DOGLCD)
|
||||
|
||||
@ -108,10 +108,8 @@ static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
|
||||
U8G_ESC_END /* end of sequence */
|
||||
};
|
||||
|
||||
uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
|
||||
switch(msg) {
|
||||
case U8G_DEV_MSG_INIT:
|
||||
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
|
||||
@ -140,10 +138,8 @@ uint8_t u8g_dev_uc1701_mini12864_HAL_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg,
|
||||
return u8g_dev_pb8v1_base_fn(u8g, dev, msg, arg);
|
||||
}
|
||||
|
||||
uint8_t u8g_dev_uc1701_mini12864_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg)
|
||||
{
|
||||
switch(msg)
|
||||
{
|
||||
uint8_t u8g_dev_uc1701_mini12864_HAL_2x_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, void *arg) {
|
||||
switch(msg) {
|
||||
case U8G_DEV_MSG_INIT:
|
||||
u8g_InitCom(u8g, dev, U8G_SPI_CLK_CYCLE_300NS);
|
||||
u8g_WriteEscSeqP(u8g, dev, u8g_dev_uc1701_mini12864_HAL_init_seq);
|
||||
|
@ -24,12 +24,13 @@
|
||||
// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
|
||||
|
||||
#include "../../inc/MarlinConfig.h"
|
||||
#include "../../HAL/Delay.h"
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920)
|
||||
|
||||
#if !(defined(U8G_HAL_LINKS) || defined(__SAM3X8E__))
|
||||
|
||||
#include "../../HAL/Delay.h"
|
||||
|
||||
#define ST7920_CLK_PIN LCD_PINS_D4
|
||||
#define ST7920_DAT_PIN LCD_PINS_ENABLE
|
||||
#define ST7920_CS_PIN LCD_PINS_RS
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user