Dependencies:   PS2 mbed

Files at this revision

API Documentation at this revision

Comitter:
tim007
Date:
Thu May 29 15:15:46 2014 +0000
Commit message:
Ensarharis

Changed in this revision

PS2.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
diff -r 000000000000 -r 144f385993f0 PS2.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PS2.lib	Thu May 29 15:15:46 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/shintamainjp/code/PS2/#a57bbbec16b1
diff -r 000000000000 -r 144f385993f0 main.cpp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu May 29 15:15:46 2014 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "PS2Mouse.h"
+
+DigitalOut myled(LED1);
+Serial pc(USBTX,USBRX);
+PS2Mouse::mouse_event_t evt_ms;
+Ticker t;
+
+PS2Mouse ps2ms(dp9, dp10);
+void ispis()
+{
+    pc.printf("%c%c%c:%4d,%4d,%2d\n",
+                evt_ms.left ? 'L' : '.',
+                evt_ms.center ? 'C' : '.',
+                evt_ms.right ? 'R' : '.',
+                evt_ms.x, evt_ms.y, evt_ms.z);
+    }
+    
+
+
+int main() {
+    t.attach(&ispis,0.2);
+    while (1) {
+        // (ps2ms.processing(&evt_ms)) {
+          
+        }
+}
diff -r 000000000000 -r 144f385993f0 mbed.bld
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu May 29 15:15:46 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/0b3ab51c8877
\ No newline at end of file