Function dma_add_descriptor()

Add a DMA transfer descriptor to a DMA resource.

enum status_code dma_add_descriptor(
		struct dma_resource * resource,
		DmacDescriptor * descriptor)

This function will add a DMA transfer descriptor to a DMA resource. If there was a transfer descriptor already allocated to the DMA resource, the descriptor will be linked to the next descriptor address.

Table 1. Parameters
Data direction Parameter name Description

[in]

resource

Pointer to the DMA resource

[in]

descriptor

Pointer to the transfer descriptor

Table 2. Return Values
Return value Description

STATUS_OK

The descriptor is added to the DMA resource

STATUS_BUSY

The DMA resource was busy and the descriptor is not added