i'm study the Low-Power library to better undertand how it works.
In this part of code i have some question.
Sometime he uses commands like:
but in other part of code, example "TIMER2_OFF":
if (TCCR2B & CS22) clockSource |= (1 << CS22); if (TCCR2B & CS21) clockSource |= (1 << CS21); if (TCCR2B & CS20) clockSource |= (1 << CS20); // Remove the clock source to shutdown Timer2 TCCR2B &= ~(1 << CS22); TCCR2B &= ~(1 << CS21); TCCR2B &= ~(1 << CS20); power_timer2_disable();
he uses the register code and, in the end, the function.
Someone can explain to me why?