> 联合体类型的定义
/* ′?′¢×????óê?μ?μ?TDA5238?á1?êy?Y?á11 */ typedef struct { uint8_t UniqueID[4]; /* éè±??¨ò?DòáDo? */ uint8_t TyrePosition; /* ??ì¥????ê?±e?? */ int16_t Pressure; /* ??ì¥???1 */ int16_t Temperature; /* ??ì¥???è */ int16_t Acceleration; /* ??á|?ó?ù?è */ int16_t Voltage; /* μ??1?μ */ uint8_t CRC8; /* D£?é?? */ uint8_t RESERVED[16]; /* ±£á?×??ú */ }TDA5235_RESULT_s; typedef union { TDA5235_RESULT_s tda5235_obj; uint8_t tda5235_buf[sizeof(TDA5235_RESULT_s)]; }TDA5235_RESULT_u; TDA5235_RESULT_u tda5235_result; /* ì¥?1×????á1?êy?Y?á1? */ uint8_t TDA5235_Read_FIFO(uint8_t *pObj)
> 联合体变量的三种使用
#1 TDA5235_Read_FIFO(&tda5235_result)
#2 TDA5235_Read_FIFO((uint8_t *)&tda5235_result)
#3 TDA5235_Read_FIFO(tda5235_result.tda5235_buf)