summaryrefslogtreecommitdiff
path: root/src/ao_terraui.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2010-10-31 00:38:39 -0700
committerKeith Packard <keithp@keithp.com>2010-10-31 00:38:39 -0700
commit3493b456399bcc0ea43d28fd4105928bd8793cff (patch)
tree869bc731152146632fc55cf9df7d4d6f125e8b68 /src/ao_terraui.c
parent3f53e5daeca4d9257aef017594fd65b379b97a1e (diff)
teleterra: Add PWM audio system
This uses timers 3 and 4 to emit 8-bit 11025Hz audio using a 93.8kHz carrier. A simple low-pass filter to eliminate the 93.8kHz signal results in credible 8-bit audio. There is a giant sample for testing in the ao_audio code which shouldn't be included in a product. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/ao_terraui.c')
-rw-r--r--src/ao_terraui.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/ao_terraui.c b/src/ao_terraui.c
index 4837273d..714a7579 100644
--- a/src/ao_terraui.c
+++ b/src/ao_terraui.c
@@ -17,26 +17,12 @@
#include "ao.h"
-static __code uint8_t ready_beeps[] = {
- AO_BEEP_g, AO_MS_TO_TICKS(100),
- AO_BEEP_bb, AO_MS_TO_TICKS(100),
- AO_BEEP_dd, AO_MS_TO_TICKS(100),
- AO_BEEP_gg, AO_MS_TO_TICKS(200),
- AO_BEEP_dd, AO_MS_TO_TICKS(100),
- AO_BEEP_gg, AO_MS_TO_TICKS(400),
-};
-
-#define NUM_READY (sizeof(ready_beeps) / 2)
-
__xdata uint8_t ao_terraui_wakeup;
void
ao_terraui(void)
{
- uint8_t i;
-
- for (i = 0; i < sizeof(ready_beeps); i += 2)
- ao_beep_for(ready_beeps[i], ready_beeps[i+1]);
+ ao_audio_test();
for (;;)
ao_sleep(&ao_terraui_wakeup);
}