Hi
I have a number of different strut composite variables and a single function that I want to pass them to, is it possible through casting or another method to be able to pass these different struts to a single method?
Many thanks :-)Code:Struct A {
uint8_t data1;
uint16_t data2;
uint8_t data3;
} // structa
Struct B {
uint32_t data1;
uint16_t data2;
uint8_t data3;
uint16_t data4;
uint16_t data5;
uint8_t data5;
} // structb {
Struct C {
uint16_t data1;
uint16_t data2;
} // structc
Function1(StructA);
Function1(StructB);
Function1(StructC);
Void Function1(uint8_t anyStruct) {
For (i=0; I < sizeof(anyStruct); i++) {
// print each byte onto the console for example usage
} // for
} // function 1
David