Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- volatile bool isrunning = 0;
- ISR(TIM1_COMPA_vect) {
- if (!isrunning++) {
- sei();
- if (currentStep < 100)
- currentStep += 1;
- else
- currentStep = 0;
- for (uint8_t x = 0; x <= 9; x++)
- (currentStep < pwmled[x]) ? (x < 8 ? PORTA |= (1 << p[x]) : PORTB |= (1 << p[x])) : (x < 8 ? PORTA &= ~(1 << p[x]) : PORTB &= ~(1 << p[x]));
- isrunning = 0;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement