openUBMC Chip Abstract Layer V0.1
载入中...
搜索中...
未找到
pwm.h
浏览该文件的文档.
1/*
2 * Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
3 *
4 * this file licensed under the Mulan PSL v2.
5 * You can use this software according to the terms and conditions of the Mulan PSL v2.
6 * You may obtain a copy of Mulan PSL v2 at:
7 * http://license.coscl.org.cn/MulanPSL2
8 *
9 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
10 * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
11 * PURPOSE.
12 * See the Mulan PSL v2 for more details.
13 */
14
20#ifndef DRIVER_PWM_H
21#define DRIVER_PWM_H
22
23#include "driver.h"
24
25namespace DRIVER_PWM {
26using namespace bcal;
27
32class Pwm : public IDriver {
33public:
34
41 virtual uint32_t read(int32_t index) = 0;
42
50 virtual int32_t write(int32_t index, uint32_t ratio) = 0;
51
59 virtual void rst_hold(uint32_t rst_hold_en, uint32_t ratio) = 0;
60};
61} // namespace
62#endif
PWM接口
Definition pwm.h:32
virtual void rst_hold(uint32_t rst_hold_en, uint32_t ratio)=0
复位保持PWM输出
virtual int32_t write(int32_t index, uint32_t ratio)=0
设置PWM占空比
virtual uint32_t read(int32_t index)=0
读取PWM占空比
BCAL层驱动公共接口
Definition driver.h:41
BCAL 驱动公共接口定义