blob: 5dc6ef2ad456ce78bed7cf06b8542fd837652c8e [file] [log] [blame] [edit]
// 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 zx;
@transport("Syscall")
closed protocol Ioports {
/// ## Summary
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Declaration
///
/// ```c
/// #include <zircon/syscalls.h>
///
/// zx_status_t zx_ioports_request(zx_handle_t resource,
/// uint16_t io_addr,
/// uint32_t len);
/// ```
///
/// ## Description
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Rights
///
/// *resource* must have resource kind `ZX_RSRC_KIND_IOPORT`.
///
/// ## Return value
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Errors
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## See also
///
/// TODO(https://fxbug.dev/42108078)
strict Request(resource struct {
resource Handle:RESOURCE;
io_addr uint16;
len uint32;
}) -> () error Status;
/// ## Summary
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Declaration
///
/// ```c
/// #include <zircon/syscalls.h>
///
/// zx_status_t zx_ioports_release(zx_handle_t resource,
/// uint16_t io_addr,
/// uint32_t len);
/// ```
///
/// ## Description
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Rights
///
/// *resource* must have resource kind `ZX_RSRC_KIND_IOPORT`.
///
/// ## Return value
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## Errors
///
/// TODO(https://fxbug.dev/42108078)
///
/// ## See also
///
/// TODO(https://fxbug.dev/42108078)
strict Release(resource struct {
resource Handle:RESOURCE;
io_addr uint16;
len uint32;
}) -> () error Status;
};