changeset 212:2794931a4d30

DPH controller now working with macros/layers - Still working on USB NKRO
author Jacob Alexander <haata@kiibohd.com>
date Tue, 16 Sep 2014 11:42:24 -0700
parents a26c2e571659
children 2f6ec276a678
files CMakeLists.txt Output/pjrcUSB/avr/usb_keyboard_serial.c Output/pjrcUSB/output_com.c
diffstat 3 files changed, 24 insertions(+), 15 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Sep 15 20:19:40 2014 -0700
+++ b/CMakeLists.txt	Tue Sep 16 11:42:24 2014 -0700
@@ -20,9 +20,9 @@
 #	"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 @@
 #| 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 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 @@
 
 ##| 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 @@
 ###
 # 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 )
 
--- a/Output/pjrcUSB/avr/usb_keyboard_serial.c	Mon Sep 15 20:19:40 2014 -0700
+++ b/Output/pjrcUSB/avr/usb_keyboard_serial.c	Tue Sep 16 11:42:24 2014 -0700
@@ -24,6 +24,7 @@
 
 // Local Includes
 #include "usb_keyboard_serial.h"
+#include <print.h>
 
 
 // ----- Variables -----
@@ -54,6 +55,9 @@
 	// Modifiers
 	UEDATX = USBKeys_Modifiers;
 
+	// LED Report spacer
+	USBKeys_LEDs = 0;
+
 	// Normal Keys
 	for ( i = 0; i < 6; i++)
 	{
@@ -111,13 +115,14 @@
 		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 @@
 				// 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 @@
 
 					// 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 @@
 					usb_send_in();
 					return;
 				}
-			USBKeys_Protocol = bRequest;
 			}
 			if ( bmRequestType == 0x21 )
 			{
--- a/Output/pjrcUSB/output_com.c	Mon Sep 15 20:19:40 2014 -0700
+++ b/Output/pjrcUSB/output_com.c	Tue Sep 16 11:42:24 2014 -0700
@@ -245,7 +245,7 @@
 void cliFunc_readLEDs( char* args )
 {
 	print( NL );
-	info_msg("LED State (This doesn't work yet...): ");
+	info_msg("LED State: ");
 	printInt8( USBKeys_LEDs );
 }