Browse Source

Some LCD code cleanup

pull/1/head
Scott Lahteine 5 years ago
parent
commit
aa1d587128
  1. 2
      Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp
  2. 6
      Marlin/src/inc/Conditionals_LCD.h
  3. 4
      Marlin/src/inc/Conditionals_post.h
  4. 2
      Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp
  5. 2
      Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp
  6. 68
      Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
  7. 7
      config/examples/Mks/Sbase/Configuration_adv.h

2
Marlin/src/HAL/HAL_LPC1768/u8g/u8g_com_HAL_LPC1768_ssd_hw_i2c.cpp

@ -26,8 +26,6 @@
* COM interface for Arduino (AND ATmega) and the SSDxxxx chip (SOLOMON) variant * COM interface for Arduino (AND ATmega) and the SSDxxxx chip (SOLOMON) variant
* I2C protocol * I2C protocol
* *
* ToDo: Rename this to u8g_com_avr_ssd_i2c.c
*
* Universal 8bit Graphics Library * Universal 8bit Graphics Library
* *
* Copyright (c) 2011, olikraus@gmail.com * Copyright (c) 2011, olikraus@gmail.com

6
Marlin/src/inc/Conditionals_LCD.h

@ -66,9 +66,9 @@
#elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864) #elif ENABLED(miniVIKI) || ENABLED(VIKI2) || ENABLED(ELB_FULL_GRAPHIC_CONTROLLER) || ENABLED(AZSMZ_12864)
#define ULTRA_LCD //general LCD support, also 16x2 #define ULTRA_LCD
#define DOGLCD // Support for SPI LCD 128x64 (Controller ST7565R graphic Display Family) #define DOGLCD
#define ULTIMAKERCONTROLLER //as available from the Ultimaker online store. #define ULTIMAKERCONTROLLER
#if ENABLED(miniVIKI) #if ENABLED(miniVIKI)
#define LCD_CONTRAST_MIN 75 #define LCD_CONTRAST_MIN 75

4
Marlin/src/inc/Conditionals_post.h

@ -1544,9 +1544,9 @@
#endif #endif
/** /**
* VIKI2, miniVIKI, AZSMZ_12864, and MKS_12864OLED_SSD1306 require DOGLCD_SCK and DOGLCD_MOSI to be defined. * Make sure DOGLCD_SCK and DOGLCD_MOSI are defined.
*/ */
#if ENABLED(VIKI2) || ENABLED(miniVIKI) || ENABLED(AZSMZ_12864) || ENABLED(MKS_12864OLED_SSD1306) #if ENABLED(DOGLCD)
#ifndef DOGLCD_SCK #ifndef DOGLCD_SCK
#define DOGLCD_SCK SCK_PIN #define DOGLCD_SCK SCK_PIN
#endif #endif

2
Marlin/src/lcd/dogm/u8g_dev_st7565_64128n_HAL.cpp

@ -21,7 +21,7 @@
*/ */
/** /**
* u8g_dev_st7565_64128n_HAL.c (Displaytech) * Based on u8g_dev_st7565_64128n_HAL.c (Displaytech)
* *
* Universal 8bit Graphics Library * Universal 8bit Graphics Library
* *

2
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp

@ -21,7 +21,7 @@
*/ */
/** /**
* u8g_dev_st7920_128x64_HAL.c * Based on u8g_dev_st7920_128x64.c
* *
* Universal 8bit Graphics Library * Universal 8bit Graphics Library
* *

68
Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp

@ -20,42 +20,38 @@
* *
*/ */
/**
/* * Based on u8g_dev_uc1701_mini12864.c (dealextreme)
*
based on u8g_dev_uc1701_mini12864_HAL.c (dealextreme) * Universal 8bit Graphics Library
*
Universal 8bit Graphics Library * Copyright (c) 2011, olikraus@gmail.com
* All rights reserved.
Copyright (c) 2011, olikraus@gmail.com *
All rights reserved. * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
Redistribution and use in source and binary forms, with or without modification, *
are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this list
* of conditions and the following disclaimer.
* Redistributions of source code must retain the above copyright notice, this list *
of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, this
* list of conditions and the following disclaimer in the documentation and/or other
* Redistributions in binary form must reproduce the above copyright notice, this * materials provided with the distribution.
list of conditions and the following disclaimer in the documentation and/or other *
materials provided with the distribution. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF */
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "../../inc/MarlinConfigPre.h" #include "../../inc/MarlinConfigPre.h"

7
config/examples/Mks/Sbase/Configuration_adv.h

@ -918,13 +918,6 @@
// Swap the CW/CCW indicators in the graphics overlay // Swap the CW/CCW indicators in the graphics overlay
//#define OVERLAY_GFX_REVERSE //#define OVERLAY_GFX_REVERSE
// VIKI2 and miniVIKI require DOGLCD_SCK and DOGLCD_MOSI to be defined.
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define DOGLCD_SCK SCK_PIN
#define DOGLCD_MOSI MOSI_PIN
#endif
/** /**
* ST7920-based LCDs can emulate a 16 x 4 character display using * ST7920-based LCDs can emulate a 16 x 4 character display using
* the ST7920 character-generator for very fast screen updates. * the ST7920 character-generator for very fast screen updates.

Loading…
Cancel
Save