InterfaceDescriptor constructor

InterfaceDescriptor({
  1. required int interfaceNumber,
  2. required int alternateSetting,
  3. required int interfaceClass,
  4. required int interfaceSubclass,
  5. required int interfaceProtocol,
  6. String? description,
  7. required List<EndpointDescriptor> endpoints,
  8. required ByteBuffer extraData,
})

Implementation

InterfaceDescriptor({
  /// The interface number.
  required int interfaceNumber,

  /// The interface alternate setting number (defaults to `0</code).
  required int alternateSetting,

  /// The USB interface class.
  required int interfaceClass,

  /// The USB interface sub-class.
  required int interfaceSubclass,

  /// The USB interface protocol.
  required int interfaceProtocol,

  /// Description of the interface.
  String? description,

  /// Available endpoints.
  required List<EndpointDescriptor> endpoints,

  /// Extra descriptor data associated with this interface.
  required ByteBuffer extraData,
}) : _wrapped = $js.InterfaceDescriptor(
        interfaceNumber: interfaceNumber,
        alternateSetting: alternateSetting,
        interfaceClass: interfaceClass,
        interfaceSubclass: interfaceSubclass,
        interfaceProtocol: interfaceProtocol,
        description: description,
        endpoints: endpoints.toJSArray((e) => e.toJS),
        extra_data: extraData.toJS,
      );