Nios II Classic Software Developer’s Handbook

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

14.1.21. alt_dma_txchan_ioctl()

Prototype

int alt_dma_txchan_ioctl (alt_dma_txchan dma, 
 int req, 
 void* arg)

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_ioctl() function performs device specific I/O operations on the DMA transmit channel, dma. For example, some drivers support options to control the width of the transfer operations. The input argument, req, is an enumeration of the requested operation; arg is an additional argument for the request. The interpretation of arg is request dependent.

For more information, refer to the "Generic Requests DMA Might Support" table (Table 14–1 on page 14–11) for the generic requests a device might support.

Whether a call to alt_dma_txchan_ioctl() is thread-safe, or can be called from an ISR, is device dependent. In general it safest to assume that it is not thread-safe.

Do not call the alt_dma_txchan_ioctl() function while DMA transfers are pending, or unpredictable behavior could result.

Return

A negative return value indicates failure; otherwise the interpretation of the return value is request specific.