完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
有人知道同一个SPI端口上的多个SPI客户端的好代码示例吗?我不知道如何为SPI中断回调管理状态机。看来,一个单一的SPI设备需要5或6个状态,以完成工作(从和谐动态驱动器的例子)。我想这样做的一种方法是对每个设备有六个唯一的状态值…但我不太明白这一点。除此之外,在应用程序中设置了一个巨大的状态树,而且好像司机对管理多个客户没有多大帮助。顺便说一下,使用FrRetos。有什么建议吗?
以上来自于百度翻译 以下为原文 Does anyone know of good code example of multiple SPI clients on same SPI port? I'm at a loss to figure out how to manage state machine for SPI interrupt callbacks. It appears that a single SPI device requires 5 or 6 states to get the job done (from the HARMony dynamic driver example). I suppose one way to do this would be to have six unique state values for each device... but I can't quite figure that out. Besides, that puts a huge state tree in the app and it seems like the driver is not really much help to manage the multiple clients. By the way, using freertos. Any suggestions? |
|
相关推荐
1个回答
|
|
我想和声对于多客户端配置没有任何演示,但是我相信很多用户已经使用了这个模式,而且它看起来对他们来说很好。关于你的应用程序的状态数,你开发它的真正意义在于你自己。如果您有2个客户端,则需要两次打开驱动程序,并使用clitDealthAPI两次配置两次。所有这些都可以在一个州进行。然后在下一个状态中,您可以编写写入/读取缓冲区请求。
以上来自于百度翻译 以下为原文 i guess harmony doesn't have any demo for multi client configuration, but i am sure many users have used that mode and it seemed to have worked well for them. regarding number of states in your application, it is really upto you how you develop it. you should be able to manage with lesser number of states as well. if you have 2 clients, you need to open the driver twice and configure it twice using ClientConfigure API twice. all this can be done in one state mostly. then in next state you can make write/read buffer requests. |
|
|
|
只有小组成员才能发言,加入小组>>
5142 浏览 9 评论
1990 浏览 8 评论
1918 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3159 浏览 3 评论
请问电源和晶体值之间有什么关系吗?PIC在正常条件下运行4MHz需要多少电压?
2215 浏览 5 评论
710浏览 1评论
598浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
481浏览 1评论
PIC Kit3出现目标设备ID(00000000)与预期的设备ID(02c20000)不匹配。是什么原因
610浏览 0评论
508浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-11-10 11:59 , Processed in 0.925072 second(s), Total 44, Slave 39 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号