Skip to content
Snippets Groups Projects
Commit 26e59f4e authored by Sven Greiner's avatar Sven Greiner
Browse files

Set TIMSK0 explicitly

TIMSK0 is outside of lower 32 I/O registers and thus cannot be set via
sbi. This saves 4 bytes of flash.
parent 88ac6455
No related branches found
No related tags found
No related merge requests found
......@@ -358,10 +358,10 @@ int main(void) {
TCCR0B = (1 << CS01);
// Enable timer overflow interrupt
TIMSK0 |= (1 << TOIE0); // TODO Optimization: no or
TIMSK0 = (1 << TOIE0);
// Set PWM pin to output
DDRB |= (1 << PWM_PIN); // TODO Optimization: no or
DDRB |= (1 << PWM_PIN);
#if defined(LOW_VOLTAGE_PROTECTION) || defined(BATTCHECK)
ADMUX =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment