blob: 4bc79463abd59c8abf7598d589a06d5e6f37e7ef [file] [log] [blame]
// Copyright 2020 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.
@available(added=7)
library fuchsia.hardware.adc;
using zx;
@discoverable
closed protocol Device {
/// Get adc resolution in number of bits
strict GetResolution() -> (struct {
resolution uint8;
}) error zx.Status;
/// Get sample - raw count from adc
strict GetSample() -> (struct {
value uint32;
}) error zx.Status;
/// Get sample normalized to [0.0-1.0]
strict GetNormalizedSample() -> (struct {
value float32;
}) error zx.Status;
};
service Service {
device client_end:Device;
};