From 419002a63b1824e6da61d802bcb6f6ab5b35def6 Mon Sep 17 00:00:00 2001 From: "Blake C. Lewis" Date: Wed, 19 Feb 2020 03:12:52 -0600 Subject: [Keyboard] KC60SE cleanup (#8171) * coding style cleanup, enable/disable misconfigured/broken features * add SCLN missing, compile with backlight PWM warning * edit json * new info.json from KLE * new info.json from KLE using QMK converter * changes notes * notes in pull request * missing line in comments * line wrap * Update keyboards/kc60se/config.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/keymaps/default/keymap.c Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/rules.mk Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/readme.md Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * comment back in rules.mk * add 2 iso layouts and keymaps, 1 ansi kemap, compiled and tested * keymaps and info * Delete keymap.c not ready, I need to get a few iso characters corrected * Delete keymap.c not ready, need to get a few iso character define correctly * Update info.json Bspc to Backspace * no unicode * gui_on and gui_off in readme * Update keyboards/kc60se/rules.mk Co-Authored-By: fauxpark * remove is_command * Update keyboards/kc60se/config.h remove comment Co-Authored-By: fauxpark * Update keyboards/kc60se/config.h Co-Authored-By: fauxpark * Update keyboards/kc60se/readme.md Co-Authored-By: fauxpark * remove \\ in keymaps * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/kc60se.h Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * Update keyboards/kc60se/info.json Co-Authored-By: James Young <18669334+noroadsleft@users.noreply.github.com> * set led pin b2 to output mode in matrix_init_kb(), toggle it in led_update_kb() * Update config.h I had commented FORCE_NKRO out.. WHy did it com back? Co-authored-by: Check your git settings! Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Ryan --- keyboards/kc60se/kc60se.h | 82 +++++++++++++++++++++++++++-------------------- 1 file changed, 47 insertions(+), 35 deletions(-) (limited to 'keyboards/kc60se/kc60se.h') diff --git a/keyboards/kc60se/kc60se.h b/keyboards/kc60se/kc60se.h index b57f12a450..0277e3a905 100644 --- a/keyboards/kc60se/kc60se.h +++ b/keyboards/kc60se/kc60se.h @@ -13,28 +13,20 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#ifndef KC60SE_H -#define KC60SE_H + +#pragma once #include "quantum.h" -// readability #define ___ KC_NO -inline void kc60se_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } -inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } - -/* kc60se keymap definition macro - * K2C, K31 and K3C are keys for ISO - * This is the row/column wiring, which different from the physical layout. - */ -// All pads defined in logical layout. The ___ in this section are padless. -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +// clang-format off +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -43,13 +35,12 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K40, K41, K42, ___, ___, K45, ___, ___, ___, K49, K4A, K4B, K4C, K4D } \ } -/* ANSI */ #define LAYOUT_60_ansi( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -58,17 +49,12 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K40, K41, K42, ___, ___, K45, ___, ___, ___, ___, K4A, K4B, K4C, K4D } \ } -/* HHKB - * K2C & K31 are represented as ___, otherwise this is - * the best representation of the physical layout, (K49 on top right). - * The ___s on the space row do not have pads - */ #define LAYOUT_60_ansi_split_bs_rshift( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ - K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ ) { \ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ @@ -76,6 +62,32 @@ inline void kc60se_caps_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } { K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ { K40, K41, K42, ___, ___, K45, ___, ___, ___, K49, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___ }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, ___, K3D }, \ + { K40, K41, K42, ___, ___, K45, ___, ___, ___, ___, K4A, K4B, K4C, K4D } \ +} - -#endif +#define LAYOUT_60_iso_split_bs_rshift( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, k49, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3C, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ +){ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, ___ }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, ___, ___, K45, ___, ___, ___, k49, K4A, K4B, K4C, K4D } \ +} +#define LAYOUT LAYOUT_all +// clang-format on -- cgit v1.2.3