Advertisement
Guest User

WHYTHO

a guest
Dec 14th, 2019
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. uint8_t interrupt_count1 = 0;
  2. uint8_t interrupt_count2 = 0;
  3. uint8_t tacno1 = 0;
  4. uint8_t tacno2 = 0;
  5. void process_tim1_update_interrupt()
  6. {
  7. ...
  8. if(++interrupt_count1 == 250 || tacno1 == 1)
  9. {
  10. tacno1 = 1;
  11. if(++interrupt_count2 == 250)
  12. {
  13. tacno1 = 0;
  14. interrupt_count1 = 0;
  15. interrupt_count2 = 0;
  16. ...
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement