DSPRelated.com
Forums

Globals accessible from both Main.c and Events.c

Started by kiha...@gmail.com February 15, 2006
Sorry for such a noob question: how can I declare globals so that I can
access them from both main.c and my ISRs in Events.c?

Thanks!
Ko Ihara

in main you declare your variable for example:

int var;

in events.c you should declare this variable like
that:

extern int var;

that's all....
	--- kihara@kiha... wrote:

> Sorry for such a noob question: how can I declare
> globals so that I can access them from both main.c
> and my ISRs in Events.c?
> 
> Thanks!
> Ko Ihara
>
	__________________________________________________