删除DMA设备 - DmaRemoveDevice
函数简介
删除已添加的 DMA 设备,释放设备资源。(高级版功能,普通版无法使用)
接口名称
DmaRemoveDevice
DLL调用
int32_t OLA_CALL_TYPE DmaRemoveDevice(int64_t instance, int64_t deviceId);
参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| instance | 长整数型 | OLAPlug对象的指针,由 CreateCOLAPlugInterFace 接口生成。 |
| deviceId | 长整数型 | 设备ID,由 DmaAddDevice 或 DmaAddDeviceEx 返回 |
示例
int64_t deviceId = DmaAddDevice(instance, 1);
// 使用设备进行操作...
int32_t result = DmaRemoveDevice(instance, deviceId);
if (result == 1) {
printf("设备删除成功\n");
}
返回值
整数型:1 成功,0 失败。
