A version of the PS/2 library customized for MbedConsole. Also includes a few things that make it's behavior easier to control and a few bug fixes.

Dependents:   MbedConsole

Fork of PS2 by Shinichiro Nakamura

Files at this revision

API Documentation at this revision

Comitter:
earlz
Date:
Fri Sep 28 04:03:35 2012 +0000
Parent:
4:fc7f4cc9fbe8
Commit message:
Changed interrupt priority and initialization to use keyboard defaults

Changed in this revision

PS2KB.cpp Show annotated file Show diff for this revision Revisions of this file
PS2KB_INIT.cpp Show annotated file Show diff for this revision Revisions of this file
PS2Keyboard.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r fc7f4cc9fbe8 -r ead90ca02b18 PS2KB.cpp
--- a/PS2KB.cpp	Wed Sep 26 05:21:38 2012 +0000
+++ b/PS2KB.cpp	Fri Sep 28 04:03:35 2012 +0000
@@ -6,7 +6,7 @@
  */
 
 #include "PS2KB.h"
-#include "nvic.h"
+//#include "nvic.h"
 /**
  * Create.
  *
@@ -67,7 +67,7 @@
 }
 */
 void PS2KB::func_fall(void) {
-    NVIC_SetPriority( EINT3_IRQn, 255 ); 
+    //NVIC_SetPriority( EINT3_IRQn, 255 ); 
     int oddpar = 0;
     /*
      */
diff -r fc7f4cc9fbe8 -r ead90ca02b18 PS2KB_INIT.cpp
--- a/PS2KB_INIT.cpp	Wed Sep 26 05:21:38 2012 +0000
+++ b/PS2KB_INIT.cpp	Fri Sep 28 04:03:35 2012 +0000
@@ -21,9 +21,11 @@
      * 0xED: Set/Reset status indicators.
      * 0xF2: Read ID.
      * 0xF3: Set typematic rate/delay.
+     * 0xF0: Set scancode set
      * 0xF4: Enable.
      */
-    char txdat[12] = "\xFF\xED\x07\xF2\xED\x00\xF3\x20\xF3\x00\xF4";
+    //char txdat[15] = "\xFF\xED\x07\xF2\xED\x00\xF3\x20\xF3\x00\xF4";
+    char txdat[6] = "\xFF\xF5\xF0\x02\xF4";
     const int n = sizeof(txdat);
     int txerrcnt = 0;
     int rxerrcnt = 0;
diff -r fc7f4cc9fbe8 -r ead90ca02b18 PS2Keyboard.cpp
--- a/PS2Keyboard.cpp	Wed Sep 26 05:21:38 2012 +0000
+++ b/PS2Keyboard.cpp	Fri Sep 28 04:03:35 2012 +0000
@@ -17,7 +17,7 @@
 bool PS2Keyboard::processing(keyboard_event_t *p) {
     bool emit = false;
     const int c = ' ';//ps2kb.getc();
-    NVIC_SetPriority( EINT3_IRQn, 255 ); 
+    //NVIC_SetPriority( EINT3_IRQn, 2 ); 
     //printf("character: %x\r\n", c);
     if (0 <= c) {
         //printf("Count: %i\r\n", count);