I have a structure "Register" declared like this:
typedef struct {
int TypeID;
unsigned char InstrumentType[128];
unsigned char RegTag[128];
unsigned char Protocol[128];
int RegNum;
unsigned char RW[128];
unsigned char RegisterType[128];
unsigned char Signed[128];
unsigned char Inverted[128];
unsigned char DataType[128];
int Counts;
} Register;
I have an array of Registers called "Reg[9]" and want to create a function called 'TransferValues' to assign values to all the fields in the structure for each element of the array. Once the values are updated they will be outputted individually in main(). How can I pass the array to and from this function?
void yourFunc ( Register *param1) ....int main(void) { Register Reg[9]; yourFunc(Reg);}