|
|
|
|
|
|
|
|
|
|
|
|
|
|
// When the clock is known at compiletime, use this if-then-else |
|
|
// When the clock is known at compiletime, use this if-then-else |
|
|
// cascade, which the compiler knows how to completely optimize |
|
|
// cascade, which the compiler knows how to completely optimize |
|
|
// away. When clock is not know, use a loop instead, which generates |
|
|
|
|
|
|
|
|
// away. When clock is not known, use a loop instead, which generates |
|
|
// shorter code. |
|
|
// shorter code. |
|
|
if (__builtin_constant_p(clock)) { |
|
|
if (__builtin_constant_p(clock)) { |
|
|
if (clock >= F_CPU / 2) { |
|
|
if (clock >= F_CPU / 2) { |