fromValue static method

libusb_endpoint_direction fromValue(
  1. int value
)

Implementation

static libusb_endpoint_direction fromValue(int value) => switch (value) {
      0 => LIBUSB_ENDPOINT_OUT,
      128 => LIBUSB_ENDPOINT_IN,
      _ => throw ArgumentError(
          "Unknown value for libusb_endpoint_direction: $value"),
    };