I define a struct, have a one-member the type is uint8_t, this member store mac address.
Programming on Arduino IDE.
Struct:
typedef struct devInfo{
uint8_t address[];
unsigned int count;
unsigned int filePos;
}struct_devInfo;
- Quesion 1:
I use these two ways to give a value but cannot assign value to variable.
Method 1 > struct_devInfo slave = {{0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6}, 0, 0};
Method 2 > slave.address[] = {0xA1, 0xB2, 0xC3, 0xD4, 0xE5, 0xF6};
How can I access this type of value?
- Question 2:
I will use the variables of this structure, salve1, slave2... etc.
In addition to the structure, is there some better way? Can you demonstrate?