MAX7219.js
function(firstByte, secondByte, callback) {
    if (!this._spi) {
      throw "SPI device not initialized";
    }

    for (var i = 0; i < this._buffer.length; i += 2) {
      this._buffer[i] = MAX7219._Registers.NoOp;
      this._buffer[i + 1] = 0x00;
    }

    var offset = this._activeController * 2;
    this._buffer[offset] = firstByte;
    this._buffer[offset + 1] = secondByte;

    this._spi.write(this._buffer, callback);
  }
function(firstByte, secondByte, callback) {
    if (!this._spi) {
      throw "SPI device not initialized";
    }

    for (var i = 0; i < this._buffer.length; i += 2) {
      this._buffer[i] = MAX7219._Registers.NoOp;
      this._buffer[i + 1] = 0x00;
    }

    var offset = this._activeController * 2;
    this._buffer[offset] = firstByte;
    this._buffer[offset + 1] = secondByte;

    this._spi.write(this._buffer, callback);
  }
function ( firstByte , secondByte , callback ) { if ( ! this . _spi ) { throw "SPI device not initialized" ; } for ( var i = 0 ; i < this . _buffer . length ; i += 2 ) { this . _buffer [ i ] = MAX7219 . _Registers . NoOp ; this . _buffer [ i + 1 ] = 0x00 ; } var offset = this . _activeController * 2 ; this . _buffer [ offset ] = firstByte ; this . _buffer [ offset + 1 ] = secondByte ; this . _spi . write ( this . _buffer , callback ) ; }
Shifts two bytes to the SPI device.

@param number firstByte
The first byte, as a number.
@param number secondByte
The second byte, as a number.
@param function callback [optional]
Invoked once the write to the SPI device finishes.
Shifts two bytes to the SPI device .