kernel/hil/
dac.rs

1// Licensed under the Apache License, Version 2.0 or the MIT License.
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3// Copyright Tock Contributors 2022.
4
5//! Interface for digital to analog converters.
6
7use crate::ErrorCode;
8
9/// Simple interface for using the DAC.
10pub trait DacChannel {
11    /// Set the DAC output value.
12    fn set_value(&self, value: usize) -> Result<(), ErrorCode>;
13}