dcmi_mcu_get_board_info接口原型
函数原型
- NPU 20.0.0版本:
int dcmi_mcu_get_board_info(int card_id, struct dsmi_board_info_stru * pboard_info)
- NPU 20.0.0以上及NPU 20.1.X及以上系列版本:
int dcmi_mcu_get_board_info(int card_id, struct dcmi_board_info_stru * pboard_info)
功能说明
获取Atlas 300I 推理卡信息:包括board id,pcb id,bom id等信息。
参数说明
- NPU 20.0.0版本:
参数名
输入/输出
类型
描述
card_id
输入
int
指定Atlas 300I 推理卡的编号,当前实际支持的编号通过dcmi_get_card_num_list接口原型获取。
pboard_info
输出
dsmi_board_info_stru *
struct dsmi_board_info_stru {
unsigned int board_id;
unsigned int pcb_id;
unsigned int bom_id;
unsigned int slot_id;
};
- NPU 20.0.0以上及NPU 20.1.X及以上系列版本:
参数名
输入/输出
类型
描述
card_id
输入
int
指定Atlas 300I 推理卡的编号,当前实际支持的编号通过dcmi_get_card_num_list接口原型获取。
pboard_info
输出
dcmi_board_info_stru *
struct dcmi_board_info_stru {
unsigned int board_id;
unsigned int pcb_id;
unsigned int bom_id;
unsigned int position_id;
};
返回值
类型 |
描述 |
---|---|
int |
处理结果:
|
异常处理
无。
约束说明
该接口仅适用NPU 20.X.X及以上系列版本。
调用示例
- NPU 20.0.0版本:
…
int ret = 0;
int card_id = 0x56;
struct dsmi_board_info_stru board_info = {0};
ret = dcmi_mcu_get_board_info(card_id, &board_info);
if(ret != 0) {
//todo:记录日志
return ret;
}
…
- NPU 20.0.0以上及NPU 20.1.X及以上系列版本:
…
int ret = 0;
int card_id = 0x56;
struct dcmi_board_info_stru board_info = {0};
ret = dcmi_mcu_get_board_info(card_id, &board_info);
if(ret != 0) {
//todo:记录日志
return ret;
}
…