SPI constructor
Opens the SPI device at the path ("/dev/spidevbus.chip"), with the specified SPI mode, specified maxSpeed in hertz, and the defaults of MSB_FIRST bit order, and 8 bits per word.
SPI mode can be 0, 1, 2, or 3.
Implementation
SPI(this.bus, this.chip, this.mode, this.maxSpeed)
: bitOrder = BitOrder.msbFirst,
bitsPerWord = 8,
extraFlags = 0,
path = '/dev/spidev$bus.$chip' {
_checkSPI(bus, chip);
_spiHandle = _spiOpen(path, mode, maxSpeed);
}