完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,我有一个函数指针。我必须写在一个3x22440 SPI DISPLAYBATE(*PfWrEn88A1)(u8*pDATA,int NUMITATS)上,我从一个具有原型类型WraveMeMyA1(char unNeal*PultMeReMm,int NUMTATE)的函数开始,然后我把函数指针赋值给我的函数PfWrEn88A1=最后,我实现了我在SPI上写的功能,到目前为止,一切都还好。然后我考虑用DMA来改进所有的东西……我现在发现的问题是DMA模块需要知道源地址和目的地址来指向(除了其他参数)。对于我输入的目的地址,以及SPI3BUF(在我的例子中使用PIC32 MZ)。有人可以向我解释我必须输入什么作为源地址吗?数据块一次大约500字节,显示器是一个3x22440 SPII使用PIC32 MZ2048 EFH064和声2.01,图形库是EMWIN集成到和谐感谢中。
以上来自于百度翻译 以下为原文 Hello everyone, I have a function pointer. I have to write on a 320x240 SPI display void (* pfWriteM8_A1) (U8 * pData, int NumItems); I started with a function that has a prototype void writeM_a1 (char unsigned * pParameterM, int NumItems); then I assign the function pointer to my function pfWriteM8_A1 = writeM_a1; lastly I implement my function to write on SPI and up to this point everything is OK. Then I thought about improving everything using the DMA .... the problem that I find myself now is that the DMA module needs to know the source address and the destination address to point (in addition to other parameters). For the destination address I entered &SPI3BUF (in my case using pic32mz). Can someone explain to me what I have to enter as a source address? the data blocks are about 500 bytes at a time and the display is a 320x240 SPI I use a pic32mz2048efh064 hARMony 2.01 and the graphics library is emwin integrated into harmony Thank's |
|
相关推荐
2个回答
|
|
你不能使用DMA来调用一个函数,并让它传递结果。显示的数据必须已经在缓冲区中(或大部分在适当位置),并且DMA将缓冲区内容传送到SPI。在我看来,您希望将函数填充在缓冲区中,并且当缓冲区被填充时,启动DMA。我做了一个类似的POV时钟显示,CPU只更新了缓冲器,DMA将数据从缓冲器传送到(在我的情况下)I/O端口。
以上来自于百度翻译 以下为原文 You're not going to be able to use DMA to, say, invoke a function and have it transfer the result. The data for the display has to already be in place (or mostly in place) in a buffer, and the DMA transfers the buffer contents to the SPI. It seems, to me, that you'll want to have the function fill in the buffer, and when the buffer is filled, kick off the DMA. I did something similar to this for a POV clock display, where the CPU only updated the buffer, and the DMA transferred the data from the buffer to (in my case) the I/O Ports. |
|
|
|
谢谢你的回答…这是我也曾想过的解决办法…我觉得奇怪的是,你必须使用这种技术来完成这种类型的传输,因为我认为你不必要的步骤来填充一个缓冲区。对显示器的数据传输必须优化,不能浪费不必要的时间。除此之外,我还没有图形库的源文件,而且我对DMA也不太熟悉。我想知道是否有人能向我证实这是最好的解决办法。谢谢您
以上来自于百度翻译 以下为原文 thanks for the answer .... this is the solution that I had also thought .... I find it strange that you have to use this technique to be able to do this type of transfer because I think that you make unnecessary steps to fill a buffer. the data transfer to the display must necessarily be optimized and you can not waste time unnecessarily. Besides I do not have the source file of the graphic library available and I am also not very familiar with the dma. I would like to know if anyone can confirm to me that this is the best solution. thank you |
|
|
|
只有小组成员才能发言,加入小组>>
5140 浏览 9 评论
1988 浏览 8 评论
1917 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3159 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2215 浏览 5 评论
708浏览 1评论
598浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
480浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
609浏览 0评论
505浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-8 18:28 , Processed in 1.205130 second(s), Total 79, Slave 62 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号