blob: 870bccfba026b63e8334f4ca49cb98b6dffc17ca [file] [log] [blame]
// 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;
};
closed protocol Pwm {
strict GetConfig() -> (struct {
config PwmConfig;
}) error zx.Status;
strict SetConfig(struct {
config PwmConfig;
}) -> () error zx.Status;
strict Enable() -> () error zx.Status;
strict Disable() -> () error zx.Status;
};
service Service {
pwm client_end:Pwm;
};