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
Branches
Tags
No related merge requests found
...@@ -358,10 +358,10 @@ int main(void) { ...@@ -358,10 +358,10 @@ int main(void) {
TCCR0B = (1 << CS01); TCCR0B = (1 << CS01);
// Enable timer overflow interrupt // Enable timer overflow interrupt
TIMSK0 |= (1 << TOIE0); // TODO Optimization: no or TIMSK0 = (1 << TOIE0);
// Set PWM pin to output // Set PWM pin to output
DDRB |= (1 << PWM_PIN); // TODO Optimization: no or DDRB |= (1 << PWM_PIN);
#if defined(LOW_VOLTAGE_PROTECTION) || defined(BATTCHECK) #if defined(LOW_VOLTAGE_PROTECTION) || defined(BATTCHECK)
ADMUX = ADMUX =
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment