完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
大家好,
是否有可能通过定义来控制示意页面上的组件? 例如,对于一个项目,我需要一些引脚用于LED移位寄存器。 在另一个项目中,我想使用SPI控制的触摸显示器。 我可以将两个组件放置在我的设计中,并通过定义启用/禁用它们吗? 包括生成的代码、PIN定义等? 谢谢和问候 安德烈亚斯 以上来自于百度翻译 以下为原文 Hello everybody, is it somehow possible to control the components on the Schematic Page via defines? E.g. for one project I would need some pins to use them for an LED shift register and in another project I would like to use an SPI controlled Touch Display. Can I place both components in my design and enable/disable them via define? Including the generated code, the pin definitions and so on? Thanks and best regards Andreas |
|
相关推荐
5个回答
|
|
您只能启用/禁用组件本身。然后,您可以使用条件编译(μiIFDEF)来生成项目中的代码。我试过了,这个方法效果很好。
鲍勃 以上来自于百度翻译 以下为原文 You may only enable/disable the component itself. Then you can use conditional compilation (#ifdef) to generate the code within your project. I tried that and this method works perfectly. Bob |
|
|
|
嗨,鲍伯, 谢谢,我也这么做了,到目前为止还不错,但是如果我有更多的方法,那就更好了。 不同的项目和不同的组件和共同的基础代码… 这类似于在编译之前注释每个文件而不是使用定义开关; 安德烈亚斯 以上来自于百度翻译 以下为原文 Hi Bob, thanks, I did that too, works fine so far, but a more automatic way would be nice if I have more different projects with different components and a common base code... This is quite similar to comment out each file before a compile instead of using define switches ;-) Andreas |
|
|
|
我同意您的观点,但是手动注释程序的部分比禁用顶部设计页面中的一个组件更容易出错。在.H.IFNDEF指令中可以使用的组件.h文件中有很多定义。
鲍勃 以上来自于百度翻译 以下为原文 I agree with you But manual commenting parts of your program is more prune for errors than disabling a component on one of the Top Design pages. There are plenty of #defines in the component.h file which you may use in an #ifndef instruction. Bob |
|
|
|
那么,有没有这样的东西作为PSoC动态重构?
当做, 乔治 以上来自于百度翻译 以下为原文 So, there would be no such thing as dynamic reconfiguration in PSoC 3? Regards, George |
|
|
|
因此,PSoC 3中不存在动态重构的问题。
大概不会。 您可以给我们一个带有两个不同项目的引导加载程序。有点闪光灯消耗,但当需要时会工作。 鲍勃 以上来自于百度翻译 以下为原文 So, there would be no such thing as dynamic reconfiguration in PSoC 3 Probably not. You could us a bootloader with two different projects. A bit flash-consuming, but would work when really needed. Bob |
|
|
|
只有小组成员才能发言,加入小组>>
717个成员聚集在这个小组
加入小组1901 浏览 1 评论
1653 浏览 1 评论
3406 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1568 浏览 6 评论
1380 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
188浏览 2评论
184浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
325浏览 2评论
352浏览 1评论
63浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-25 18:36 , Processed in 0.633433 second(s), Total 79, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号