Nios® V Processor Software Developer Handbook

ID 743810
Date 2/14/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.1.24. alt_dma_txchan_reg()

Prototype

int alt_dma_txchan_reg (alt_dma_txchan_dev* dev)

Commonly Called By

C/C++ programs

Device drivers

Thread-safe

No.

Available from ISR

No.

Include

<sys/alt_dma_dev.h>

Description

The alt_dma_txchan_reg() function registers a DMA transmit channel with the system.

After it is registered, a device can be accessed using the functions described in “Using DMA Devices” in the "Developing Programs Using the Hardware Abstraction Layer" section.

System behavior is undefined in the event that a channel is registered with a name that conflicts with an existing channel.

The alt_dma_txchan_reg() function is not thread-safe if other threads are using the channel list at the time that alt_dma_txchan_reg() is called. Call alt_dma_txchan_reg() only in the following circumstances:

  • When running in single-threaded mode.
  • From a device initialization function called by alt_sys_init(). alt_sys_init() may only be called by the single-threaded C startup code.

Return

The return value is zero upon success. A negative return value indicates failure.