nios ii常用函数整理(nios ii commonly used function arrangement)

上传人:bao****ty 文档编号:117538338 上传时间:2019-12-05 格式:DOC 页数:24 大小:24.56KB
返回 下载 相关 举报
nios ii常用函数整理(nios ii commonly used function arrangement)_第1页
第1页 / 共24页
nios ii常用函数整理(nios ii commonly used function arrangement)_第2页
第2页 / 共24页
nios ii常用函数整理(nios ii commonly used function arrangement)_第3页
第3页 / 共24页
nios ii常用函数整理(nios ii commonly used function arrangement)_第4页
第4页 / 共24页
nios ii常用函数整理(nios ii commonly used function arrangement)_第5页
第5页 / 共24页
点击查看更多>>
资源描述

《nios ii常用函数整理(nios ii commonly used function arrangement)》由会员分享,可在线阅读,更多相关《nios ii常用函数整理(nios ii commonly used function arrangement)(24页珍藏版)》请在金锄头文库上搜索。

1、nios ii常用函数整理(Nios II commonly used function arrangement)NIOS II commonly used function arrangement2009-10-28 09:49:02|: Nios II | subscription name classificationIO operation functionPrototype of function: IORD (BASE, REGNUM)Input parameters: BASE base address register, REGNUM offset registerFuncti

2、on Description: from the base address for the BASE device reads the REGNUM offset register unit inside value. The register value within the scope of the address bus.Return value: -Prototype of function: IOWR (BASE, REGNUM, DATA)Input parameters: BASE base address register, REGNUM offset register, DA

3、TA data to be writtenFunction Description: to offset write data in the REGNUM register. The register value within the scope of the address bus.Return value: -Prototype of function: IORD_32DIRECT (BASE, OFFSET)Input parameters: BASE base address register, the register offset for OFFSETFunction Descri

4、ption: from the address position is directly read 32Bit BASE+OFFSET data in the registerReturn value: -Prototype of function: IORD_16DIRECT (BASE, OFFSET)Input parameters: BASE base address register, the register offset for OFFSETFunction Description: from the address position is directly read 16Bit

5、 BASE+OFFSET data in the registerReturn value: -Prototype of function: IORD_8DIRECT (BASE, OFFSET)Input parameters: BASE base address register, the register offset for OFFSETFunction Description: from the address position is directly read 8Bit BASE+OFFSET data in the registerReturn value: -The funct

6、ion prototype: IOWR_32DIRECT (BASE, OFFSET, DATA)Input parameters: BASE base address register, REGNUM offset register, DATA data to be writtenFunction Description: to address location directly into the 32Bit BASE+OFFSET register dataReturn value: -The function prototype: IOWR_16DIRECT (BASE, OFFSET,

7、 DATA)Input parameters: BASE base address register, REGNUM offset register, DATA data to be writtenFunction Description: to address location directly into the 16Bit BASE+OFFSET register dataReturn value: -The function prototype: IOWR_8DIRECT (BASE, OFFSET, DATA)Input parameters: BASE base address re

8、gister, REGNUM offset register, DATA data to be writtenFunction Description: to address location directly into the 8Bit BASE+OFFSET register dataReturn value: -Dma:The function prototype: int alt_dma_rxchan_close (alt_dma_rxchan rxchan)Input parameter: rxchan is the receive channelFunction: function

9、 (alt_dma_rxchan_close) notification system: application has been completed DMAThe receiving channel rxchan, the current implementation is successfulReturns: 0, and 1The function prototype: alt_dma_rxchan_depth (alt_dma_rxchan DMA)Input parameter: DMAFunction: function alt_dma_rxchan_depth () return

10、s the maximum number of transmitted to the special DMA (depth) of the received requestReturn value: the maximum number of DMAThe function prototype: int alt_dma_rxchan_ioctl (alt_dma_rxchan DMA, int req, void* ARG)Input parameters: DMA direct memory, req lists the requested operation, Arg decided by

11、 the requestFunction Description: received through the DMA channel to perform equipment specific I/O operationReturns: request specific value, otherwise return is negativeRequest typeRequest type request specificationTransmission of ALT_DMA_SET_MODE_8 data in 8Bit Arg ignoreTransmission of ALT_DMA_S

12、ET_MODE_16 data in 16Bit Arg ignoreTransmission of ALT_DMA_SET_MODE_32 data in 32Bit Arg ignoreTransmission of ALT_DMA_SET_MODE_64 data in 64Bit Arg ignoreTransmission of ALT_DMA_SET_MODE_128 data in 128Bit Arg ignoreALT_DMA_TX_ONLY_ON (1) under the control of software can only sendALT_DMA_TX_ONLY_O

13、FF (1) custom mode, under the control of software can receive, sendALT_DMA_RX_ONLY_ON (1) under the control of software can only receiveALT_DMA_RX_ONLY_OFF (1) custom mode, under the control of software can receive, sendThe function prototype: alt_dma_rxchan alt_dma_rxchan_open (const char* name)Inp

14、ut parameters: name constant character pointer, such as /dev/dma_0Function Description: get a alt_dma_rxchan descriptor for the DMA receiving channelReturns: 0, and returns to 0The function prototype: int alt_dma_rxchan_prepare (alt_dma_rxchan DMA, void* data,Alt_u32 length, alt_rxchan_done * done,

15、void* handle)Input parameters: DMA use channel; data receive data position pointer; length maximum receive data length; done once data is received, call the return function; handle, non transparent value to doneFunction Description: Send a request to the DMA receiver receiving channel,Returns: 0, whereas the return is negativeThe function prototype: int alt_dma_rxchan_reg (alt_dma_rxchan_dev * DEV)Input parameter: dev receive channel device nameFunction Description: system to register DMA receiving channel

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号