| // Copyright 2023 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.adcimpl; |
| using zx; |
| |
| @transport("Driver") |
| closed protocol Device { |
| /// Get adc resolution in number of bits. |
| strict GetResolution() -> (struct { |
| resolution uint8; |
| }) error zx.Status; |
| |
| /// Get sample - raw count from adc - of the ADC channel indicated by |
| /// channel_id. |
| strict GetSample(struct { |
| channel_id uint32; |
| }) -> (struct { |
| value uint32; |
| }) error zx.Status; |
| }; |
| |
| service Service { |
| device client_end:Device; |
| }; |