blob: 66f8437732d0120fc727f99d894b63c24c4adb88 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.hardware.midi;
using zx;
/// Describes what type of MIDI device an implementation of Device represents
enum Direction : uint8 {
/// A MIDI source
/// A MIDI sink
SINK = 2;
protocol Device {
/// Get direction of the MIDI device
GetDirection() -> (Direction direction);
/// Reads MIDI data from a MIDI source
Read(uint64 count) -> (bytes data) error zx.status;
/// Reads MIDI data to a MIDI sink
Write(bytes data) -> (uint64 actual) error zx.status;