Merge branch 'master' into chibios
This commit is contained in:
commit
b388269407
21 changed files with 148 additions and 39 deletions
|
|
@ -266,7 +266,7 @@ enum layer_pram_tap_op {
|
|||
#define ACTION_LAYER_ON_OFF(layer) ACTION_LAYER_TAP((layer), OP_ON_OFF)
|
||||
#define ACTION_LAYER_OFF_ON(layer) ACTION_LAYER_TAP((layer), OP_OFF_ON)
|
||||
#define ACTION_LAYER_SET_CLEAR(layer) ACTION_LAYER_TAP((layer), OP_SET_CLEAR)
|
||||
#define ACTION_LAYER_MODS(layer, mods) ACTION_LAYER_TAP((layer), 0xe0 | (mods)&0x0f)
|
||||
#define ACTION_LAYER_MODS(layer, mods) ACTION_LAYER_TAP((layer), 0xe0 | ((mods)&0x0f))
|
||||
/* With Tapping */
|
||||
#define ACTION_LAYER_TAP_KEY(layer, key) ACTION_LAYER_TAP((layer), (key))
|
||||
#define ACTION_LAYER_TAP_TOGGLE(layer) ACTION_LAYER_TAP((layer), OP_TAP_TOGGLE)
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ void action_macro_play(const macro_t *macro_p)
|
|||
dprintf("KEY_DOWN(%02X)\n", macro);
|
||||
if (IS_MOD(macro)) {
|
||||
add_weak_mods(MOD_BIT(macro));
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
register_code(macro);
|
||||
}
|
||||
|
|
@ -51,6 +52,7 @@ void action_macro_play(const macro_t *macro_p)
|
|||
dprintf("KEY_UP(%02X)\n", macro);
|
||||
if (IS_MOD(macro)) {
|
||||
del_weak_mods(MOD_BIT(macro));
|
||||
send_keyboard_report();
|
||||
} else {
|
||||
unregister_code(macro);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ void send_keyboard_report(void) {
|
|||
void add_key(uint8_t key)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_nkro) {
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
add_key_bit(key);
|
||||
return;
|
||||
}
|
||||
|
|
@ -87,7 +87,7 @@ void add_key(uint8_t key)
|
|||
void del_key(uint8_t key)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_nkro) {
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
del_key_bit(key);
|
||||
return;
|
||||
}
|
||||
|
|
@ -160,7 +160,7 @@ uint8_t has_anymod(void)
|
|||
uint8_t get_first_key(void)
|
||||
{
|
||||
#ifdef NKRO_ENABLE
|
||||
if (keyboard_nkro) {
|
||||
if (keyboard_protocol && keyboard_nkro) {
|
||||
uint8_t i = 0;
|
||||
for (; i < KEYBOARD_REPORT_BITS && !keyboard_report->nkro.bits[i]; i++)
|
||||
;
|
||||
|
|
|
|||
|
|
@ -232,13 +232,13 @@ static bool command_common(uint8_t code)
|
|||
break;
|
||||
case KC_D:
|
||||
if (debug_enable) {
|
||||
print("\ndebug: on\n");
|
||||
print("\ndebug: off\n");
|
||||
debug_matrix = false;
|
||||
debug_keyboard = false;
|
||||
debug_mouse = false;
|
||||
debug_enable = false;
|
||||
} else {
|
||||
print("\ndebug: off\n");
|
||||
print("\ndebug: on\n");
|
||||
debug_enable = true;
|
||||
}
|
||||
break;
|
||||
|
|
@ -327,6 +327,9 @@ static bool command_common(uint8_t code)
|
|||
print_val_hex8(host_keyboard_leds());
|
||||
print_val_hex8(keyboard_protocol);
|
||||
print_val_hex8(keyboard_idle);
|
||||
#ifdef NKRO_ENABLE
|
||||
print_val_hex8(keyboard_nkro);
|
||||
#endif
|
||||
print_val_hex32(timer_read32());
|
||||
|
||||
#ifdef PROTOCOL_PJRC
|
||||
|
|
|
|||
|
|
@ -156,6 +156,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#define KC_WSTP KC_WWW_STOP
|
||||
#define KC_WREF KC_WWW_REFRESH
|
||||
#define KC_WFAV KC_WWW_FAVORITES
|
||||
/* Jump to bootloader */
|
||||
#define KC_BTLD KC_BOOTLOADER
|
||||
/* Transparent */
|
||||
#define KC_TRANSPARENT 1
|
||||
#define KC_TRNS KC_TRANSPARENT
|
||||
|
|
@ -426,6 +428,9 @@ enum internal_special_keycodes {
|
|||
KC_MEDIA_FAST_FORWARD,
|
||||
KC_MEDIA_REWIND, /* 0xBC */
|
||||
|
||||
/* Jump to bootloader */
|
||||
KC_BOOTLOADER = 0xBF,
|
||||
|
||||
/* Fn key */
|
||||
KC_FN0 = 0xC0,
|
||||
KC_FN1,
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include "action_layer.h"
|
||||
#include "action.h"
|
||||
#include "action_macro.h"
|
||||
#include "wait.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
|
|
@ -146,6 +147,11 @@ static action_t keycode_to_action(uint8_t keycode)
|
|||
case KC_TRNS:
|
||||
action.code = ACTION_TRANSPARENT;
|
||||
break;
|
||||
case KC_BOOTLOADER:
|
||||
clear_keyboard();
|
||||
wait_ms(50);
|
||||
bootloader_jump(); // not return
|
||||
break;
|
||||
default:
|
||||
action.code = ACTION_NO;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue