Alt_avalon_sgdma_do_async_transfer(), Alt_avalon_sgdma_do_sync_transfer(), Alt_avalon_sgdma_do_async_transfer() -18 – Altera Embedded Peripherals IP User Manual
Page 209: Alt_avalon_sgdma_do_sync_transfer() -18
![background image](https://www.manualsdir.com/files/763637/content/doc209.png)
Name
Description
alt_avalon_sgdma_register_callback()
Associates a user-specific callback routine with the
SG-DMA interrupt handler.
alt_avalon_sgdma_start()
Starts the DMA engine. This is not required when
alt_avalon_sgdma_do_async_transfer()
and
alt_avalon_sgdma_do_sync_transfer()
are
used
.
alt_avalon_sgdma_stop()
Stops the DMA engine. This is not required when
alt_avalon_sgdma_do_async_transfer()
and
alt_avalon_sgdma_do_sync_transfer()
are
used
.
alt_avalon_sgdma_open()
Returns a pointer to the SG-DMA controller with
the given name.
alt_avalon_sgdma_do_async_transfer()
Prototype:
int alt_avalon_do_async_transfer(alt_sgdma_dev *dev, alt_sgdma_descriptor
*desc)
Thread-safe:
No.
Available from
ISR:
Yes.
Include:
<altera_avalon_sgdma.h>, <altera_avalon_sgdma_descriptor.h>, <altera_
avalon_sgdma_regs.h>
Parameters:
*dev—a pointer to an SG-DMA device structure.
*desc—a pointer to a single, constructed descriptor. The descriptor must have its
“next” descriptor field initialized either to a non-ready descriptor, or to the next
descriptor in the chain.
Returns:
Returns 0 success. Other return codes are defined in errno.h.
Description:
Set up and begin a non-blocking transfer of one or more descriptors or a
descriptor chain. If the SG-DMA controller is busy at the time of this call, the
routine immediately returns EBUSY; the application can then decide how to
proceed without being blocked. If a callback routine has been previously
registered with this particular SG-DMA controller, the transfer is set up to issue
an interrupt on error, EOP, or chain completion. Otherwise, no interrupt is
registered and the application developer must check for and handle errors and
completion. The run bit is cleared before the begining of the transfer and is set to
1 to restart a new descriptor chain.
alt_avalon_sgdma_do_sync_transfer()
Prototype:
alt_u8 alt_avalon_sgdma_do_sync_transfer(alt_sgdma_dev *dev, alt_sgdma_
descriptor *desc)
21-18
alt_avalon_sgdma_do_async_transfer()
UG-01085
2014.24.07
Altera Corporation
Scatter-Gather DMA Controller Core