Specifications
• alt_dma_rxchan_prepare() on page 14-16
• alt_dma_rxchan_reg() on page 14-17
• alt_dma_txchan_close() on page 14-18
• alt_dma_txchan_ioctl() on page 14-19
• alt_dma_txchan_open() on page 14-20
• alt_dma_txchan_reg() on page 14-21
• alt_dma_txchan_send() on page 14-27
• alt_dma_txchan_space() on page 14-26
alt_dev_reg()
Prototype
int alt_dev_reg(alt_dev* dev)
Commonly Called By
Device drivers
Thread-safe
No.
Available from ISR
No.
Include
<sys/alt_dev.h>
Description
The alt_dev_reg() function registers a device with the system. After it is registered, you can access a
device using the standard I/O functions.
For more information, refer to the "Developing Programs Using the Hardware Abstraction Layer" section.
The system behavior is undefined in the event that a device is registered with a name that conflicts with an
existing device or file system.
The alt_dev_reg() function is not thread-safe in the sense that no other thread can use the device list at
the time that alt_dev_reg() is called. Call alt_dev_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.
Related Information
• Developing Programs Using the Hardware Abstraction Layer on page 6-1
14-14
alt_dev_reg()
NII5V2
2015.05.14
Altera Corporation
HAL API Reference
Send Feedback