Altera_Forum
Honored Contributor
22 years agoalt_dma_txchan_send status
I am getting an error from alt_dma_txchan_send. The status returned is -22. Below is the code. I lifted this code from this forum http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
alt_dma_txchan_open is successful, but the call to alt_dma_txchan_send returns a -22. Any help is appreciated. thanx alt_32 flag; alt_dma_txchan txchan; if((txchan=alt_dma_txchan_open(dma_name))==NULL) { printf("\n Failed to open transmit channel(range-to-1)!\n"); //exit(1); } alt_dma_txchan_ioctl(txchan,transfer_mode,NULL); alt_dma_txchan_ioctl(txchan,ALT_DMA_RX_STREAM_ON,start_addr); if((flag=alt_dma_txchan_send(txchan,desti_addr,transfer_count,transmit_done,NULL ))<0) { printf("\n Failed to post transmit request(range-to-1)!\n"); //exit(1); } while(!transmitdone); transmitdone=0; alt_dma_txchan_ioctl(txchan,ALT_DMA_RX_STREAM_OFF,NULL); //alt_dma_txchan_close(txchan); }