准备散列读地址 - DmaScatterPrepare
函数简介
为散列读准备一个内存地址和大小,可多次调用以准备多个地址。(高级版功能,普通版无法使用)
接口名称
DmaScatterPrepare
DLL调用
int32_t OLA_CALL_TYPE DmaScatterPrepare(int64_t instance, int64_t scatterHandle, int64_t address, int32_t size);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| scatterHandle | 长整数型 | 散列句柄,由 DmaScatterCreate 返回 |
| address | 长整数型 | 内存地址 |
| size | 整数型 | 读取大小(字节) |
示例
int32_t result1 = DmaScatterPrepare(instance, scatterHandle, 0x400000, 4);
int32_t result2 = DmaScatterPrepare(instance, scatterHandle, 0x400010, 8);
if (result1 == 1 && result2 == 1) {
DmaScatterExecute(instance, scatterHandle);
}
返回值
整数型:1 成功,0 失败。
