]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
DPH controller now working with macros/layers
authorJacob Alexander <haata@kiibohd.com>
Tue, 16 Sep 2014 18:42:24 +0000 (11:42 -0700)
committerJacob Alexander <haata@kiibohd.com>
Tue, 16 Sep 2014 18:42:50 +0000 (11:42 -0700)
- Still working on USB NKRO

CMakeLists.txt
Output/pjrcUSB/avr/usb_keyboard_serial.c
Output/pjrcUSB/output_com.c

index 97e4df3764af781394041b4ec87f904eaf481e31..e8653435d13b15b6e480eb933d6602a4700ffa0e 100644 (file)
@@ -20,9 +20,9 @@ set( CHIP
 #      "at90usb162"       # Teensy   1.0 (avr)
 #      "atmega32u4"       # Teensy   2.0 (avr)
 #      "at90usb646"       # Teensy++ 1.0 (avr)
-#      "at90usb1286"      # Teensy++ 2.0 (avr)
+       "at90usb1286"      # Teensy++ 2.0 (avr)
 #      "mk20dx128"        # Teensy   3.0 (arm)
-       "mk20dx128vlf5"    # McHCK    mk20dx128vlf5
+#      "mk20dx128vlf5"    # McHCK    mk20dx128vlf5
 #      "mk20dx256"        # Teensy   3.1 (arm)
 )
 
@@ -48,7 +48,8 @@ include( initialize )
 #| Please look at the {Scan,Macro,Output,Debug} for information on the modules and how to create new ones
 
 ##| Deals with acquiring the keypress information and turning it into a key index
-set(   ScanModule "MD1" )
+set(   ScanModule "DPH" )
+#set(   ScanModule "MD1" )
 
 ##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule
 set(  MacroModule "PartialMap" )
@@ -88,7 +89,8 @@ set(  DebugModule "full" )
 ##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
 ##| Looks in Scan/<Module Name> for the available BaseMaps
 ##| TODO Support layering in basemap
-set(     BaseMap "defaultMap" )
+set(     BaseMap "50Key" )
+#set(     BaseMap "defaultMap" )
 
 ##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth
 ##| Can be set to ""
@@ -96,7 +98,8 @@ set(  DefaultMap "colemak stdFuncMap" )
 
 ##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering
 ##| Can be set to ""
-set( PartialMaps "hhkbpro2" )
+set( PartialMaps "" )
+#set( PartialMaps "hhkbpro2" )
 
 
 
@@ -127,7 +130,7 @@ cmake_minimum_required( VERSION 2.8 )
 ###
 # Module Initialization / Compilation / Targets
 #
-include( Lib/CMake/modules.cmake )
-include( Lib/CMake/kll.cmake ) # Generate kll layouts if necessary
-include( Lib/CMake/build.cmake )
+include( modules )
+include( kll ) # Generate kll layouts if necessary
+include( build )
 
index ee34c780aa9fe7ec12db65aa70717ec0f128af46..f96ac0e6cb159f1262a4680e2a81cc0692f12a82 100644 (file)
@@ -24,6 +24,7 @@
 
 // Local Includes
 #include "usb_keyboard_serial.h"
+#include <print.h>
 
 
 // ----- Variables -----
@@ -54,6 +55,9 @@ void usb_keyboard_toHost()
        // Modifiers
        UEDATX = USBKeys_Modifiers;
 
+       // LED Report spacer
+       USBKeys_LEDs = 0;
+
        // Normal Keys
        for ( i = 0; i < 6; i++)
        {
@@ -111,13 +115,14 @@ int8_t usb_keyboard_send()
                cli();
 
                // If not using Boot protocol, send NKRO
-               UENUM = USBKeys_Protocol ? KEYBOARD_NKRO_ENDPOINT : KEYBOARD_ENDPOINT;
+               UENUM = KEYBOARD_ENDPOINT;
+               //UENUM = USBKeys_Protocol ? KEYBOARD_NKRO_ENDPOINT : KEYBOARD_ENDPOINT;
        } while ( !( UEINTX & (1 << RWAL) ) );
 
        // Send normal keyboard interrupt packet(s)
-       switch ( USBKeys_Protocol )
-       {
-       }
+       //switch ( USBKeys_Protocol )
+       //{
+       //}
        usb_keyboard_toHost();
 
        USBKeys_Idle_Count = 0;
@@ -618,6 +623,7 @@ ISR( USB_GEN_vect )
                                // From hasu's code, this section looks like it could fix the Mac SET_IDLE problem
                                // Send normal keyboard interrupt packet(s)
                                //usb_keyboard_toHost();
+                               print("IDLE");
                        }
                }
        }
@@ -775,7 +781,8 @@ ISR(USB_COM_vect)
 
                                        // XXX TODO Is this even used? If so, when? -Jacob
                                        // Send normal keyboard interrupt packet(s)
-                                       //usb_keyboard_toHost();
+                                       usb_keyboard_toHost();
+                                       //print("GET REPORT");
 
                                        usb_send_in();
                                        return;
@@ -794,7 +801,6 @@ ISR(USB_COM_vect)
                                        usb_send_in();
                                        return;
                                }
-                       USBKeys_Protocol = bRequest;
                        }
                        if ( bmRequestType == 0x21 )
                        {
index 35e0603e36dfa71331e4b63d1e8189ad30011aa2..305b6360eb4db8a41673821bc18bc575790cc344 100644 (file)
@@ -245,7 +245,7 @@ void cliFunc_kbdProtocol( char* args )
 void cliFunc_readLEDs( char* args )
 {
        print( NL );
-       info_msg("LED State (This doesn't work yet...): ");
+       info_msg("LED State: ");
        printInt8( USBKeys_LEDs );
 }