Browse Source

Re-enable Tone

leptun 4 years ago
parent
commit
9ff1f6c3ee
3 changed files with 4 additions and 21 deletions
  1. 4 4
      Firmware/system_timer.h
  2. 0 10
      Firmware/timer02.c
  3. 0 7
      Firmware/timer02.h

+ 4 - 4
Firmware/system_timer.h

@@ -11,8 +11,8 @@
 #define _millis millis2
 #define _micros micros2
 #define _delay delay2
-#define _tone tone2
-#define _noTone noTone2
+#define _tone tone
+#define _noTone noTone
 
 #define timer02_set_pwm0(pwm0)
 
@@ -20,8 +20,8 @@
 #define _millis millis
 #define _micros micros
 #define _delay delay
-#define _tone(x, y) /*tone*/
-#define _noTone(x) /*noTone*/
+#define _tone tone
+#define _noTone noTone
 #define timer02_set_pwm0(pwm0)
 #endif //SYSTEM_TIMER_2
 

+ 0 - 10
Firmware/timer02.c

@@ -136,14 +136,4 @@ void delay2(unsigned long ms)
 	}
 }
 
-void tone2(__attribute__((unused)) uint8_t _pin, __attribute__((unused)) unsigned int frequency/*, unsigned long duration*/)
-{
-	PIN_SET(BEEPER);
-}
-
-void noTone2(__attribute__((unused)) uint8_t _pin)
-{
-	PIN_CLR(BEEPER);
-}
-
 #endif //SYSTEM_TIMER_2

+ 0 - 7
Firmware/timer02.h

@@ -23,13 +23,6 @@ extern unsigned long micros2(void);
 ///! Reimplemented original delay() using timer2
 extern void delay2(unsigned long ms);
 
-///! Reimplemented original tone() using timer2
-///! Does not perform any PWM tone generation, it just sets the beeper pin to 1
-extern void tone2(uint8_t _pin, unsigned int frequency/*, unsigned long duration*/);
-
-///! Turn off beeping - set beeper pin to 0
-extern void noTone2(uint8_t _pin);
-
 #if defined(__cplusplus)
 }
 #endif //defined(__cplusplus)