Nios II Classic Software Developer’s Handbook

ID 683282
Date 5/14/2015
Public
Document Table of Contents

14.1.29. alt_dma_txchan_send()

Prototype

int alt_dma_txchan_send (alt_dma_txchan dma,

const void* from,

alt_u32 length,

alt_txchan_done* done,

void* handle)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

See description.

Available from ISR

See description.

Include

<sys/alt_dma.h>

Description

The alt_dma_txchan_send() function posts a transmit request to a DMA transmit channel. The input arguments are: dma, the channel to use; from, a pointer to the start of the data to send; length, the length of the data to send in bytes; done, a callback function that is called after the data is sent; and handle, an opaque value passed to done.

Whether this function is thread-safe, or can be called from an ISR, depends on the underlying device driver. In general it safest to assume that it is not thread-safe.

Return

The return value is negative if the request cannot be posted, and zero otherwise.