Code: Select all
typedef struct date_time_stamp {
uint8_t year : 6;
uint8_t month : 4;
uint8_t day : 5;
uint8_t hour : 5;
uint8_t minute : 6;
uint8_t second : 6;
// total size = 32 bits = 4 bytes (expected).
} dtstamp_t;
void setup()
{
Serial.begin(115200);
Serial.println();
Serial.println(sizeof(dtstamp_t));
}
void loop()
{
}