2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
2.2 BSP Rel. 1.0 for PPMC-275 Programmer's Guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
List of APIs API Call Reference<br />
the descriptor passed to the sdmaChanReceive caller containing<br />
received in<strong>for</strong>mation from the MPSC channel. In Tx process, this<br />
will be the descriptor that will be assigned with the user packet<br />
info and transmitted.<br />
'used' This index points to the descriptor that need to restore its<br />
resources. For example in Rx process, using sdmaRxReturnBuff<br />
will attach the buffer returned in packet info to the descriptor<br />
pointed by 'used'. In Tx process, using sdmaTxReturnDesc will<br />
merely return the user packet info with the command status of the<br />
transmitted buffer pointed by the 'used' index. Nevertheless, it is<br />
essential to use this routine to update the 'used' index.<br />
'first' This index supports Tx Scatter-Gather. It points to the first descriptor<br />
of a packet assembled of multiple buffers. For example when in<br />
middle of such packet we have a Tx resource error the 'curr' index<br />
get the value of 'first' to indicate that the ring returned to its state<br />
be<strong>for</strong>e trying to transmit this packet.<br />
Receive operation The sdmaChanReceive API return the caller the packet in<strong>for</strong>mation<br />
struct pointer describing the current SDMA descriptor containing<br />
the received in<strong>for</strong>mation. It is the user responsibility to<br />
return this resource back to the Rx descriptor ring to enable the<br />
reuse of this source. Return Rx resource is done using the<br />
sdmaRxReturnBuff API.<br />
Transmit operation The sdmaChanSend API supports Scatter-Gather which enables to<br />
send a packet spanned over multiple buffers. This means that <strong>for</strong><br />
each packet info structure given by the user and put into the Tx<br />
descriptors ring, will be transmitted only if the 'LAST' bit will be<br />
set in the packet info command status field. This API also considers<br />
the protocol used and its restriction regarding buffer alignments<br />
and sizes. The user must return a Tx resource after ensuring<br />
the buffer has been transmitted to enable the Tx ring indexes to<br />
update.<br />
Software Modules<br />
This driver is implemented in:<br />
• sdma.c<br />
• sdma.h<br />
5 - 46 VxWorks 5.5/Tornado <strong>2.2</strong> <strong>BSP</strong> <strong>Rel</strong>. <strong>1.0</strong> <strong>for</strong> <strong>PPMC</strong>-<strong>275</strong>