maxSpeed property

int get maxSpeed

Implementation

int get maxSpeed {
  assert(isOpen);

  _maxSpeedHz ??= SpidevPlatformInterface.instance.getMaxSpeed(_fd);
  return _maxSpeedHz!;
}
set maxSpeed (int hz)

Implementation

void set maxSpeed(int hz) {
  ArgumentError.checkNotNull(hz, "hz");
  assert(isOpen);

  if (_maxSpeedHz != hz) {
    SpidevPlatformInterface.instance.setMaxSpeed(_fd, hz);
    _maxSpeedHz = hz;
  }
}