cancel
Showing results for 
Search instead for 
Did you mean: 

PSoC 5, 3 & 1

Anonymous
Not applicable

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

0 Likes
2 Replies
Anonymous
Not applicable

 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. 

0 Likes
Anonymous
Not applicable

 The specific place where you need to put your extern definition in RTC_INT.c would be between 

   

   

/* `#START RTC_ISR_DEFINITION` */

   

 

   

/* `#END` */

0 Likes