完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在PSoC3中使用了RTC。
我定义了一个变量的主。我想在rtc_int使用该变量的值。C。让我知道如何通过这样的变量主要rtc_int。C。C文件 当做 凯文 以上来自于百度翻译 以下为原文 I used a RTC in PSoC3. i defined a variable in main.c. i want to use the value of the variable in the RTC_INT.c . Let me know how to pass such a variable from main.c to RTC_INT.c file regards kavin |
|
相关推荐
2个回答
|
|
在主.c中声明变量。因为您需要从主C外部的一个位置访问这个变量,所以您需要再次声明这个变量。在这种情况下,它是RTCI.I.C。但是,RTCI.I.C是一个由PSoC Creator重新生成的文件,当你做一个干净的构建。为了告知创建者在构建之间保持这个声明,您需要在特定的位置声明变量。
以上来自于百度翻译 以下为原文 Declare your variable in main.c. Since you need to access this from an place external to main.c, you need to again declare this variable with the EXTERN ketword in the file where you are trying to acess it. In this case, it is RTC_INT.c . But then RTC_INT.c is a file regenrated by PSoC Creator when you do a clean build. In order to inform creator to hold this declaration between builds, you need to declare the variable in a specific place. |
|
|
|
具体的地方,你需要把你的外部定义的rtc_int C之间会。
/*‘启动RTCIISRL定义’*/ /*’结尾’* 以上来自于百度翻译 以下为原文 The specific place where you need to put your extern definition in RTC_INT.c would be between /* `#START RTC_ISR_DEFINITION` */ /* `#END` */ |
|
|
|
只有小组成员才能发言,加入小组>>
715个成员聚集在这个小组
加入小组1896 浏览 1 评论
1651 浏览 1 评论
3401 浏览 1 评论
请问可以直接使用来自FX2LP固件的端点向主机FIFO写入数据吗?
1567 浏览 6 评论
1379 浏览 1 评论
CX3连接Camera修改分辨率之后,播放器无法播出camera的画面怎么解决?
180浏览 2评论
179浏览 2评论
使用stm32+cyw43438 wifi驱动whd,WHD驱动固件加载失败的原因?
318浏览 2评论
344浏览 1评论
58浏览 1评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-4-20 09:41 , Processed in 0.763876 second(s), Total 72, Slave 60 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号