5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
25 extern uint8_t g_beepCnt
;
26 extern uint8_t beepAgain
;
27 extern uint8_t beepAgainOrig
;
28 extern uint8_t beepOn
;
32 extern uint8_t hapticTick
;
39 inline void _beep(uint8_t b
)
44 inline void _beep(uint8_t b
)
50 void beep(uint8_t val
);
52 inline void beep(uint8_t) { }
58 #define AUDIO_HELLO() PUSH_SYSTEM_PROMPT(AUDIO_HELLO)
60 #define AUDIO_TX_BATTERY_LOW() PUSH_SYSTEM_PROMPT(AU_TX_BATTERY_LOW)
61 #define AUDIO_INACTIVITY() PUSH_SYSTEM_PROMPT(AU_INACTIVITY)
62 #define AUDIO_ERROR_MESSAGE(e) PUSH_SYSTEM_PROMPT((e))
63 #define AUDIO_TIMER_MINUTE(t) playDuration(t)
65 #define AUDIO_TIMER_30() PUSH_SYSTEM_PROMPT(AU_TIMER_30)
66 #define AUDIO_TIMER_20() PUSH_SYSTEM_PROMPT(AU_TIMER_20)
68 #define AUDIO_KEY_PRESS() beep(0)
69 #define AUDIO_KEY_ERROR() beep(2)
70 #define AUDIO_WARNING2() beep(2)
71 #define AUDIO_WARNING1() beep(3)
72 #define AUDIO_ERROR() beep(4)
73 #define AUDIO_MIX_WARNING(x) beep(1)
74 #define AUDIO_POT_MIDDLE() beep(2)
75 #define AUDIO_TIMER_COUNTDOWN(idx, val) beep(2)
76 #define AUDIO_TIMER_ELAPSED(idx) beep(3)
77 #define AUDIO_VARIO_UP() _beep(1)
78 #define AUDIO_VARIO_DOWN() _beep(1)
79 #define AUDIO_TRIM_PRESS(f) { if (!IS_KEY_FIRST(event)) warble = true; beep(1); }
80 #define AUDIO_TRIM_MIDDLE() beep(2)
81 #define AUDIO_TRIM_MIN() beep(2)
82 #define AUDIO_TRIM_MAX() beep(2)
83 #define AUDIO_PLAY(p) beep(3)
85 #define IS_AUDIO_BUSY() (g_beepCnt || beepAgain || beepOn)
89 #define AUDIO_TX_BATTERY_LOW()
90 #define AUDIO_INACTIVITY()
91 #define AUDIO_ERROR_MESSAGE(e)
92 #define AUDIO_TIMER_MINUTE(t)
93 #define AUDIO_TIMER_30()
94 #define AUDIO_TIMER_20()
95 #define AUDIO_WARNING2()
96 #define AUDIO_WARNING1()
98 #define AUDIO_MIX_WARNING(x)
99 #define AUDIO_POT_MIDDLE()
100 #define AUDIO_TIMER_LT10(m, x)
101 #define AUDIO_TIMER_00(m)
102 #define AUDIO_VARIO_UP()
103 #define AUDIO_VARIO_DOWN()
104 #define AUDIO_TRIM(event, f)
105 #define AUDIO_TRIM_MIDDLE(f)
106 #define AUDIO_TRIM_END(f)
107 #define AUDIO_PLAY(p)
108 #define IS_AUDIO_BUSY() false
111 #define AUDIO_RESET()
112 #define AUDIO_FLUSH()
114 #define PLAY_PHASE_OFF(phase)
115 #define PLAY_PHASE_ON(phase)
116 #define PLAY_SWITCH_MOVED(sw)
117 #define PLAY_LOGICAL_SWITCH_OFF(sw)
118 #define PLAY_LOGICAL_SWITCH_ON(sw)
119 #define PLAY_MODEL_NAME()
120 #define START_SILENCE_PERIOD()