function SSD1606(config) {
  if (config.displayType === 'GDE021A1') {
      this.display = C.GDE021A1;
  } else {
      if(config.display) {
        this.display = config.display;
      } else {
        return new Error('Unknown display type "' + config.displayType + '"" and no display configuration provided!');
      }
  }
  this.spi        = config.spi;
  this.bs1Pin     = config.bs1Pin;
  this.cs1Pin     = config.cs1Pin;
  this.dcPin      = config.dcPin;
  this.busyPin    = config.busyPin;
  this.resetPin   = config.resetPin;
  this.powerPin   = config.powerPin;
  this.g          = this.grfx();
  if (config.clearScreenTimeOut) {
    this.csbTimeOut = config.clearScreenTimeOut;
  } else {
    this.csbTimeOut = 100;
  }
  if (config.clearScreenTimeOut) {
    this.hwResetTimeOut = config.hardwareResetTimeOut;
  } else {
    this.hwResetTimeOut = 100;
  }
}
/**
 * Represents an SSD1606 Display Driver with Controller.
 * All functions are based on spefication version 1.1 from 10/2011.
 * Informations:
 * <ul>
 * <li>The display controller provides up to 180/128/4=5580 bytes of display buffer RAM.</li>
 * <li>Works only with SPI 4-wire mode with using a D/C (data/command) pin.</li>
 * <li>If you provide the BS1 pin the module will handle the correct SPI mode setting.</li>
 * <li>For some future-proof you can set up the clearScreenTimeOut and hardwareResetTimeOut.</li>
 * </ul>
 * @constructor
 * @param {config} - configuration with displayType, SPI and additional pins.
 */
Represents an SSD1606 Display Driver with Controller.
All functions are based on spefication version 1.1 from 10/2011.
Informations:

The display controller provides up to 180/128/4=5580 bytes of display buffer RAM.
Works only with SPI 4-wire mode with using a D/C (data/command) pin.
If you provide the BS1 pin the module will handle the correct SPI mode setting.
For some future-proof you can set up the clearScreenTimeOut and hardwareResetTimeOut.

@constructor
@param {config} - configuration with displayType, SPI and additional pins.
Represents an SSD1606 Display Driver with Controller . All functions are based on spefication version 1 . 1 from 10 / 2011 . Informations : The display controller provides up to 180 / 128 / 4 = 5580 bytes of display buffer RAM . Works only with SPI 4 - wire mode with using a D / C ( data / command ) pin . If you provide the BS1 pin the module will handle the correct SPI mode setting . For some future - proof you can set up the clearScreenTimeOut and hardwareResetTimeOut . @constructor @param { config } - configuration with displayType SPI and additional pins .
function SSD1606(config) {
  if (config.displayType === 'GDE021A1') {
      this.display = C.GDE021A1;
  } else {
      if(config.display) {
        this.display = config.display;
      } else {
        return new Error('Unknown display type "' + config.displayType + '"" and no display configuration provided!');
      }
  }
  this.spi        = config.spi;
  this.bs1Pin     = config.bs1Pin;
  this.cs1Pin     = config.cs1Pin;
  this.dcPin      = config.dcPin;
  this.busyPin    = config.busyPin;
  this.resetPin   = config.resetPin;
  this.powerPin   = config.powerPin;
  this.g          = this.grfx();
  if (config.clearScreenTimeOut) {
    this.csbTimeOut = config.clearScreenTimeOut;
  } else {
    this.csbTimeOut = 100;
  }
  if (config.clearScreenTimeOut) {
    this.hwResetTimeOut = config.hardwareResetTimeOut;
  } else {
    this.hwResetTimeOut = 100;
  }
}
function SSD1606 ( config ) { if ( config . displayType === 'GDE021A1' ) { this . display = C . GDE021A1 ; } else { if ( config . display ) { this . display = config . display ; } else { return new Error ( 'Unknown display type "' + config . displayType + '"" and no display configuration provided!' ) ; } } this . spi = config . spi ; this . bs1Pin = config . bs1Pin ; this . cs1Pin = config . cs1Pin ; this . dcPin = config . dcPin ; this . busyPin = config . busyPin ; this . resetPin = config . resetPin ; this . powerPin = config . powerPin ; this . g = this . grfx ( ) ; if ( config . clearScreenTimeOut ) { this . csbTimeOut = config . clearScreenTimeOut ; } else { this . csbTimeOut = 100 ; } if ( config . clearScreenTimeOut ) { this . hwResetTimeOut = config . hardwareResetTimeOut ; } else { this . hwResetTimeOut = 100 ; } }
Represents an SSD1606 Display Driver with Controller.
Represents an SSD1606 Display Driver with Controller .