大家好、TI 人:
"PMBus_Read_STATUS_bit_MASK"的用途是什么? 此命令是 PMBus MFR_SPECIFIC 命令。 我认为它可能用于某些 GUI 调试器用途。 我想知道该命令的确切目的是什么。
有一些用于存储器调试的命令。 下面的函数处理其中一个命令。 我不明白为什么长度应该小于32字节? PMBus_buffer[1]中的值是什么 ?
uint8 PMBus_write_parm_info (空)
{
uint8 temp_index;
int16 temp_offset;
uint8 temp_count;
uint8 temp_size;
uint8 temp_length;
temp_index = PMBus_buffer[2];
temp_offset = PMBus_buffer[3]+(PMBus_buffer[4]<<8);
temp_count = PMBus_buffer[5];
temp_size = PMBus_buffer[6];
temp_length = temp_count * temp_size;
//---- 验证传入的参数---
//---- 验证数据---
//验证指定的基址是否有效
// 0 (RAM) 和1 (寄存器)对读取或写入有效。
// 2 (DFLASH)、3 (pflash_const)和4 (pflash_prog)为只读。
//如果尝试对它们进行写操作,它们将在 PMBus_write_parm_value()中标记。
if (temp_index > NUM_MEMORY_Segments) // unsigned。
{
返回 PMBus_INVALID_DATA; //错误:索引无效
}
//验证消息是否足够短以适合
if (temp_length > 32)
{
返回 PMBus_INVALID_DATA; //错误:长度大于 SAA 能力。
}
//验证大小是否为1、2或4字节
if ((temp_size!= 1)&&(temp_size!= 2)&&(temp_size!= 4))
{
返回 PMBus_INVALID_DATA; //错误:大小无效
}
期待您的回复
BR
Dana