2 Replies Latest reply on Jun 11, 2019 11:57 AM by DaCh_4286001

    PWM_ReadStatusRegister()

    DaCh_4286001

      What's the difference between these 2 routine?

       

      1. int a = 0;

          a = PWM_ReadStatusRegister();

          while((a & PWM_STATUS_CMP1) == 0);

       

      2. while((PWM_ReadStatusRegister() & PWM_STATUS_CMP1) == 0);

       

      the first one will stuck in while loop while the second one can pass while loop.