typedef struct
{
uint16_t u16sn; //sn
uint16_t tm_year :7;
uint16_t tm_mon :4;
uint16_t tm_day :5;
uint16_t tm_hour :5;
uint16_t tm_minute :6;
uint16_t tm_second :5;
uint16_t ReagentType;
uint16_t urst[8];
uint16_t ursv[8];
}__attribute__ ((aligned (4)))DryChemResult; // 40bytes
uint16_t占用了两个字节的空间,而uint16_t XXX【8】数据各占用16个字节的空间,对于年、月、日这三个参数中,年占用的为7个位,月占用4个位,日占用了5个位,合起来共占用16个位,即为2个字节,所以该结构体共占用了40个位的字节