Removed SPI OLED support

This commit is contained in:
rljonesau 2018-12-07 06:53:45 +11:00
parent 3c8f0cff25
commit 00e68f3cc3
2 changed files with 1 additions and 14 deletions

View file

@ -79,10 +79,3 @@
#define SUPPORT_OEM_CONTROLLER 1
///////////////////////////////////////////////////////////////////////////////
// SH1106 128x64 OLED support
//
// 0: I2C,
// 1: HW SPI
//
#define OLED_HW_SPI 0

View file

@ -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();