2017-11-03 02:57:08 +01:00
|
|
|
/**
|
|
|
|
* Marlin 3D Printer Firmware
|
|
|
|
* Copyright (C) 2016, 2017 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
|
|
|
|
*
|
|
|
|
* Based on Sprinter and grbl.
|
|
|
|
* Copyright (C) 2011 Camiel Gubbels / Erik van der Zalm
|
|
|
|
*
|
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*
|
|
|
|
*/
|
2018-10-23 23:00:34 +02:00
|
|
|
#pragma once
|
2017-11-03 02:57:08 +01:00
|
|
|
|
2018-11-13 08:47:45 +01:00
|
|
|
#include "../../inc/MarlinConfig.h"
|
|
|
|
|
2017-11-03 02:57:08 +01:00
|
|
|
// use this file to create the public interface for device drivers that are NOT in the U8G library
|
|
|
|
|
|
|
|
extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_sw_spi;
|
|
|
|
extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi;
|
2018-11-13 08:47:45 +01:00
|
|
|
|
|
|
|
class U8GLIB_64128N_2X_HAL : public U8GLIB {
|
|
|
|
public:
|
|
|
|
U8GLIB_64128N_2X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset)
|
|
|
|
{ }
|
|
|
|
U8GLIB_64128N_2X_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, (uint8_t)cs, (uint8_t)a0, (uint8_t)reset)
|
|
|
|
{ }
|
2017-11-03 02:57:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_sw_spi;
|
|
|
|
extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi;
|
2018-11-13 08:47:45 +01:00
|
|
|
|
|
|
|
class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB {
|
|
|
|
public:
|
|
|
|
U8GLIB_ST7920_128X64_4X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE
|
|
|
|
{ }
|
|
|
|
U8GLIB_ST7920_128X64_4X_HAL(pin_t cs, pin_t reset = U8G_PIN_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE
|
|
|
|
{ }
|
2017-11-03 02:57:08 +01:00
|
|
|
};
|
|
|
|
|
2018-11-13 08:47:45 +01:00
|
|
|
//
|
|
|
|
// AVR version uses ultralcd_st7920_u8glib_rrd_AVR.cpp
|
|
|
|
// HAL version uses u8g_dev_st7920_128x64_HAL.cpp
|
|
|
|
//
|
2017-11-03 02:57:08 +01:00
|
|
|
extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
|
2018-11-13 08:47:45 +01:00
|
|
|
|
|
|
|
class U8GLIB_ST7920_128X64_RRD : public U8GLIB {
|
|
|
|
public:
|
|
|
|
U8GLIB_ST7920_128X64_RRD(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi, (uint8_t)sck, (uint8_t)mosi, (uint8_t)cs, U8G_PIN_NONE, (uint8_t)reset) // a0 = U8G_PIN_NONE
|
|
|
|
{ }
|
2017-11-03 02:57:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern u8g_dev_t u8g_dev_sh1106_128x64_2x_i2c_2_wire;
|
2018-11-13 08:47:45 +01:00
|
|
|
|
2017-11-03 02:57:08 +01:00
|
|
|
class U8GLIB_SH1106_128X64_2X_I2C_2_WIRE : public U8GLIB {
|
2018-11-13 08:47:45 +01:00
|
|
|
public:
|
|
|
|
U8GLIB_SH1106_128X64_2X_I2C_2_WIRE(uint8_t options = U8G_I2C_OPT_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_sh1106_128x64_2x_i2c_2_wire, options)
|
|
|
|
{ }
|
2017-11-03 02:57:08 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
extern u8g_dev_t u8g_dev_ssd1306_128x64_2x_i2c_2_wire;
|
2018-11-13 08:47:45 +01:00
|
|
|
|
2017-11-03 02:57:08 +01:00
|
|
|
class U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE : public U8GLIB {
|
2018-11-13 08:47:45 +01:00
|
|
|
public:
|
|
|
|
U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE(uint8_t options = U8G_I2C_OPT_NONE)
|
|
|
|
: U8GLIB(&u8g_dev_ssd1306_128x64_2x_i2c_2_wire, options)
|
|
|
|
{ }
|
2017-11-03 02:57:08 +01:00
|
|
|
};
|