| // Copyright 2022 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. |
| |
| // [START example_snippet] |
| library fuchsia.examples.qemuedu; |
| |
| using zx; |
| |
| /// The Device protocol provides access to the functions of the QEMU edu hardware. |
| protocol Device { |
| /// Computes the factorial of 'input' using the edu device and returns the |
| /// result. |
| ComputeFactorial(struct { |
| input uint32; |
| }) -> (struct { |
| output uint32; |
| }) error zx.status; |
| |
| /// Performs a liveness check and return true if the device passes. |
| LivenessCheck() -> (struct { |
| result bool; |
| }) error zx.status; |
| }; |
| |
| /// The Service enables the driver framework to offer the Device protocol to |
| /// other components. |
| service Service { |
| device client_end:Device; |
| }; |
| // [END example_snippet] |