They will be accessed only by one thread, so no memory sharing is happening, and this part is written in XC. All functions concerned with the global variables are in the same .xc file. I am trying to use an array of structs, but I can't even get something like an int to have persistent state.
Code: Select all
static int numInterfaces;
static interface interfaceArray[20]; // interface refers to a struct
static interface testStruct;
I tried the extern specifier, but that gives me:
Error: Undefined reference to 'interfaceArray
Can anyone tell me what I need to do to make global variables work?