From c20e234d43cb0781e4606cbc6a70fd2ca279b54a Mon Sep 17 00:00:00 2001 From: Neil McKechnie Date: Sun, 21 Feb 2021 11:52:59 +0000 Subject: [PATCH] Remove unused initialisation sequences for tiny oled screens --- SSD1306init.h | 60 --------------------------------------------------- 1 file changed, 60 deletions(-) diff --git a/SSD1306init.h b/SSD1306init.h index e40a341..fb99deb 100644 --- a/SSD1306init.h +++ b/SSD1306init.h @@ -114,66 +114,6 @@ struct DevType { const uint8_t colOffset; }; //------------------------------------------------------------------------------ -/** Initialization commands for a 64x48 Micro OLED display (by r7) */ -static const uint8_t MEM_TYPE MicroOLED64x48init[] = { - // Init sequence for 64x48 Micro OLED module - SSD1306_DISPLAYOFF, - SSD1306_SETDISPLAYCLOCKDIV, 0x80, // the suggested ratio 0x80 - SSD1306_SETMULTIPLEX, 0x2F, // - SSD1306_SETDISPLAYOFFSET, 0x0, // no offset - SSD1306_SETSTARTLINE | 0x0, // line #0 - SSD1306_CHARGEPUMP, 0x14, // internal vcc - SSD1306_NORMALDISPLAY, - SSD1306_DISPLAYALLON_RESUME, - SSD1306_SEGREMAP | 0x1, // column 127 mapped to SEG0 - SSD1306_COMSCANDEC, // column scan direction reversed - SSD1306_SETCOMPINS, 0x12, // 0x12 if height > 32 else 0x02 - SSD1306_SETCONTRAST, 0x7F, // contrast level 127 - SSD1306_SETPRECHARGE, 0xF1, // pre-charge period (1, 15) - SSD1306_SETVCOMDETECT, 0x40, // vcomh regulator level - SSD1306_DISPLAYON -}; -/** Initialize a 64x48 Micro OLED display. */ -static const DevType MEM_TYPE MicroOLED64x48 = { - MicroOLED64x48init, - sizeof(MicroOLED64x48init), - 64, - 48, - 32 -}; -//------------------------------------------------------------------------------ -// this section is based on -// https://github.com/olikraus/u8g2/blob/master/csrc/u8x8_d_ssd1306_96x16.c -/** Initialization commands for a 96x16 SSD1306 oled display. */ -static const uint8_t MEM_TYPE SSD1306_96x16init[] = { - // Init sequence for Generic 96x16 OLED module - SSD1306_DISPLAYOFF, - SSD1306_SETDISPLAYCLOCKDIV, 0x80, // clock divide ratio and osc frequency - SSD1306_SETMULTIPLEX, 0x0F, // multiplex ratio - SSD1306_SETDISPLAYOFFSET, 0x0, // display offset zero - SSD1306_SETSTARTLINE | 0x0, // set display start line to 0 - SSD1306_CHARGEPUMP, 0x14, // charge pump setting enable - SSD1306_MEMORYMODE, 0x00, // page addressing mode - SSD1306_SEGREMAP | 0xA1, // segment remap - SSD1306_COMSCANDEC, // scan dir reverse - SSD1306_SETCOMPINS, 0x02, // com pin HW config - SSD1306_SETCONTRAST, 0xAF, // set contrast level 0xaf - SSD1306_SETPRECHARGE, 0xF1, // pre-charge period 0x0f1 - SSD1306_SETVCOMDETECT, 0x20, // vcomh deselect level - SSD1306_DEACTIVATE_SCROLL, // Deactivate scroll - SSD1306_DISPLAYALLON_RESUME, - SSD1306_NORMALDISPLAY, - SSD1306_DISPLAYON -}; -/** Initialize a 96x16 SSD1306 oled display. */ -static const DevType MEM_TYPE SSD1306_96x16 = { - SSD1306_96x16init, - sizeof(SSD1306_96x16init), - 96, - 16, - 0 -}; -//------------------------------------------------------------------------------ // this section is based on https://github.com/adafruit/Adafruit_SSD1306 /** Initialization commands for a 128x32 SSD1306 oled display. */ static const uint8_t MEM_TYPE Adafruit128x32init[] = {