Hey guys, today I found a weird thing: an "octet". It seems to be like a byte although its not.
As it is the first time I see this, and dont find any information about this, Im here asking for help. The problem is this:
I have this structure with an "octet"
typedef struct PACK { LITTLE_ENDIAN_OCTET(3,( uint8_t randStartTime : 1, uint8_t randEndTime : 1, uint8_t reserved : 6 )) } ZCL_EventControl_t;
and somewhere in the code I need to assign to this octet a uint8_t variable like this:
loadControlEvent.eventControl = commandFrame.payload[22];
where eventControl is an instance of ZCL_EventControl_t and commandFrame.payload[22] is a member of a stucture with uint8_t type.
Compiler throws me this error:
./../../src/esp.c:640:32: error: incompatible types when assigning to type 'ZCL_EventControl_t' from type 'uint8_t'
How can I assign to the octet the value of a uint8_t variable?