Commits

Trammell Hudson committed 692680e

PORTD -> speaker_off()

Comments (0)

Files changed (1)

alphaclock_18_Rev1_0/alphaclock_18_Rev1_0.pde

 }
 
 
-void TurnAlarmOff (void)
+static inline void
+speaker_off(void)
+{
+	sbi(PORTD, 5);
+}
+
+static void
+TurnAlarmOff(void)
 {       
-  AlarmNow = 0;
-  noTone(13);
-  PORTD |= 32; // Turn off speaker
+	AlarmNow = 0;
+	noTone(13);
+	speaker_off();
 }
 
 
   TurnAlarmOff(); 
   snoozed = 0;
   noTone(13);	
-  PORTD |= 32; // Turn off speaker
+  speaker_off();
 }  // End Setup
 
 
         NextAdvanceSound = millisCopy + 1000;
          SoundSequence = 0;
          noTone(13);
-           PORTD |= 32; // Turn off speaker
+	 speaker_off();
         }
 
       }
             NextAdvanceSound = millisCopy + 200;
             SoundSequence++;  
             noTone(13);  
-            PORTD |= 32; // Turn off speaker   
-            //
+	    speaker_off();
           }
         }
         else
           NextAdvanceSound = millisCopy + 1000;
           SoundSequence = 0;
           noTone(13);  
-          PORTD |= 32; // Turn off speaker  
+	  speaker_off();
         }
 
       }
             NextAdvanceSound = millisCopy + 200;
             SoundSequence++;  
             noTone(13);  
-            PORTD |= 32; // Turn off speaker    
+	    speaker_off();
           }
 
         }
           NextAdvanceSound = millisCopy + 1400;
           SoundSequence = 0;
           noTone(13);
-          PORTD |= 32; // Turn off speaker
+	  speaker_off();
         }
 
       }
             NextAdvanceSound = millisCopy + 200;
             SoundSequence++;  
             noTone(13);  
-            PORTD |= 32; // Turn off speaker    
+	    speaker_off();
           }
 
         }
           NextAdvanceSound = millisCopy + 1000;
           SoundSequence = 0; 
           noTone(13);
-          PORTD |= 32; // Turn off speaker
+	  speaker_off();
         }
 
       }