From 91dbfbbeb15d11b3dea30dd0246697104ba9f1b0 Mon Sep 17 00:00:00 2001 From: di0ib Date: Fri, 30 Sep 2016 16:11:28 -1000 Subject: [PATCH] update for action_t --- keyboard/i75_TeensyLC/keymap_common.c | 13 ------------- keyboard/i75_TeensyLC/keymap_common.h | 5 ----- keyboard/i75_TeensyLC/keymap_i75.c | 4 ---- keyboard/stm32_f103_planck/keymap_common.c | 13 ------------- keyboard/stm32_f103_planck/keymap_common.h | 5 ----- keyboard/stm32_f103_planck/keymap_planck.c | 2 +- keyboard/teensy_lc_planck/keymap_common.c | 13 ------------- keyboard/teensy_lc_planck/keymap_planck.c | 2 +- keyboard/teensy_lc_tv44/keymap_common.c | 13 ------------- keyboard/teensy_lc_tv44/keymap_common.h | 5 ----- keyboard/teensy_lc_tv44/keymap_tv44.c | 2 +- 11 files changed, 3 insertions(+), 74 deletions(-) diff --git a/keyboard/i75_TeensyLC/keymap_common.c b/keyboard/i75_TeensyLC/keymap_common.c index fdb1769e..339a8a59 100644 --- a/keyboard/i75_TeensyLC/keymap_common.c +++ b/keyboard/i75_TeensyLC/keymap_common.c @@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/i75_TeensyLC/keymap_common.h b/keyboard/i75_TeensyLC/keymap_common.h index 7fa71021..72ebc879 100644 --- a/keyboard/i75_TeensyLC/keymap_common.h +++ b/keyboard/i75_TeensyLC/keymap_common.h @@ -29,11 +29,6 @@ along with this program. If not, see . #include "debug.h" #include "keymap.h" - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - /* i75 keymap definition macro */ #define KEYMAP( \ diff --git a/keyboard/i75_TeensyLC/keymap_i75.c b/keyboard/i75_TeensyLC/keymap_i75.c index c36c470b..e5646104 100644 --- a/keyboard/i75_TeensyLC/keymap_i75.c +++ b/keyboard/i75_TeensyLC/keymap_i75.c @@ -21,7 +21,3 @@ KEYMAP( const action_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_MOMENTARY(1), }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - -} diff --git a/keyboard/stm32_f103_planck/keymap_common.c b/keyboard/stm32_f103_planck/keymap_common.c index fdb1769e..339a8a59 100644 --- a/keyboard/stm32_f103_planck/keymap_common.c +++ b/keyboard/stm32_f103_planck/keymap_common.c @@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/stm32_f103_planck/keymap_common.h b/keyboard/stm32_f103_planck/keymap_common.h index ae2d84ae..bdf0b1b7 100644 --- a/keyboard/stm32_f103_planck/keymap_common.h +++ b/keyboard/stm32_f103_planck/keymap_common.h @@ -29,11 +29,6 @@ along with this program. If not, see . #include "debug.h" #include "keymap.h" - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - /* TV44 keymap definition macro */ #define KEYMAP( \ diff --git a/keyboard/stm32_f103_planck/keymap_planck.c b/keyboard/stm32_f103_planck/keymap_planck.c index 8ccf98ae..cf7a8ba5 100644 --- a/keyboard/stm32_f103_planck/keymap_planck.c +++ b/keyboard/stm32_f103_planck/keymap_planck.c @@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), }; -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), diff --git a/keyboard/teensy_lc_planck/keymap_common.c b/keyboard/teensy_lc_planck/keymap_common.c index fdb1769e..339a8a59 100644 --- a/keyboard/teensy_lc_planck/keymap_common.c +++ b/keyboard/teensy_lc_planck/keymap_common.c @@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/teensy_lc_planck/keymap_planck.c b/keyboard/teensy_lc_planck/keymap_planck.c index 2250fd71..cee18091 100644 --- a/keyboard/teensy_lc_planck/keymap_planck.c +++ b/keyboard/teensy_lc_planck/keymap_planck.c @@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END), }; -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC), diff --git a/keyboard/teensy_lc_tv44/keymap_common.c b/keyboard/teensy_lc_tv44/keymap_common.c index fdb1769e..339a8a59 100644 --- a/keyboard/teensy_lc_tv44/keymap_common.c +++ b/keyboard/teensy_lc_tv44/keymap_common.c @@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/teensy_lc_tv44/keymap_common.h b/keyboard/teensy_lc_tv44/keymap_common.h index 9fa9b455..54666d48 100644 --- a/keyboard/teensy_lc_tv44/keymap_common.h +++ b/keyboard/teensy_lc_tv44/keymap_common.h @@ -29,11 +29,6 @@ along with this program. If not, see . #include "debug.h" #include "keymap.h" - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - /* TV44 keymap definition macro */ #define KEYMAP( \ diff --git a/keyboard/teensy_lc_tv44/keymap_tv44.c b/keyboard/teensy_lc_tv44/keymap_tv44.c index a0143c45..2eae39c7 100644 --- a/keyboard/teensy_lc_tv44/keymap_tv44.c +++ b/keyboard/teensy_lc_tv44/keymap_tv44.c @@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT), }; -const uint16_t PROGMEM fn_actions[] = { +const action_t PROGMEM fn_actions[] = { [0] = ACTION_LAYER_TAP_KEY(3, KC_TAB), [1] = ACTION_LAYER_TAP_KEY(1, KC_SPC), [2] = ACTION_LAYER_TAP_KEY(2, KC_SPC),