Opens a channel for asynchronous I/O on the host.
#include txcpi.h
TX_HANDLE cpia_open ( void *chkey, U16 board, U16 channel, void ((*rxnotify)(TX_HANDLE handle, void *chkey)), void ((*txnotify)(TX_HANDLE handle, void*chkey, CPIPKT *buffer, void*user_tx_key, CPI_ERR_TYPE, ccode)))
Argument |
Description |
chkey |
User-controlled key passed back on all callback functions. |
board |
Board number from which to receive packets. |
channel |
DPR channel from which to receive packets. |
rxnotify |
Pointer to a receive notification callback function. |
txnotify |
Pointer to a transmit notification callback function. |
Return value |
Description |
CPI_INVALID_HANDLE |
Unable to open the channel. |
Use cpia_open to open a channel for aynchronous I/O. Use cpi_open to open a channel for synchronous I/O. Mixed mode I/O on a given channel is not possible, either with a single TX_HANDLE or multiple TX_HANDLEs. If successful, TX_HANDLE is returned.
A channel that was created using cpia_open has a limit of 16 writes from the application to the TX board at any given time. Use the cpix_open function to create a CPI channel supporting an extended number of in-progress IO requests.