首页 文章

如何在CAPL脚本中读取hex和mhx扩展名

提问于
浏览
0

我有ReadBinFile()//从bin文件中读取2048字节{

transferlength = fileGetBinaryBlock(buffer,2048,fileHandle); }

现在我想读取.hex和.mhx扩展文件我找不到内置函数在capl脚本中执行此操作的选项是什么 .

1 回答

  • 0
    dword openFileRead(char filename[], dword mode);
    

    此函数打开名为filename的文件以进行读访问 .

    如果mode = 0,则以ASCII模式打开文件;如果mode = 1,则以二进制模式打开文件 .

    To open hexfile
    dword HexFileHandle;
    
    HexFileHandle = openFileRead(HEX_File_Path, 0);
    

    返回值是必须用于读取操作的文件句柄 .

    如果发生错误,则返回值为0 .

相关问题