소스 검색

add silent notes

Jack Humbert 9 년 전
부모
커밋
976d0a327b
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      quantum/audio.c

+ 3 - 0
quantum/audio.c

@@ -247,6 +247,9 @@ ISR(TIMER3_COMPA_vect) {
             if (note_frequency > 0) {
                 ICR3 = (int)(((double)F_CPU) / note_frequency); // Set max to the period
                 OCR3A = (int)(((double)F_CPU) / note_frequency) >> 1; // Set compare to half the period
+            } else {
+                ICR3 = 0;
+                OCR3A = 0;
             }
         #endif