aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gaudio/pwm/gaudio_play_board_template.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2014-03-30 19:10:31 +1000
committerinmarket <andrewh@inmarket.com.au>2014-03-30 19:10:31 +1000
commit04f03ea71da1337c501b598c6038afaf0216fed8 (patch)
tree7d31e7b75256f42bc6b98bce7e625431d4f7722a /drivers/gaudio/pwm/gaudio_play_board_template.h
parentc16cb15ce9b5e4cc1a913def9614f8a587bc0868 (diff)
downloaduGFX-04f03ea71da1337c501b598c6038afaf0216fed8.tar.gz
uGFX-04f03ea71da1337c501b598c6038afaf0216fed8.tar.bz2
uGFX-04f03ea71da1337c501b598c6038afaf0216fed8.zip
New PWM audio driver for audio output using a digital pin on a CPU
Diffstat (limited to 'drivers/gaudio/pwm/gaudio_play_board_template.h')
-rw-r--r--drivers/gaudio/pwm/gaudio_play_board_template.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/gaudio/pwm/gaudio_play_board_template.h b/drivers/gaudio/pwm/gaudio_play_board_template.h
new file mode 100644
index 00000000..24039d17
--- /dev/null
+++ b/drivers/gaudio/pwm/gaudio_play_board_template.h
@@ -0,0 +1,38 @@
+/*
+ * This file is subject to the terms of the GFX License. If a copy of
+ * the license was not distributed with this file, you can obtain one at:
+ *
+ * http://ugfx.org/license.html
+ */
+
+#ifndef GAUDIO_PLAY_BOARD_H
+#define GAUDIO_PLAY_BOARD_H
+
+/*
+ * This routine is defined in the driver - the timer interrupt should call this routine.
+ *
+ * static void gaudio_play_pwm_timer_callbackI(void);
+ *
+ */
+
+static bool gaudio_play_pwm_setup(uint32_t frequency, ArrayDataFormat format) {
+ /* Initialise the PWM - use a midpoint value for the initial PWM value */
+ /* Initialise the timer interrupt @ frequency */
+ /* Return FALSE if any parameter invalid */
+}
+
+static void gaudio_play_pwm_start(void) {
+ /* Start the PWM */
+ /* Start the timer interrupt */
+}
+
+static void gaudio_play_pwm_stop(void) {
+ /* Stop the timer interrupt */
+ /* Stop the PWM */
+}
+
+static void gaudio_play_pwm_setI(uint16_t value) {
+ /* Set the PWM value */
+}
+
+#endif /* GAUDIO_PLAY_BOARD_H */