TalkThrough Demo for TLV320HL

Dependencies:   TLV320HL mbed

Files at this revision

API Documentation at this revision

Comitter:
hollegha
Date:
Wed Oct 22 09:26:39 2014 +0000
Commit message:
TalkThrough Demo for TLV320HL

Changed in this revision

TLV320HL.lib Show annotated file Show diff for this revision Revisions of this file
TalkThrough.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
diff -r 000000000000 -r 78b884c496bc TLV320HL.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TLV320HL.lib	Wed Oct 22 09:26:39 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/hollegha/code/TLV320HL/#808bb0b9cf45
diff -r 000000000000 -r 78b884c496bc TalkThrough.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/TalkThrough.cpp	Wed Oct 22 09:26:39 2014 +0000
@@ -0,0 +1,35 @@
+#include "mbed.h"
+#include "TLV320HL.h"
+
+const float F_SAMPLE = 32000.0;
+const float F_SAMPLE_IST = 31251;
+
+//           tx_sda tx_ws clk rx_sda rx_ws
+I2SSlave i2s(p5,    p6,   p7, p8,    p29);
+//         sda scl  addr
+TLV320 tlv(p9, p10, 52, &i2s);
+
+void I2S_ISR();
+
+int main()
+{
+    tlv.Init(F_SAMPLE);
+    i2s.attach(&I2S_ISR);
+    i2s.Start();
+    while(1) {
+    }
+}
+
+void I2S_ISR()
+{
+    int32_t left, right;
+    // for(int i=1; i<=1; i++) 32kHz ISR-Load
+    // for(int i=1; i<=8; i++) 4kHz ISR-Load
+    for(int i=1; i<=8; i++) {
+        i2s.Read(&left, &right);
+        // Do DSP
+        i2s.Write(left, left);
+    }
+}
+
+
diff -r 000000000000 -r 78b884c496bc mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Oct 22 09:26:39 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file