完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
电子发烧友论坛|
我想使用一个结构来访问不同端口上的不同芯片选择。有人做这件事的诀窍吗?
以上来自于百度翻译 以下为原文 i would like to use a structure to access different chip-selects that are on different ports. anyone have a neat trick of doing this? |
|
相关推荐
7个回答
|
|
|
|
|
|
|
|
|
假设你是指LabxButts…原则上你可以将所有寄存器定义收集到一个单独的结构中(我在大的MCU上有这样的事情),或者你只收集GPIO位到这样的结构中,但是没有什么优势:MCU仍然需要处理个人端口。作为一个单写访问的盟友只能处理单个16位端口。类似的事情可能通过一些宏来实现。不管怎样,IMHO这样的结构甚至可以改善混乱而不是清晰(我假定这是有意的)。
以上来自于百度翻译 以下为原文 Assuming you mean LATxbits ... In principle you can gather all register definitions into a single structure (I had such things on significantly bigger MCUs) or you may gather only the GPIO bits into such a structure, but there is little advantage: the MCU will still have to handle the ports individually as a single write access can only address a single 16-bit port. Similar things might be doable via some macro. Anyway, IMHO such constructions might even improve confusion instead of clarity (which I assume would be intended). |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
这个词可以应用到宗教团体,或者像KukkulkKLAN之类的东西,说…
以上来自于百度翻译 以下为原文 This word can be applied to religious groups, or something like ku-klux-klan, to say... |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
只有小组成员才能发言,加入小组>>
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473 浏览 0 评论
5793 浏览 9 评论
2334 浏览 8 评论
2224 浏览 10 评论
请问是否能把一个ADC值转换成两个字节用来设置PWM占空比?
3530 浏览 3 评论
1122浏览 1评论
有偿咨询,关于MPLAB X IPE烧录PIC32MX所遇到的问题
1095浏览 1评论
我是Microchip 的代理商,有PIC16F1829T-I/SS 技术问题可以咨询我,微信:A-chip-Ti
872浏览 1评论
MPLAB X IDE V6.25版本怎么对bootloader和应用程序进行烧录
473浏览 0评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 21:49 , Processed in 0.698198 second(s), Total 84, Slave 67 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
15111