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