Plx使用手册学习----10 PlxPci_CommonBufferMap

Syntax:

PLX_STATUS
PlxPci_DmaSetProperties(
PLX_DEVICE_OBJECT *pDevice,
U8 channel,
PLX_DMA_PROP *pDmaProp
);

PLX Chip Support:
9054, 9056, 9080, 9656, 8311, & 8000 DMA
Description:

为DMA通道更新DMA属性
Updates the DMA properties for a DMA channel
Parameters:
pDevice
Pointer to an open device
channel
The DMA channel number to access
pDmaProp
Pointer to a structure containing the DMA properties
Return Codes:

CodeDescription
ApiSuccessThe function returned successfully
ApiNullParamOne or more parameters is NULL
ApiInvalidDeviceInfoThe device object is not valid
ApiPowerDownThe PLX device is in a power state that is lower than required for this function
ApiDmaChannelInvalidThe DMA channel is not supported by the PLX chip
ApiDmaChannelUnavailableThe DMA channel was not previously opened by the caller
ApiDeviceInUseThe DMA channel is open but owned by another calling thread or process

Notes:
A DMA channel must first be opened by the caller with PlxPci_DmaChannelOpen before this function can be
called.

Usage:

PLX_DMA_PROP DmaProp;
// Fill in current DMA properties
PlxPci_DmaGetProperties(
pDevice,
0, // DMA channel 0
&DmaProp
);
// Modify desired properties based on chip type
if ((PlxChip & 0xFF00) == 0x8600) || (PlxChip & 0xFF00) == 0x8700))
{
// Use relaxed ordering for data read requests
DmaProp.RelOrderDataReadReq = 1;
// Support 128B read request TLPs
DmaProp.MaxSrcXferSize = PLX_DMA_MAX_SRC_TSIZE_128B;
}
else
{
// Enable READY# input and burst of 4 DWORDS
DmaProp.ReadyInput = 1;
DmaProp.Burst = 1;
DmaProp.BurstInfinite = 0;
}
// Update DMA with new properties
PlxPci_DmaSetProperties(
pDevice,
0, // DMA channel 0
&DmaProp
);

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值