teleterra: Add PWM audio system
[fw/altos] / src / ao.h
index a952c50dadb49561211b58cfab2252df30877353..a3519150823a87763b441e25bd0ed57854397584 100644 (file)
--- a/src/ao.h
+++ b/src/ao.h
@@ -31,6 +31,9 @@
 /* Convert a __data pointer into an __xdata pointer */
 #define DATA_TO_XDATA(a)       ((void __xdata *) ((uint8_t) (a) | 0xff00))
 
+/* Convert a __code pointer into an __xdata pointer */
+#define CODE_TO_XDATA(a)       ((void __xdata *) ((uint16_t) (a)))
+
 /* Stack runs from above the allocated __data space to 0xfe, which avoids
  * writing to 0xff as that triggers the stack overflow indicator
  */
@@ -1112,4 +1115,15 @@ ao_terraui(void);
 void
 ao_terraui_init(void);
 
+/* ao_audio.c */
+
+void
+ao_audio_test(void);
+
+void
+ao_audio_send(__xdata uint8_t *samples, uint16_t nsamples) __reentrant;
+
+void
+ao_audio_init(void);
+
 #endif /* _AO_H_ */