summaryrefslogtreecommitdiffstats
path: root/keyboards/al1
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-08-15 15:19:01 +1000
committerGitHub <noreply@github.com>2021-08-15 15:19:01 +1000
commit4c93c350a6f399e261a1d2ada2bfe97a838d7dcb (patch)
treeb4273a26ca3b67b768d58eefed8bd24e98f94f44 /keyboards/al1
parentb1d8efeb596cfe088d25948484526e3cf5e6f360 (diff)
AL1 refactor (#13679)
Diffstat (limited to 'keyboards/al1')
-rw-r--r--keyboards/al1/al1.c1
-rw-r--r--keyboards/al1/al1.h58
-rw-r--r--keyboards/al1/config.h112
-rw-r--r--keyboards/al1/info.json221
-rw-r--r--keyboards/al1/keymaps/default/keymap.c45
-rw-r--r--keyboards/al1/keymaps/default/readme.md1
-rw-r--r--keyboards/al1/keymaps/splitbs/keymap.c59
-rw-r--r--keyboards/al1/matrix.c275
-rw-r--r--keyboards/al1/readme.md11
-rw-r--r--keyboards/al1/rules.mk22
10 files changed, 391 insertions, 414 deletions
diff --git a/keyboards/al1/al1.c b/keyboards/al1/al1.c
index 460a7620cf..a7d3980ece 100644
--- a/keyboards/al1/al1.c
+++ b/keyboards/al1/al1.c
@@ -13,4 +13,5 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include "al1.h"
diff --git a/keyboards/al1/al1.h b/keyboards/al1/al1.h
index c313a898d2..6b585cc18a 100644
--- a/keyboards/al1/al1.h
+++ b/keyboards/al1/al1.h
@@ -13,41 +13,39 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef AL1_H
-#define AL1_H
+
+#pragma once
#include "quantum.h"
+#define XXX KC_NO
+
#define LAYOUT( \
- K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K415, K414,\
- K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
- K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
- K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
- K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
-) \
-{ \
- { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
- { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
- { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
- { K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO} \
+ k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k4F, k4E, \
+ k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k2F, k4D, \
+ k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \
+ k53, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k4C, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \
+ { k50, k51, k52, k53, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } \
}
#define LAYOUT_split_bs( \
- K500, K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K512, K012, K013, K014, K015, K415, K414, \
- K501, K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K215, K413,\
- K502, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \
- K503, K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K412,\
- K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 \
-) \
-{ \
- { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015}, \
- { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115}, \
- { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215}, \
- { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315}, \
- { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, K415}, \
- { K500, K501, K502, K503, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K512, KC_NO, KC_NO, KC_NO} \
+ k50, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k5C, k0C, k0D, k0E, k0F, k4F, k4E, \
+ k51, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, k2F, k4D, \
+ k52, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, \
+ k53, k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F, k4C, \
+ k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B \
+) { \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F }, \
+ { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3E, k3F }, \
+ { k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F }, \
+ { k50, k51, k52, k53, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, k5C, XXX, XXX, XXX } \
}
-
-#endif
diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h
index 6f6157c2d0..b003a9cd6c 100644
--- a/keyboards/al1/config.h
+++ b/keyboards/al1/config.h
@@ -15,62 +15,42 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef CONFIG_H
-#define CONFIG_H
+#pragma once
#include "config_common.h"
/* USB Device descriptor parameter */
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6050
-#define DEVICE_VER 0x0104
-#define MANUFACTURER Alsoran
-#define PRODUCT AL1
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6050
+#define DEVICE_VER 0x0104
+#define MANUFACTURER Alsoran
+#define PRODUCT AL1
/* key matrix size */
#define MATRIX_ROWS 7
#define MATRIX_COLS 20
-/*
- * Keyboard Matrix Assignments
- *
- * Change this to how you wired your keyboard
- * COLS: AVR pins used for columns, left to right
- * ROWS: AVR pins used for rows, top to bottom
- * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
- * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
- *
-*/
-
-/* COL2ROW, ROW2COL*/
-#define DIODE_DIRECTION COL2ROW
-
#define LED_NUM_LOCK_PIN D0
#define LED_CAPS_LOCK_PIN B7
#define LED_SCROLL_LOCK_PIN D1
#define LED_PIN_ON_STATE 0
#define BACKLIGHT_PIN B6
-#define BACKLIGHT_BREATHING
#define BACKLIGHT_LEVELS 3
+#define BACKLIGHT_BREATHING
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
#define DEBOUNCE 5
-/* define if matrix has ghost (lacks anti-ghosting diodes) */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
- * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
+ * This is useful for the Windows task manager shortcut (ctrl+shift+esc).
*/
-// #define GRAVE_ESC_CTRL_OVERRIDE
+//#define GRAVE_ESC_CTRL_OVERRIDE
/*
* Force NKRO
@@ -94,54 +74,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define FORCE_NKRO
/*
- * Magic Key Options
- *
- * Magic keys are hotkey commands that allow control over firmware functions of
- * the keyboard. They are best used in combination with the HID Listen program,
- * found here: https://www.pjrc.com/teensy/hid_listen.html
- *
- * The options below allow the magic key functionality to be changed. This is
- * useful if your keyboard/keypad is missing keys and you want magic key support.
- *
- */
-
-/* control how magic key switches layers */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
-
-/* override magic key keymap */
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
-//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
-//#define MAGIC_KEY_HELP1 H
-//#define MAGIC_KEY_HELP2 SLASH
-//#define MAGIC_KEY_DEBUG D
-//#define MAGIC_KEY_DEBUG_MATRIX X
-//#define MAGIC_KEY_DEBUG_KBD K
-//#define MAGIC_KEY_DEBUG_MOUSE M
-//#define MAGIC_KEY_VERSION V
-//#define MAGIC_KEY_STATUS S
-//#define MAGIC_KEY_CONSOLE C
-//#define MAGIC_KEY_LAYER0_ALT1 ESC
-//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
-//#define MAGIC_KEY_LAYER0 0
-//#define MAGIC_KEY_LAYER1 1
-//#define MAGIC_KEY_LAYER2 2
-//#define MAGIC_KEY_LAYER3 3
-//#define MAGIC_KEY_LAYER4 4
-//#define MAGIC_KEY_LAYER5 5
-//#define MAGIC_KEY_LAYER6 6
-//#define MAGIC_KEY_LAYER7 7
-//#define MAGIC_KEY_LAYER8 8
-//#define MAGIC_KEY_LAYER9 9
-//#define MAGIC_KEY_BOOTLOADER PAUSE
-//#define MAGIC_KEY_LOCK CAPS
-//#define MAGIC_KEY_EEPROM E
-//#define MAGIC_KEY_NKRO N
-//#define MAGIC_KEY_SLEEP_LED Z
-
-/*
* Feature disable options
* These options are also useful to firmware size reduction.
*/
@@ -156,27 +88,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-/*
- * MIDI options
- */
-
-/* enable basic MIDI features:
- - MIDI notes can be sent when in Music mode is on
-*/
-//#define MIDI_BASIC
-
-/* enable advanced MIDI features:
- - MIDI notes can be added to the keymap
- - Octave shift and transpose
- - Virtual sustain, portamento, and modulation wheel
- - etc.
-*/
-//#define MIDI_ADVANCED
-
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
-//#define MIDI_TONE_KEYCODE_OCTAVES 1
-#endif
+/* disable these deprecated features by default */
+#define NO_ACTION_MACRO
+#define NO_ACTION_FUNCTION
diff --git a/keyboards/al1/info.json b/keyboards/al1/info.json
index f5ab643997..4cb5bba7fa 100644
--- a/keyboards/al1/info.json
+++ b/keyboards/al1/info.json
@@ -1,15 +1,212 @@
{
- "keyboard_name": "AL1",
- "url": "",
- "maintainer": "qmk",
- "width": 20.5,
- "height": 5.25,
- "layouts": {
- "LAYOUT": {
- "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"↑", "x":15.25, "y":3.25}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"←", "x":14.25, "y":4.25}, {"label":"↓", "x":15.25, "y":4.25}, {"label":"→", "x":16.25, "y":4.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}]
- },
- "LAYOUT_split_bs": {
- "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Insert", "x":15.25, "y":0}, {"label":"Num Lock", "x":16.5, "y":0}, {"label":"/", "x":17.5, "y":0}, {"label":"*", "x":18.5, "y":0}, {"label":"-", "x":19.5, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15.25, "y":1}, {"label":"7", "x":16.5, "y":1}, {"label":"8", "x":17.5, "y":1}, {"label":"9", "x":18.5, "y":1}, {"label":"+", "x":19.5, "y":1, "h":2}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"4", "x":16.5, "y":2}, {"label":"5", "x":17.5, "y":2}, {"label":"6", "x":18.5, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"↑", "x":15.25, "y":3.25}, {"label":"1", "x":16.5, "y":3}, {"label":"2", "x":17.5, "y":3}, {"label":"3", "x":18.5, "y":3}, {"label":"Enter", "x":19.5, "y":3, "h":2}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4}, {"label":"Alt", "x":2.25, "y":4, "w":1.25}, {"x":3.5, "y":4, "w":7}, {"label":"Alt", "x":10.5, "y":4, "w":1.25}, {"label":"Win", "x":11.75, "y":4}, {"label":"Menu", "x":12.75, "y":4, "w":1.25}, {"label":"←", "x":14.25, "y":4.25}, {"label":"↓", "x":15.25, "y":4.25}, {"label":"→", "x":16.25, "y":4.25}, {"label":"0", "x":17.5, "y":4}, {"label":".", "x":18.5, "y":4}]
+ "keyboard_name": "AL1",
+ "url": "",
+ "maintainer": "qmk",
+ "width": 20.5,
+ "height": 5.25,
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0, "w": 2},
+
+ {"x": 15.25, "y": 0},
+
+ {"x": 16.5, "y": 0},
+ {"x": 17.5, "y": 0},
+ {"x": 18.5, "y": 0},
+ {"x": 19.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.25, "y": 1},
+
+ {"x": 16.5, "y": 1},
+ {"x": 17.5, "y": 1},
+ {"x": 18.5, "y": 1},
+ {"x": 19.5, "y": 1, "h": 2},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 16.5, "y": 2},
+ {"x": 17.5, "y": 2},
+ {"x": 18.5, "y": 2},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 1.75},
+ {"x": 14, "y": 3},
+
+ {"x": 15.25, "y": 3.25},
+
+ {"x": 16.5, "y": 3},
+ {"x": 17.5, "y": 3},
+ {"x": 18.5, "y": 3},
+ {"x": 19.5, "y": 3, "h": 2},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4},
+ {"x": 2.25, "y": 4, "w": 1.25},
+ {"x": 3.5, "y": 4, "w": 7},
+ {"x": 10.5, "y": 4, "w": 1.25},
+ {"x": 11.75, "y": 4},
+ {"x": 12.75, "y": 4, "w": 1.25},
+
+ {"x": 14.25, "y": 4.25},
+ {"x": 15.25, "y": 4.25},
+ {"x": 16.25, "y": 4.25},
+
+ {"x": 17.5, "y": 4},
+ {"x": 18.5, "y": 4}
+ ]
+ },
+ "LAYOUT_split_bs": {
+ "layout": [
+ {"x": 0, "y": 0},
+ {"x": 1, "y": 0},
+ {"x": 2, "y": 0},
+ {"x": 3, "y": 0},
+ {"x": 4, "y": 0},
+ {"x": 5, "y": 0},
+ {"x": 6, "y": 0},
+ {"x": 7, "y": 0},
+ {"x": 8, "y": 0},
+ {"x": 9, "y": 0},
+ {"x": 10, "y": 0},
+ {"x": 11, "y": 0},
+ {"x": 12, "y": 0},
+ {"x": 13, "y": 0},
+ {"x": 14, "y": 0},
+
+ {"x": 15.25, "y": 0},
+
+ {"x": 16.5, "y": 0},
+ {"x": 17.5, "y": 0},
+ {"x": 18.5, "y": 0},
+ {"x": 19.5, "y": 0},
+
+ {"x": 0, "y": 1, "w": 1.5},
+ {"x": 1.5, "y": 1},
+ {"x": 2.5, "y": 1},
+ {"x": 3.5, "y": 1},
+ {"x": 4.5, "y": 1},
+ {"x": 5.5, "y": 1},
+ {"x": 6.5, "y": 1},
+ {"x": 7.5, "y": 1},
+ {"x": 8.5, "y": 1},
+ {"x": 9.5, "y": 1},
+ {"x": 10.5, "y": 1},
+ {"x": 11.5, "y": 1},
+ {"x": 12.5, "y": 1},
+ {"x": 13.5, "y": 1, "w": 1.5},
+
+ {"x": 15.25, "y": 1},
+
+ {"x": 16.5, "y": 1},
+ {"x": 17.5, "y": 1},
+ {"x": 18.5, "y": 1},
+ {"x": 19.5, "y": 1, "h": 2},
+
+ {"x": 0, "y": 2, "w": 1.75},
+ {"x": 1.75, "y": 2},
+ {"x": 2.75, "y": 2},
+ {"x": 3.75, "y": 2},
+ {"x": 4.75, "y": 2},
+ {"x": 5.75, "y": 2},
+ {"x": 6.75, "y": 2},
+ {"x": 7.75, "y": 2},
+ {"x": 8.75, "y": 2},
+ {"x": 9.75, "y": 2},
+ {"x": 10.75, "y": 2},
+ {"x": 11.75, "y": 2},
+ {"x": 12.75, "y": 2, "w": 2.25},
+
+ {"x": 16.5, "y": 2},
+ {"x": 17.5, "y": 2},
+ {"x": 18.5, "y": 2},
+
+ {"x": 0, "y": 3, "w": 2.25},
+ {"x": 2.25, "y": 3},
+ {"x": 3.25, "y": 3},
+ {"x": 4.25, "y": 3},
+ {"x": 5.25, "y": 3},
+ {"x": 6.25, "y": 3},
+ {"x": 7.25, "y": 3},
+ {"x": 8.25, "y": 3},
+ {"x": 9.25, "y": 3},
+ {"x": 10.25, "y": 3},
+ {"x": 11.25, "y": 3},
+ {"x": 12.25, "y": 3, "w": 1.75},
+ {"x": 14, "y": 3},
+
+ {"x": 15.25, "y": 3.25},
+
+ {"x": 16.5, "y": 3},
+ {"x": 17.5, "y": 3},
+ {"x": 18.5, "y": 3},
+ {"x": 19.5, "y": 3, "h": 2},
+
+ {"x": 0, "y": 4, "w": 1.25},
+ {"x": 1.25, "y": 4},
+ {"x": 2.25, "y": 4, "w": 1.25},
+ {"x": 3.5, "y": 4, "w": 7},
+ {"x": 10.5, "y": 4, "w": 1.25},
+ {"x": 11.75, "y": 4},
+ {"x": 12.75, "y": 4, "w": 1.25},
+
+ {"x": 14.25, "y": 4.25},
+ {"x": 15.25, "y": 4.25},
+ {"x": 16.25, "y": 4.25},
+
+ {"x": 17.5, "y": 4},
+ {"x": 18.5, "y": 4}
+ ]
+ }
}
- }
}
diff --git a/keyboards/al1/keymaps/default/keymap.c b/keyboards/al1/keymaps/default/keymap.c
index d571c05abb..a3a9d63d37 100644
--- a/keyboards/al1/keymaps/default/keymap.c
+++ b/keyboards/al1/keymaps/default/keymap.c
@@ -13,36 +13,23 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT(\
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
-
- [1] = LAYOUT(\
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,\
- KC_TAB, KC_Q, KC_W, KC_E, RESET, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ),
+ LAYOUT(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ ),
+
+ LAYOUT(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______
+ )
};
-
-void matrix_init_user(void) {
-
-}
-
-void matrix_scan_user(void) {
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
-}
diff --git a/keyboards/al1/keymaps/default/readme.md b/keyboards/al1/keymaps/default/readme.md
deleted file mode 100644
index b89f4f6745..0000000000
--- a/keyboards/al1/keymaps/default/readme.md
+++ /dev/null
@@ -1 +0,0 @@
-# The default keymap for al1
diff --git a/keyboards/al1/keymaps/splitbs/keymap.c b/keyboards/al1/keymaps/splitbs/keymap.c
index 51f35d0cfb..d896b10dbe 100644
--- a/keyboards/al1/keymaps/splitbs/keymap.c
+++ b/keyboards/al1/keymaps/splitbs/keymap.c
@@ -1,32 +1,35 @@
+/* Copyright 2018 MechMerlin
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
#include QMK_KEYBOARD_H
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- [0] = LAYOUT_split_bs(\
- KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRAVE, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, MO(1), KC_RGUI, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_P0, KC_PDOT ),
- [1] = LAYOUT_split_bs(\
- KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_GRAVE, KC_DELETE, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \
- KC_TAB, KC_Q, KC_W, KC_E, RESET, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DELETE, KC_P7, KC_P8, KC_P9, KC_PPLS,\
- KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, \
- KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, \
- KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_TRNS, KC_RGUI, KC_RCTRL, BL_TOGG, BL_DEC, BL_INC, KC_P0, KC_PDOT ),
+ LAYOUT_split_bs(
+ KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_INS, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS,
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_P7, KC_P8, KC_P9, KC_PPLS,
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
+ ),
+
+ LAYOUT_split_bs(
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_DEL, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______
+ )
};
-
-void matrix_init_user(void) {
-
-}
-
-void matrix_scan_user(void) {
-
-}
-
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
- return true;
-}
-
-void led_set_user(uint8_t usb_led) {
-
-}
diff --git a/keyboards/al1/matrix.c b/keyboards/al1/matrix.c
index f6e9510873..1407cbc089 100644
--- a/keyboards/al1/matrix.c
+++ b/keyboards/al1/matrix.c
@@ -1,201 +1,92 @@
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "print.h"
-#include "debug.h"
-#include "util.h"
#include "matrix.h"
-#ifndef DEBOUNCE
-# define DEBOUNCE 5
-#endif
-static uint8_t debouncing = DEBOUNCE;
-
-static matrix_row_t matrix[MATRIX_ROWS];
-static matrix_row_t matrix_debouncing[MATRIX_ROWS];
-
-static uint8_t read_rows(void);
-static void init_rows(void);
-static void unselect_cols(void);
-static void select_col(uint8_t col);
-
-inline uint8_t matrix_rows(void) {
- return MATRIX_ROWS;
-}
-
-inline uint8_t matrix_cols(void) {
- return MATRIX_COLS;
-}
-
-__attribute__ ((weak))
-void matrix_init_kb(void) {
- matrix_init_user();
-}
-
-__attribute__ ((weak))
-void matrix_scan_kb(void) {
- matrix_scan_user();
-}
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-}
-
-void matrix_init(void) {
- // initialize row and col
- unselect_cols();
- init_rows();
-
- // initialize matrix state: all keys off
- for (uint8_t i=0; i < MATRIX_ROWS; i++) {
- matrix[i] = 0;
- matrix_debouncing[i] = 0;
- }
- matrix_init_quantum();
-}
-
-uint8_t matrix_scan(void) {
- for (uint8_t col = 0; col < MATRIX_COLS; col++) {
- select_col(col);
- _delay_us(3);
- uint8_t rows = read_rows();
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col);
- bool curr_bit = rows & (1<<row);
- if (prev_bit != curr_bit) {
- matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
- debouncing = DEBOUNCE;
- }
- }
- unselect_cols();
- }
-
- if (debouncing) {
- if (--debouncing) {
- _delay_ms(1);
- } else {
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- matrix[i] = matrix_debouncing[i];
- }
- }
- }
-
- matrix_scan_quantum();
- return 1;
-}
-
-bool matrix_is_modified(void) {
- if (debouncing)
- return false;
- else
- return true;
-}
-
-inline bool matrix_is_on(uint8_t row, uint8_t col) {
- return (matrix[row] & ((matrix_row_t)1<<col));
-}
-
-inline matrix_row_t matrix_get_row(uint8_t row) {
- return matrix[row];
-}
-
-void matrix_print(void) {
- print("\nr/c 0123456789ABCDEF\n");
- for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
- xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row)));
- }
-}
-
-uint8_t matrix_key_count(void) {
- uint8_t count = 0;
- for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
- count += bitpop32(matrix[i]);
- }
- return count;
-}
-
-/* Row pin configuration
- *
- * row: 0 1 2 3 4 5
- * pin: C7 B1 B2 C6 B4 B5
- *
- */
-static void init_rows(void)
-{
- DDRC &= ~0b11000000;
- DDRB &= ~0b00110110;
- PORTC |= 0b11000000;
- PORTB |= 0b00110110;
-}
+#include "gpio.h"
static uint8_t read_rows(void) {
- return (PINC&(1<<PC7) ? 0 : (1<<0)) |
- (PINB&(1<<PB1) ? 0 : (1<<1)) |
- (PINB&(1<<PB2) ? 0 : (1<<2)) |
- (PINC&(1<<PC6) ? 0 : (1<<3)) |
- (PINB&(1<<PB4) ? 0 : (1<<4)) |
- (PINB&(1<<PB5) ? 0 : (1<<5));
-}
-
-/* Row pin configuration
- * pin: D3 D7 D6 D5 D4
- * row: off 0 x x x x
- * 0 1 0 0 0 0
- * 1 1 0 0 0 1
- * 2 1 0 0 1 0
- * 3 1 0 0 1 1
- * 4 1 0 1 0 0
- * 5 1 0 1 0