|
|
@ -353,29 +353,29 @@ static void lcd_implementation_init( |
|
|
|
#endif |
|
|
|
) { |
|
|
|
|
|
|
|
#if defined(LCD_I2C_TYPE_PCF8575) |
|
|
|
#if defined(LCD_I2C_TYPE_PCF8575) |
|
|
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT); |
|
|
|
#ifdef LCD_I2C_PIN_BL |
|
|
|
lcd.setBacklightPin(LCD_I2C_PIN_BL,POSITIVE); |
|
|
|
lcd.setBacklightPin(LCD_I2C_PIN_BL, POSITIVE); |
|
|
|
lcd.setBacklight(HIGH); |
|
|
|
#endif |
|
|
|
|
|
|
|
#elif defined(LCD_I2C_TYPE_MCP23017) |
|
|
|
#elif defined(LCD_I2C_TYPE_MCP23017) |
|
|
|
lcd.setMCPType(LTI_TYPE_MCP23017); |
|
|
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT); |
|
|
|
lcd.setBacklight(0); //set all the LEDs off to begin with
|
|
|
|
|
|
|
|
#elif defined(LCD_I2C_TYPE_MCP23008) |
|
|
|
#elif defined(LCD_I2C_TYPE_MCP23008) |
|
|
|
lcd.setMCPType(LTI_TYPE_MCP23008); |
|
|
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT); |
|
|
|
|
|
|
|
#elif defined(LCD_I2C_TYPE_PCA8574) |
|
|
|
#elif defined(LCD_I2C_TYPE_PCA8574) |
|
|
|
lcd.init(); |
|
|
|
lcd.backlight(); |
|
|
|
|
|
|
|
#else |
|
|
|
#else |
|
|
|
lcd.begin(LCD_WIDTH, LCD_HEIGHT); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
lcd_set_custom_characters( |
|
|
|
#ifdef LCD_PROGRESS_BAR |
|
|
@ -385,33 +385,24 @@ static void lcd_implementation_init( |
|
|
|
|
|
|
|
lcd.clear(); |
|
|
|
} |
|
|
|
static void lcd_implementation_clear() |
|
|
|
{ |
|
|
|
lcd.clear(); |
|
|
|
} |
|
|
|
|
|
|
|
static void lcd_implementation_clear() { lcd.clear(); } |
|
|
|
|
|
|
|
/* Arduino < 1.0.0 is missing a function to print PROGMEM strings, so we need to implement our own */ |
|
|
|
char lcd_printPGM(const char* str) { |
|
|
|
char c; |
|
|
|
char n = 0; |
|
|
|
while((c = pgm_read_byte(str++))) { |
|
|
|
n += charset_mapper(c); |
|
|
|
} |
|
|
|
char c, n = 0; |
|
|
|
while ((c = pgm_read_byte(str++))) n += charset_mapper(c); |
|
|
|
return n; |
|
|
|
} |
|
|
|
|
|
|
|
char lcd_print(char* str) { |
|
|
|
char c, n = 0;; |
|
|
|
unsigned char i = 0; |
|
|
|
while((c = str[i++])) { |
|
|
|
n += charset_mapper(c); |
|
|
|
} |
|
|
|
while ((c = str[i++])) n += charset_mapper(c); |
|
|
|
return n; |
|
|
|
} |
|
|
|
|
|
|
|
unsigned lcd_print(char c) { |
|
|
|
return charset_mapper(c); |
|
|
|
} |
|
|
|
unsigned lcd_print(char c) { return charset_mapper(c); } |
|
|
|
|
|
|
|
/*
|
|
|
|
Possible status screens: |
|
|
@ -437,7 +428,7 @@ Possible status screens: |
|
|
|
|
|
|
|
20x4 |01234567890123456789| |
|
|
|
|T000/000D B000/000D | |
|
|
|
|T000/000D Z000.0| |
|
|
|
|T000/000D Z000.00 | |
|
|
|
|F100% SD100% T--:--| |
|
|
|
|Status line.........| |
|
|
|
*/ |
|
|
@ -728,7 +719,7 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const |
|
|
|
|
|
|
|
static void lcd_implementation_update_indicators() { |
|
|
|
#if defined(LCD_I2C_PANELOLU2) || defined(LCD_I2C_VIKI) |
|
|
|
//set the LEDS - referred to as backlights by the LiquidTWI2 library
|
|
|
|
// Set the LEDS - referred to as backlights by the LiquidTWI2 library
|
|
|
|
static uint8_t ledsprev = 0; |
|
|
|
uint8_t leds = 0; |
|
|
|
if (target_temperature_bed > 0) leds |= LED_A; |
|
|
@ -766,4 +757,4 @@ static void lcd_implementation_drawmenu_sddirectory(bool sel, uint8_t row, const |
|
|
|
|
|
|
|
#endif // LCD_HAS_SLOW_BUTTONS
|
|
|
|
|
|
|
|
#endif //__ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H
|
|
|
|
#endif // ULTRALCD_IMPLEMENTATION_HITACHI_HD44780_H
|
|
|
|