union struct stand

typdef union _USB_OTG_GINTSTS_TypeDef
{
     uint32_t d32;
     struct
    {
        uint32_t curmode:1;            // This is the lowst bit( bit 0)
        uint32_t modemismatch :1;
        uint32_t otgintr :1;
        uint32_t sofintr :1;
        uint32_t rxstsqlvl :1;
        uint32_t nptxfempty :1;
        uint32_t ginnakeff :1;
        uint32_t goutnakeff :1;
        uint32_t Reserved8_9 :2;
        uint32_t erlysuspend :1;
        uint32_t usbsuspend :1;
        uint32_t usbreset :1;
        uint32_t enumdone :1;
        uint32_t isooutdrop :1;
        uint32_t eopframe :1;
        uint32_t Reserved16_17 :2;
        uint32_t inepint:1;
        uint32_t outepintr :1;
        uint32_t incomplisoin :1;
        uint32_t incomplisoout :1;
        uint32_t Reserved22_23 :2;
        uint32_t portintr :1;
        uint32_t hcintr :1;
        uint32_t ptxfempty :1;
        uint32_t Reserved27 :1;
        uint32_t conidstschng :1;
        uint32_t disconnect :1;
        uint32_t sessreqintr :1;
        uint32_t wkupintr :1;
  }
  b;
} USB_OTG_GINTSTS_TypeDef ;
                 
// Declare
USB_OTG_GINTSTS_TypeDef  gintsts;

 

posted @ 2017-04-18 14:15  咕噜2017  阅读(255)  评论(0编辑  收藏  举报