From 00e68f3cc3514bc8b90259c46b31ced26d894756 Mon Sep 17 00:00:00 2001 From: rljonesau Date: Fri, 7 Dec 2018 06:53:45 +1100 Subject: [PATCH] Removed SPI OLED support --- Arduino/BTCDieselHeater/BTCConfig.h | 7 ------- Arduino/BTCDieselHeater/ScreenManager.cpp | 8 +------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/Arduino/BTCDieselHeater/BTCConfig.h b/Arduino/BTCDieselHeater/BTCConfig.h index b8f2603..e1a800b 100644 --- a/Arduino/BTCDieselHeater/BTCConfig.h +++ b/Arduino/BTCDieselHeater/BTCConfig.h @@ -79,10 +79,3 @@ #define SUPPORT_OEM_CONTROLLER 1 -/////////////////////////////////////////////////////////////////////////////// -// SH1106 128x64 OLED support -// -// 0: I2C, -// 1: HW SPI -// -#define OLED_HW_SPI 0 diff --git a/Arduino/BTCDieselHeater/ScreenManager.cpp b/Arduino/BTCDieselHeater/ScreenManager.cpp index d14bc9a..8dc3fa7 100644 --- a/Arduino/BTCDieselHeater/ScreenManager.cpp +++ b/Arduino/BTCDieselHeater/ScreenManager.cpp @@ -129,17 +129,11 @@ void CScreenManager::init() { - // 128 x 64 OLED support (Hardware SPI) + // 128 x 64 OLED support (I2C) // SH1106_SWITCHCAPVCC = generate display voltage from 3.3V internally -#if OLED_HW_SPI == 1 - SPI.setFrequency(8000000); - _pDisplay = new C128x64_OLED(OLED_DC_pin, -1, OLED_CS_pin); - _pDisplay->begin(SH1106_SWITCHCAPVCC, 0, false); -#else _pDisplay = new C128x64_OLED(OLED_SDA_pin, OLED_SCL_pin); _pDisplay->begin(SH1106_SWITCHCAPVCC); Wire.begin(OLED_SDA_pin, OLED_SCL_pin, 800000); // speed up I2C from the default crappy 100kHz set via the adafruit begin! -#endif // replace adafruit splash screen _pDisplay->clearDisplay();