blob: a7590008ac3e3738429280ec862dafec030f29ab [file] [log] [blame] [edit]
// Copyright 2021 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.pwm;
using zx;
type PwmConfig = struct {
polarity bool;
period_ns uint32;
duty_cycle float32; // In the range [0.0, 100.0]
@mutable
@buffer
mode_config vector<uint8>:MAX;
};
protocol Pwm {
GetConfig() -> (struct {
config PwmConfig;
}) error zx.status;
SetConfig(struct {
config PwmConfig;
}) -> () error zx.status;
Enable() -> () error zx.status;
Disable() -> () error zx.status;
};