Hi Horace
I understood this thank you, i had 2 more doubts in this same topic.
1. This same code is working in Hitech PICC8 without the 'extern' i don't know how?
2. I used the extern as below in radio_if.h
extern radioChipType_t RadioChipType;
but not defined in Radio.c file, but its compiling without error.
I am having another structure
Code:
typedef struct
{
unsigned char data[PER_MAX_DATA];
char rssi;
unsigned char lqi;
unsigned char length;
unsigned char addr;
}rxData_t;
/* Used to hold RX data accross different radios. No Mutex is implemented */
extern rxData_t *rxData;
i added extern both the structure variables after your reply. and compiled only this structure pointer throws error as
"undefined reference to `_rxData'
Can you explain how the non pointer structure is working without define, and this pointer structure says error.