DPH controller now working with macros/layers
- Still working on USB NKRO
This commit is contained in:
parent
d405af0435
commit
733a9f26b6
@ -20,9 +20,9 @@ set( CHIP
|
|||||||
# "at90usb162" # Teensy 1.0 (avr)
|
# "at90usb162" # Teensy 1.0 (avr)
|
||||||
# "atmega32u4" # Teensy 2.0 (avr)
|
# "atmega32u4" # Teensy 2.0 (avr)
|
||||||
# "at90usb646" # Teensy++ 1.0 (avr)
|
# "at90usb646" # Teensy++ 1.0 (avr)
|
||||||
# "at90usb1286" # Teensy++ 2.0 (avr)
|
"at90usb1286" # Teensy++ 2.0 (avr)
|
||||||
# "mk20dx128" # Teensy 3.0 (arm)
|
# "mk20dx128" # Teensy 3.0 (arm)
|
||||||
"mk20dx128vlf5" # McHCK mk20dx128vlf5
|
# "mk20dx128vlf5" # McHCK mk20dx128vlf5
|
||||||
# "mk20dx256" # Teensy 3.1 (arm)
|
# "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
|
#| 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
|
##| 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
|
##| Provides the mapping functions for DefaultMap and handles any macro processing before sending to the OutputModule
|
||||||
set( MacroModule "PartialMap" )
|
set( MacroModule "PartialMap" )
|
||||||
@ -88,7 +89,8 @@ set( DebugModule "full" )
|
|||||||
##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
|
##| Set the base keyboard .kll map, defaults to "defaultMap" if not found
|
||||||
##| Looks in Scan/<Module Name> for the available BaseMaps
|
##| Looks in Scan/<Module Name> for the available BaseMaps
|
||||||
##| TODO Support layering in basemap
|
##| 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
|
##| Layer additonal .kll maps on the BaseMap, layers are in order from 1st to nth
|
||||||
##| Can be set to ""
|
##| 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
|
##| ParitalMaps available on top of the BaseMap. See above for syntax on specifying multiple layers vs. layering
|
||||||
##| Can be set to ""
|
##| 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
|
# Module Initialization / Compilation / Targets
|
||||||
#
|
#
|
||||||
include( Lib/CMake/modules.cmake )
|
include( modules )
|
||||||
include( Lib/CMake/kll.cmake ) # Generate kll layouts if necessary
|
include( kll ) # Generate kll layouts if necessary
|
||||||
include( Lib/CMake/build.cmake )
|
include( build )
|
||||||
|
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
// Local Includes
|
// Local Includes
|
||||||
#include "usb_keyboard_serial.h"
|
#include "usb_keyboard_serial.h"
|
||||||
|
#include <print.h>
|
||||||
|
|
||||||
|
|
||||||
// ----- Variables -----
|
// ----- Variables -----
|
||||||
@ -54,6 +55,9 @@ void usb_keyboard_toHost()
|
|||||||
// Modifiers
|
// Modifiers
|
||||||
UEDATX = USBKeys_Modifiers;
|
UEDATX = USBKeys_Modifiers;
|
||||||
|
|
||||||
|
// LED Report spacer
|
||||||
|
USBKeys_LEDs = 0;
|
||||||
|
|
||||||
// Normal Keys
|
// Normal Keys
|
||||||
for ( i = 0; i < 6; i++)
|
for ( i = 0; i < 6; i++)
|
||||||
{
|
{
|
||||||
@ -111,13 +115,14 @@ int8_t usb_keyboard_send()
|
|||||||
cli();
|
cli();
|
||||||
|
|
||||||
// If not using Boot protocol, send NKRO
|
// 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) ) );
|
} while ( !( UEINTX & (1 << RWAL) ) );
|
||||||
|
|
||||||
// Send normal keyboard interrupt packet(s)
|
// Send normal keyboard interrupt packet(s)
|
||||||
switch ( USBKeys_Protocol )
|
//switch ( USBKeys_Protocol )
|
||||||
{
|
//{
|
||||||
}
|
//}
|
||||||
usb_keyboard_toHost();
|
usb_keyboard_toHost();
|
||||||
|
|
||||||
USBKeys_Idle_Count = 0;
|
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
|
// From hasu's code, this section looks like it could fix the Mac SET_IDLE problem
|
||||||
// Send normal keyboard interrupt packet(s)
|
// Send normal keyboard interrupt packet(s)
|
||||||
//usb_keyboard_toHost();
|
//usb_keyboard_toHost();
|
||||||
|
print("IDLE");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -775,7 +781,8 @@ ISR(USB_COM_vect)
|
|||||||
|
|
||||||
// XXX TODO Is this even used? If so, when? -Jacob
|
// XXX TODO Is this even used? If so, when? -Jacob
|
||||||
// Send normal keyboard interrupt packet(s)
|
// Send normal keyboard interrupt packet(s)
|
||||||
//usb_keyboard_toHost();
|
usb_keyboard_toHost();
|
||||||
|
//print("GET REPORT");
|
||||||
|
|
||||||
usb_send_in();
|
usb_send_in();
|
||||||
return;
|
return;
|
||||||
@ -794,7 +801,6 @@ ISR(USB_COM_vect)
|
|||||||
usb_send_in();
|
usb_send_in();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
USBKeys_Protocol = bRequest;
|
|
||||||
}
|
}
|
||||||
if ( bmRequestType == 0x21 )
|
if ( bmRequestType == 0x21 )
|
||||||
{
|
{
|
||||||
|
@ -245,7 +245,7 @@ void cliFunc_kbdProtocol( char* args )
|
|||||||
void cliFunc_readLEDs( char* args )
|
void cliFunc_readLEDs( char* args )
|
||||||
{
|
{
|
||||||
print( NL );
|
print( NL );
|
||||||
info_msg("LED State (This doesn't work yet...): ");
|
info_msg("LED State: ");
|
||||||
printInt8( USBKeys_LEDs );
|
printInt8( USBKeys_LEDs );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user