openUBMC Chip Abstract Layer V0.1
载入中...
搜索中...
未找到
kcs.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 */
18#ifndef DRIVER_KCS_H
19#define DRIVER_KCS_H
20
21#include "driver.h"
22
23namespace DRIVER_KCS {
24using namespace bcal;
25
31struct KcsMsg {
32 uint8_t dst_lun : 2;
33 uint8_t dst_netfn : 6;
34 uint8_t cmd;
35 uint8_t data[1];
36};
37
42class Kcs : public IDriver {
43public:
52 virtual string_t read(int32_t index, uint32_t len, uint32_t timeout) = 0;
53
62 virtual int32_t write(int32_t index, const string_view_t &val, uint32_t timeout) = 0;
63
70 virtual void setatn(int32_t index, int32_t enable) = 0;
71};
72} // namespace
73#endif
KCS接口类
Definition kcs.h:42
virtual void setatn(int32_t index, int32_t enable)=0
设置 KCS 的 ATN 信号状态
virtual int32_t write(int32_t index, const string_view_t &val, uint32_t timeout)=0
向 KCS 总线写入数据
virtual string_t read(int32_t index, uint32_t len, uint32_t timeout)=0
读取 KCS 总线数据
BCAL层驱动公共接口
Definition driver.h:41
BCAL 驱动公共接口定义
KCS 消息结构体 参见IPMI规范
Definition kcs.h:31
uint8_t dst_netfn
Definition kcs.h:33
uint8_t cmd
Definition kcs.h:34
uint8_t dst_lun
Definition kcs.h:32