完善资料让更多小伙伴认识你,还能领取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 |
|
|
|
|
只有小组成员才能发言,加入小组>>
786个成员聚集在这个小组
加入小组cyUSB3014一直显示2.1,不能到3.0情况,谁遇到过
7088 浏览 0 评论
2474 浏览 1 评论
2166 浏览 1 评论
4031 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
2073 浏览 6 评论
CY8C4025LQI在程序中调用函数,通过示波器观察SCL引脚波形,无法将pin0.4(SCL)下拉是什么原因导致?
7566浏览 2评论
CYUSB3065焊接到USB3.0 TYPE-B口的焊接触点就无法使用是什么原因导致的?
6114浏览 2评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
742浏览 2评论
709浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
7961浏览 2评论
/9
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2025-12-1 20:23 , Processed in 0.735383 second(s), Total 80, Slave 63 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191

淘帖
521