code: public void init() {
          turnOff();
          // initialization
          command(setDisplayClock((byte) 0, (byte) 8));
          command(setMultiplexRatio(size.height));
          command(setDisplayOffset(0));           // no offset
          command(setDisplayStartLine(0));        // line #0
          command(setMemoryAddressingMode(MemoryAddressingMode.HORIZONTAL));
          command(setHorizontalFlip(false));
          command(setVerticalFlip(false));
          if (vccState == VCC.EXTERNAL) {
              command(setChargePump(false));
          } else {
              command(setChargePump(true));
          }
          int contrast = 0;
          boolean sequentialPins = true;
          boolean leftRightPinsRemap = false;
          if (size == Size.SSD1306_128_32) {
              contrast = 0x8F;
          } else if (size == Size.SSD1306_128_64) {
              if (vccState == VCC.EXTERNAL) {
                  contrast = 0x9F;
              } else {
                  contrast = 0xCF;
              }
              sequentialPins = false;
          } else if (size == Size.SSD1306_96_16) {
              if (vccState == VCC.EXTERNAL) {
                  contrast = 0x10;
              } else {
                  contrast = 0xAF;
              }
          }
          command(setCOMPinsConfig(sequentialPins, leftRightPinsRemap));
          command(setContrast((byte) contrast));
          if (vccState == VCC.EXTERNAL) {
              command(setPrechargePeriod((byte) 2, (byte) 2));
          } else {
              command(setPrechargePeriod((byte) 1, (byte) 15));
          }
          command(setVcomhDeselectLevel((byte) 3));
          command(DISPLAY_RESUME);
          command(setDisplayInverse(false));
          stopScrolling();
          display(); // synchronize canvas with display's internal buffer
          turnOn();
      }
docs: Prepares the device to operation.