]> git.donarmstrong.com Git - kiibohd-controller.git/commitdiff
Fixing the macro section for the Bud Keypad
authorJacob Alexander <triplehaata@gmail.com>
Mon, 13 Feb 2012 19:04:53 +0000 (14:04 -0500)
committerJacob Alexander <triplehaata@gmail.com>
Mon, 13 Feb 2012 19:04:53 +0000 (14:04 -0500)
Macro/buffer/macro.c
USB/pjrc/usb_keyboard_debug.c
setup.cmake

index 2d031542450e2ef8927c70c7dc08838221302ea9..23e5138bb4608bef721e6a16931137607ae43e12 100644 (file)
@@ -215,7 +215,7 @@ int scancodeMacro( uint8_t scanCode )
        }
        return 1;
        */
-       /* BudKeypad
+       // BudKeypad
        // Is this a bootloader sequence key?
        if ( !Bootloader_KeyDetected
           && Bootloader_NextPositionReady
@@ -224,12 +224,23 @@ int scancodeMacro( uint8_t scanCode )
                Bootloader_KeyDetected = 1;
                Bootloader_NextPositionReady = 0;
                Bootloader_ConditionState++;
+               erro_dPrint("detect");
        }
        else if ( Bootloader_ConditionState > 0 && scanCode == Bootloader_ConditionSequence[Bootloader_ConditionState - 1] )
        {
-               Bootloader_KeyDetected = 1;
+               Bootloader_KeyDetected = 0;
+               Bootloader_NextPositionReady = 1;
+               erro_dPrint("detect-again!");
        }
-       */
+       // Cancel sequence
+       else
+       {
+               Bootloader_KeyDetected = 0;
+               Bootloader_NextPositionReady = 1;
+               Bootloader_ConditionState = 0;
+               erro_dPrint("Arg");
+       }
+
        return 0;
 }
 
@@ -349,7 +360,7 @@ inline void process_macros(void)
        keyPressBufferRead( MODIFIER_MASK, sizeof(MODIFIER_MASK), KEYINDEX_MASK );
 
        // Check for bootloader condition
-       //if ( Bootloader_ConditionState == sizeof( Bootloader_ConditionSequence ) )
-       //      jumpToBootloader();
+       if ( Bootloader_ConditionState == sizeof( Bootloader_ConditionSequence ) )
+               jumpToBootloader();
 }
 
index 6aec93f98ea3197aac0d5857148bc3c9f436320b..1043e6ac1ebcb7369e0347d9d5215b4a3b670f10 100644 (file)
@@ -135,8 +135,8 @@ static const uint8_t PROGMEM keyboard_hid_report_desc[] = {
 };
 
 static const uint8_t PROGMEM debug_hid_report_desc[] = {
-       0x06, 0x30, 0xFF,                       // Usage Page 0xFF31 (vendor defined)
-       //0x06, 0x31, 0xFF,                     // Usage Page 0xFF31 (vendor defined)
+       //0x06, 0x30, 0xFF,                     // Usage Page 0xFF31 (vendor defined)
+       0x06, 0x31, 0xFF,                       // Usage Page 0xFF31 (vendor defined)
        0x09, 0x74,                             // Usage 0x74
        0xA1, 0x53,                             // Collection 0x53
        0x75, 0x08,                             // report size = 8 bits
index 39a50bfff0c3d79f0cbeba3f6effa1cd43f2b7e5..c3eb2a25c06d88048833bebe0e775db06cab1b73 100644 (file)
@@ -20,7 +20,7 @@
 #| Please the {Scan,Macro,USB,Debug}/module.txt 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  "SonyNEWS" )
+set(  ScanModule  "BudKeypad" )
 
 ##| Uses the key index and potentially applies special conditions to it, mapping it to a usb key code
 set( MacroModule  "buffer"  )