Adding folding to #if, etc
This commit is contained in:
parent
45f10b4c4b
commit
943b5b7709
4 changed files with 174 additions and 170 deletions
|
@ -288,7 +288,8 @@ ISR(TIMER3_COMPA_vect) {
|
|||
#else
|
||||
if (note_frequency > 0) {
|
||||
ICR3 = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)); // Set max to the period
|
||||
OCR3A = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)) >> 1; // Set compare to half the period
|
||||
//OCR3A = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)) >> 1; // Set compare to half the period
|
||||
OCR3A = (int)(((double)F_CPU) / (note_frequency * CPU_PRESCALER)) >> 2; // Set compare to half the period
|
||||
} else {
|
||||
ICR3 = 0;
|
||||
OCR3A = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue