AppleRemote receive library.

Files at this revision

API Documentation at this revision

Comitter:
tosihisa
Date:
Sat Oct 09 09:39:45 2010 +0000
Parent:
0:a5f26ed3f510
Commit message:
Release for library

Changed in this revision

main.cpp Show diff for this revision Revisions of this file
mbed.bld Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Aug 08 11:19:56 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-#include "mbed.h"
-#include "AppleRemote.h"
-
-Serial pc(USBTX, USBRX);
-AppleRemote remote(p5);
-
-int main() {
-
-    pc.baud(115200);
-    remote.start();
-    //remote.repeat(1);
-
-    while(1) {
-        if(remote.readable()){
-            int code;
-            code = remote.getc() & 0x0ff;
-            pc.printf("code = %02X ",code);
-            switch(code){
-                /* --- */
-                case AppleRemote::MENU_1ST:   pc.printf("Menu (1st generation)\n"); break;
-                case AppleRemote::PLAY_1ST:   pc.printf("Play (1st generation)\n"); break;
-                case AppleRemote::RIGHT_1ST:  pc.printf("Right (1st generation)\n"); break;
-                case AppleRemote::LEFT_1ST:   pc.printf("Left (1st generation)\n"); break;
-                case AppleRemote::UP_1ST:     pc.printf("Up (1st generation)\n"); break;
-                case AppleRemote::DOWN_1ST:   pc.printf("DOWN (1st generation)\n"); break;
-                /* --- */
-                case AppleRemote::CENTER_2ND: pc.printf("Center (2nd generation)\n"); break;
-                case AppleRemote::MENU_2ND:   pc.printf("Menu (2nd generation)\n"); break;
-                case AppleRemote::PLAY_2ND:   pc.printf("Play (2nd generation)\n"); break;
-                case AppleRemote::RIGHT_2ND:  pc.printf("Right (2nd generation)\n"); break;
-                case AppleRemote::LEFT_2ND:   pc.printf("Left (2nd generation)\n"); break;
-                case AppleRemote::UP_2ND:     pc.printf("Up (2nd generation)\n"); break;
-                case AppleRemote::DOWN_2ND:   pc.printf("DOWN (2nd generation)\n"); break;
-                default: pc.printf("*** UNKNOWN ***\n"); break;
-            }
-        }
-    }
-}
--- a/mbed.bld	Sun Aug 08 11:19:56 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/9114680c05da