AnsweredAssumed Answered

5744P LIB union struct

Question asked by ping li on Aug 19, 2017
Latest reply on Aug 23, 2017 by stanish

Hi,NXP

   I have a qustion for S32DS 5744P lib about C union struct 。

C language:

 

 

In 5744P lib  :

typedef union { ///INIT_VREG_Tx
vuint32_t R;
struct {
vuint32_t :16;                           high bit
vuint32_t RW : 1;
vuint32_t ADR : 6;
vuint32_t P : 1;
vuint32_t ICCA_LIM : 1;
vuint32_t TCCA_LIM_OFF : 1;
vuint32_t IPFF_DIS : 1;
vuint32_t VCAN_OV_MON : 1;
vuint32_t : 1;
vuint32_t TAUX_LIM_OFF : 1;
vuint32_t VAUX_TRK_EN : 1;
vuint32_t : 1;                               low bit
} B;
struct {
vuint32_t :16;
vuint32_t RW : 1;
vuint32_t ADR : 6;
vuint32_t P : 1;
vuint32_t BYTE_FIELD : 8;
} Bytes;
} INIT_VREG_Tx_32B_tag;

 

what`s right ?

 

 

Think you!

Clipping

Outcomes