nbitsFromTransferMode method

int nbitsFromTransferMode(
  1. SpiTransferMode? mode
)

Implementation

int nbitsFromTransferMode(SpiTransferMode? mode) {
  switch (mode) {
    case SpiTransferMode.single:
      return 1;
    case SpiTransferMode.dual:
      return 2;
    case SpiTransferMode.quad:
      return 4;
    default:
      throw ArgumentError.notNull("mode");
  }
}