SPI.openAdvanced2 constructor

SPI.openAdvanced2(
  1. int bus,
  2. int chip,
  3. String path,
  4. SPImode mode,
  5. int maxSpeed,
  6. BitOrder bitOrder,
  7. int bitsPerWord,
  8. int extraFlags,
)

Opens the SPI device at the specified path, with the specified SPI mode, maxSpeed in hertz, bitOrder, bitsPerWord, and extraFlags. This open function is the same as SPI.openAdvanced, except that extra_flags can be 32-bits.

SPI mode can be 0, 1, 2, or 3. bitOrder can be BitOrder.msbFirst or BitOrder.msbLast, bitsPerWord specifies the transfer word size. extraFlags specified additional flags bitwise-ORed with the SPI mode.

Implementation

SPI.openAdvanced2(this.bus, this.chip, this.path, this.mode, this.maxSpeed,
    this.bitOrder, this.bitsPerWord, this.extraFlags) {
  _checkSPI(bus, chip);
  _spiHandle = _spiOpenAdvanced2(
      path, mode, maxSpeed, bitOrder, bitsPerWord, extraFlags);
}