gpioInputModes static method

MraaGpioInputMode gpioInputModes(
  1. int mode
)

Implementation

static MraaGpioInputMode gpioInputModes(int mode) {
  if (byCode.isEmpty) {
    for (final mode in MraaGpioInputMode.values) {
      byCode[mode.code] = mode;
    }
  }

  final ret =
      byCode.containsKey(mode) ? byCode[mode] : MraaGpioInputMode.unknown;
  return ret!;
}