USBAudio Hello World

Dependencies:   mbed USBDevice

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Sun Oct 14 13:24:52 2012 +0000
Parent:
2:6a0a685c93e5
Child:
4:d7e8697d8bd3
Commit message:
use mbed official USBDevice library

Changed in this revision

USBDevice.lib Show annotated file Show diff for this revision Revisions of this file
main.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
--- a/USBDevice.lib	Wed Nov 30 10:45:30 2011 +0000
+++ b/USBDevice.lib	Sun Oct 14 13:24:52 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/USBDevice/#65a34d6b5e22
+http://mbed.org/users/mbed_official/code/USBDevice/#6d85e04fb59f
--- a/main.cpp	Wed Nov 30 10:45:30 2011 +0000
+++ b/main.cpp	Sun Oct 14 13:24:52 2012 +0000
@@ -1,29 +1,29 @@
 // Hello World example for the USBAudio library
-
+ 
 #include "mbed.h"
 #include "USBAudio.h"
-
+ 
 Serial pc(USBTX, USBRX);
-
+ 
 // frequency: 48 kHz
 #define FREQ 48000
-
+ 
 // 1 channel: mono
 #define NB_CHA 1
-
+ 
 // length of an audio packet: each ms, we receive 48 * 16bits ->48 * 2 bytes. as there is one channel, the length will be 48 * 2 * 1
 #define AUDIO_LENGTH_PACKET 48 * 2 * 1
-
+ 
 // USBAudio
 USBAudio audio(FREQ, NB_CHA);
-
+ 
 int main() {
     int16_t buf[AUDIO_LENGTH_PACKET/2];
     
     while (1) {
         // read an audio packet
         audio.read((uint8_t *)buf);
-
+ 
         // print packet received
         pc.printf("recv: ");
         for(int i = 0; i < AUDIO_LENGTH_PACKET/2; i++) {
@@ -31,4 +31,4 @@
         }
         pc.printf("\r\n");
     }
-}
+}
\ No newline at end of file
--- a/mbed.bld	Wed Nov 30 10:45:30 2011 +0000
+++ b/mbed.bld	Sun Oct 14 13:24:52 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/7110ebee3484
+http://mbed.org/users/mbed_official/code/mbed/builds/cd19af002ccc
\ No newline at end of file