GTS AXI Multichannel DMA IP for PCI Express* User Guide
B.1.6.5. ifc_qdma_channel_get
| API | API Description | Input Parameters | Return Values | 
|---|---|---|---|
| int ifc_qdma_channel_get (struct ifc_qdma_device * qdev , struct ifc_qdma_channel ** chnl , int chno ) | Before submitting the DMA transactions, application is responsible for acquiring the channel and passing the context on further interactions with the framework. This API performs the following: 
 The last parameter in this API is the channel number. If you pass this parameter as -1, it returns the available free channel. Otherwise, it allocates the available free channel. | qdev: QDMA device chnl: Pointer to update channel context chno: Channel number if user wants a specific channel. -1 if no specific channel. | 0 : on success and populates channel context. -1 : No channel is ready to be used. Channel context is returned as NULL. -2 : Requested channel is already allocated, but valid channel context is returned. Application may use this channel context. |