first release for keyboard

Dependencies:   F401RE-USBHost2 mbed

Files at this revision

API Documentation at this revision

Comitter:
Ownasaurus
Date:
Mon May 29 14:51:08 2017 +0000
Parent:
3:342742bab6f7
Commit message:
fix for certain types of keyboards

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
diff -r 342742bab6f7 -r dbb0d3d2ad8b main.cpp
--- a/main.cpp	Wed Dec 28 23:23:18 2016 +0000
+++ b/main.cpp	Mon May 29 14:51:08 2017 +0000
@@ -356,9 +356,9 @@
         // keyboard buttons are stored in cells 2 3 4 5 6 7?  cell 0 and 1 are modifiers?  cell8 is an F?    
         for(int index = 2;index < 8;index++)
         {
-            if(rep[index] == 0) // no more keys to process
+            if(rep[index] == 0) // no key to process
             {
-                break;
+                continue;
             }        
             if(rep[index] == kc.KEYBOARD_a)
             {
@@ -433,7 +433,8 @@
             // NOTE: THESE BITS MUST BE WRITTEN IN REVERSE ORDER.  HIGH BIT IS IN THE LOW POSITION
             if(rep[index] == kc.KEYBOARD_a_up)
             {
-                n64_data.y_axis = 0x0A; // 80(dec) bit reversed
+                //n64_data.y_axis = 0x0A; // 80(dec) bit reversed
+                n64_data.y_axis = 0xB4; // 2D = 45 = 35% = no tap jump.  bit reverse 2D (00101101) to get B4 (10110100)
                 continue;
             }
             if(rep[index] == kc.KEYBOARD_a_down)