blob: 965f7493675a6439d4dcb91f3fce8d7faaa24e95 [file] [log] [blame]
// 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.
library examples.i2c.temperature;
using zx;
/// Protocol for interacting with I2cTemperature.
protocol Device {
/// Sends a command to measure the temperature, then read
/// the value.
ReadTemperature() -> (struct {
temperature float32;
}) error zx.status;
/// Sends a command to reset the sensor.
ResetSensor() -> (struct {}) error zx.status;
};
/// The Service enables the driver framework to offer the Device protocol to
/// other components.
service Service {
device client_end:Device;
};