AnsweredAssumed Answered

How to transfer variables between main.c and Event.c

Question asked by Aaron Lee on Jul 23, 2018
Latest reply on Jul 24, 2018 by Aaron Lee

Hi,

 

We are using S12ZVCA with processor expert. How to transfer variables between main.c and Event.c?

 

main.c as follow:

unsigned int i;

void main(void)
{

   .........

   for(;;)
   {
      SCI_Send(i);
   }
   .........

........
/*
** ###################################################################
**
** This file was created by Processor Expert 10.3 [05.09]
** for the Freescale HCS12Z series of microcontrollers.
**
** ###################################################################
*/

Event.c as follow:

unsigned int i;

void TI1_OnInterrupt(void)
{
   ++i;                                       // How to transfer i to main.c
}

 

Best regards,

Aaron

Outcomes