Also, you can prevent global variables from being accessed outside of their file by declaring them as
static. For example:
In user_routines_fast.c:
Code:
static int auto_counter;
void User_Autonomous_Code(void)
{
...
In user_routines.c:
Code:
extern int auto_counter; /* This will not compile! */
It is important to note that the static qualifier has a different meaning if you use it in the scope of a function.