Advertisement
Guest User

Untitled

a guest
Mar 18th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1.      if(TIM10->CNT == 65535)
  2.      {
  3.        do{
  4.          ticks_count = (((TIM9->CNT)-1)<<16) | 65535;
  5.          }while((TIM10->CNT)==0);
  6.      }
  7.      else{
  8.        ticks_count = ((TIM9->CNT)<<16) | (TIM10->CNT);
  9.      }
  10.  
  11. /******************/
  12.     if(((ticks_count = (((TIM9->CNT))<<16) | TIM10->CNT) & 0xffff ) == 65535)
  13.     {
  14.         do{
  15.         ticks_count = (((TIM9->CNT)-1)<<16) | 65535;
  16.         }while((TIM10->CNT)==0);
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement