summaryrefslogtreecommitdiff
path: root/keyboards/amjkeyboard/amj96
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
committerNick Brassel <nick@tzarc.org>2022-05-29 07:57:11 +1000
commitb835171008eaeaa992a1b8e390af8bce6f5f0b8f (patch)
treede22c239cc47556f8be7538f95f48ad75b86d110 /keyboards/amjkeyboard/amj96
parentf5d091a9d58c8349437e9d52de87294258cbd256 (diff)
parent0c8f78020d01ee5c45481d7d93b9b0d9f7b95103 (diff)
Merge branch 'develop' -- breaking changes 2022-05-28.
Diffstat (limited to 'keyboards/amjkeyboard/amj96')
-rw-r--r--keyboards/amjkeyboard/amj96/amj96.c16
-rw-r--r--keyboards/amjkeyboard/amj96/amj96.h38
-rw-r--r--keyboards/amjkeyboard/amj96/config.h131
-rw-r--r--keyboards/amjkeyboard/amj96/info.json122
-rw-r--r--keyboards/amjkeyboard/amj96/keymaps/default/keymap.c39
-rw-r--r--keyboards/amjkeyboard/amj96/matrix.c204
-rw-r--r--keyboards/amjkeyboard/amj96/readme.md20
-rw-r--r--keyboards/amjkeyboard/amj96/rules.mk21
8 files changed, 591 insertions, 0 deletions
diff --git a/keyboards/amjkeyboard/amj96/amj96.c b/keyboards/amjkeyboard/amj96/amj96.c
new file mode 100644
index 0000000000..65fca6f12a
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/amj96.c
@@ -0,0 +1,16 @@
+/* Copyright 2017 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 "amj96.h"
diff --git a/keyboards/amjkeyboard/amj96/amj96.h b/keyboards/amjkeyboard/amj96/amj96.h
new file mode 100644
index 0000000000..bd4e688360
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/amj96.h
@@ -0,0 +1,38 @@
+/* Copyright 2017 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/>.
+ */
+
+#pragma once
+
+#include "quantum.h"
+
+#define XXX KC_NO
+
+#define LAYOUT_all( \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K09, K0A, K0C, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K0B, K0F, K6F, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, K3F, K0D, K6D, \
+ K40, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4D, K4E, K4F, K6E, \
+ K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F, K0E, K07, \
+ K60, K61, K62, K63, K64, K65, K66, K68, K69, K6A, K6B, K6C \
+) { \
+ { XXX, XXX, XXX, XXX, XXX, XXX, XXX, K07, XXX, 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, K54, K55, K56, K57, K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, \
+ { K60, K61, K62, K63, K64, K65, K66, XXX, K68, K69, K6A, K6B, K6C, K6D, K6E, K6F } \
+}
diff --git a/keyboards/amjkeyboard/amj96/config.h b/keyboards/amjkeyboard/amj96/config.h
new file mode 100644
index 0000000000..67b3699047
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/config.h
@@ -0,0 +1,131 @@
+/*
+Copyright 2017 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/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0x00D8 //A+M+J
+#define PRODUCT_ID 0x6074
+#define DEVICE_VER 0x0002
+#define MANUFACTURER Han Chen
+#define PRODUCT AMJ96
+
+/* key matrix size */
+#define MATRIX_ROWS 7
+#define MATRIX_COLS 16
+
+/*
+ * 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)
+ *
+ */
+#define UNUSED_PINS
+
+/* COL2ROW, ROW2COL*/
+#define DIODE_DIRECTION COL2ROW
+
+//#define BACKLIGHT_PIN B7
+//#define BACKLIGHT_LEVELS 3
+//#define BACKLIGHT_BREATHING
+
+#define RGB_DI_PIN D3
+#ifdef RGB_DI_PIN
+# define RGBLED_NUM 16
+//# define RGBLIGHT_HUE_STEP 8
+//# define RGBLIGHT_SAT_STEP 8
+//# define RGBLIGHT_VAL_STEP 8
+//# define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
+//# define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
+/*== all animations enable ==*/
+# define RGBLIGHT_ANIMATIONS
+/*== or choose animations ==*/
+//# define RGBLIGHT_EFFECT_BREATHING
+//# define RGBLIGHT_EFFECT_RAINBOW_MOOD
+//# define RGBLIGHT_EFFECT_RAINBOW_SWIRL
+//# define RGBLIGHT_EFFECT_SNAKE
+//# define RGBLIGHT_EFFECT_KNIGHT
+//# define RGBLIGHT_EFFECT_CHRISTMAS
+//# define RGBLIGHT_EFFECT_STATIC_GRADIENT
+//# define RGBLIGHT_EFFECT_RGB_TEST
+//# define RGBLIGHT_EFFECT_ALTERNATING
+/*== customize breathing effect ==*/
+/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/
+//# define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64
+/*==== use exp() and sin() ====*/
+//# define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7
+//# define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255
+#endif
+
+/* 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
+
+/* 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).
+ */
+// #define GRAVE_ESC_CTRL_OVERRIDE
+
+/*
+ * Force NKRO
+ *
+ * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
+ * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
+ * makefile for this to work.)
+ *
+ * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
+ * until the next keyboard reset.
+ *
+ * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
+ * fully operational during normal computer usage.
+ *
+ * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
+ * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
+ * bootmagic, NKRO mode will always be enabled until it is toggled again during a
+ * power-up.
+ *
+ */
+//#define FORCE_NKRO
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
diff --git a/keyboards/amjkeyboard/amj96/info.json b/keyboards/amjkeyboard/amj96/info.json
new file mode 100644
index 0000000000..b2aac215c0
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/info.json
@@ -0,0 +1,122 @@
+{
+ "keyboard_name": "AMJ96",
+ "url": "",
+ "maintainer": "qmk",
+ "layout_aliases": {
+ "LAYOUT": "LAYOUT_all"
+ },
+ "layouts": {
+ "LAYOUT_all": {
+ "layout": [
+ {"label":"Esc", "x":0, "y":0},
+ {"label":"F1", "x":1, "y":0},
+ {"label":"F2", "x":2, "y":0},
+ {"label":"F3", "x":3, "y":0},
+ {"label":"F4", "x":4, "y":0},
+ {"label":"F5", "x":5, "y":0},
+ {"label":"F6", "x":6, "y":0},
+ {"label":"F7", "x":7, "y":0},
+ {"label":"F8", "x":8, "y":0},
+ {"label":"F9", "x":9, "y":0},
+ {"label":"F10", "x":10, "y":0},
+ {"label":"F11", "x":11, "y":0},
+ {"label":"F12", "x":12, "y":0},
+ {"label":"Print Screen", "x":13, "y":0},
+ {"label":"Pause", "x":14, "y":0},
+ {"label":"Ins", "x":15, "y":0},
+ {"label":"Del", "x":16, "y":0},
+ {"label":"Page Up", "x":17, "y":0},
+ {"label":"Page Down", "x":18, "y":0},
+
+ {"label":"` ~", "x":0, "y":1},
+ {"label":"1 !", "x":1, "y":1},
+ {"label":"2 @", "x":2, "y":1},
+ {"label":"3 #", "x":3, "y":1},
+ {"label":"4 $", "x":4, "y":1},
+ {"label":"5 %", "x":5, "y":1},
+ {"label":"6 ^", "x":6, "y":1},
+ {"label":"7 &", "x":7, "y":1},
+ {"label":"8 *", "x":8, "y":1},
+ {"label":"9 (", "x":9, "y":1},
+ {"label":"0 )", "x":10, "y":1},
+ {"label":"- _", "x":11, "y":1},
+ {"label":"= +", "x":12, "y":1},
+ {"label":"Back Space", "x":13, "y":1},
+ {"label":"Back Space 2", "x":14, "y":1},
+ {"label":"Num Lock", "x":15, "y":1},
+ {"label":"/", "x":16, "y":1},
+ {"label":"*", "x":17, "y":1},
+ {"label":"-", "x":18, "y":1},
+
+ {"label":"Tab", "x":0, "y":2, "w":1.5},
+ {"label":"Q", "x":1.5, "y":2},
+ {"label":"W", "x":2.5, "y":2},
+ {"label":"E", "x":3.5, "y":2},
+ {"label":"R", "x":4.5, "y":2},
+ {"label":"T", "x":5.5, "y":2},
+ {"label":"Y", "x":6.5, "y":2},
+ {"label":"U", "x":7.5, "y":2},
+ {"label":"I", "x":8.5, "y":2},
+ {"label":"O", "x":9.5, "y":2},
+ {"label":"P", "x":10.5, "y":2},
+ {"label":"[ {", "x":11.5, "y":2},
+ {"label":"] }", "x":12.5, "y":2},
+ {"label":"\\ |", "x":13.5, "y":2, "w":1.5},
+ {"label":"7", "x":15, "y":2},
+ {"label":"8", "x":16, "y":2},
+ {"label":"9", "x":17, "y":2},
+ {"label":"+", "x":18, "y":2},
+
+ {"label":"Caps Lock", "x":0, "y":3, "w":1.75},
+ {"label":"A", "x":1.75, "y":3},
+ {"label":"S", "x":2.75, "y":3},
+ {"label":"D", "x":3.75, "y":3},
+ {"label":"F", "x":4.75, "y":3},
+ {"label":"G", "x":5.75, "y":3},
+ {"label":"H", "x":6.75, "y":3},
+ {"label":"J", "x":7.75, "y":3},
+ {"label":"K", "x":8.75, "y":3},
+ {"label":"L", "x":9.75, "y":3},
+ {"label":"; :", "x":10.75, "y":3},
+ {"label":"' \"", "x":11.75, "y":3},
+ {"label":"Enter", "x":12.75, "y":3, "w":2.25},
+ {"label":"4", "x":15, "y":3},
+ {"label":"5", "x":16, "y":3},
+ {"label":"6", "x":17, "y":3},
+ {"label":"+", "x":18, "y":3},
+
+ {"label":"Shift", "x":0, "y":4, "w":1.25},
+ {"label":"ISO \\", "x":1.25, "y":4},
+ {"label":"Z", "x":2.25, "y":4},
+ {"label":"X", "x":3.25, "y":4},
+ {"label":"C", "x":4.25, "y":4},
+ {"label":"V", "x":5.25, "y":4},
+ {"label":"B", "x":6.25, "y":4},
+ {"label":"N", "x":7.25, "y":4},
+ {"label":"M", "x":8.25, "y":4},
+ {"label":", <", "x":9.25, "y":4},
+ {"label":". >", "x":10.25, "y":4},
+ {"label":"/ ?", "x":11.25, "y":4},
+ {"label":"Shift", "x":12.25, "y":4, "w":1.75},
+ {"label":"Up", "x":14, "y":4},
+ {"label":"1", "x":15, "y":4},
+ {"label":"2", "x":16, "y":4},
+ {"label":"3", "x":17, "y":4},
+ {"label":"Enter", "x":18, "y":4},
+
+ {"label":"Ctrl", "x":0, "y":5, "w":1.25},
+ {"label":"GUI", "x":1.25, "y":5, "w":1.25},
+ {"label":"Alt", "x":2.5, "y":5, "w":1.25},
+ {"label":"Space", "x":3.75, "y":5, "w":6.25},
+ {"label":"Alt", "x":10, "y":5, "w":1.5},
+ {"label":"Fn", "x":11.5, "y":5, "w":1.5},
+ {"label":"Left", "x":13, "y":5},
+ {"label":"Down", "x":14, "y":5},
+ {"label":"Right", "x":15, "y":5},
+ {"label":"0", "x":16, "y":5},
+ {"label":".", "x":17, "y":5},
+ {"label":"Enter", "x":18, "y":5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/amjkeyboard/amj96/keymaps/default/keymap.c b/keyboards/amjkeyboard/amj96/keymaps/default/keymap.c
new file mode 100644
index 0000000000..95247ebfc8
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/keymaps/default/keymap.c
@@ -0,0 +1,39 @@
+/* Copyright 2017 MechMerlin
+ * 2021 QMK/James Young (@noroadsleft)
+ *
+ * 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_all(
+ 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_PSCR, KC_PAUS, KC_INS, KC_DEL, KC_PGUP, KC_PGDN,
+ KC_GRV, 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, XXXXXXX, 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_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_PPLS,
+ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
+ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT
+ ),
+
+ [1] = LAYOUT_all(
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+ )
+
+};
diff --git a/keyboards/amjkeyboard/amj96/matrix.c b/keyboards/amjkeyboard/amj96/matrix.c
new file mode 100644
index 0000000000..2999c6241b
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/matrix.c
@@ -0,0 +1,204 @@
+/*
+Copyright 2014 Kai Ryu <kai1103@gmail.com>
+
+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/>.
+*/
+
+/*
+ * scan matrix
+ */
+#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"
+#ifdef UART_RGB_ENABLE
+#include "uart_rgb.h"
+#endif
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+static uint8_t debouncing = DEBOUNCE;
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+static matrix_row_t matrix_debouncing[MATRIX_ROWS];
+
+static matrix_row_t read_cols(void);
+static void init_cols(void);
+static void init_rows(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+void matrix_init(void)
+{
+
+#ifdef UART_RGB_ENABLE
+ uart_rgb_init();
+#endif
+
+ // 85 REST
+ DDRD |= _BV(PD7);
+ PORTD |= _BV(PD7);
+
+ // initialize row and col
+ init_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ matrix_debouncing[i] = 0;
+ }
+}
+
+uint8_t matrix_scan(void)
+{
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ select_row(i);
+ _delay_us(30); // without this wait read unstable value.
+ matrix_row_t cols = read_cols();
+ if (matrix_debouncing[i] != cols) {
+ matrix_debouncing[i] = cols;
+ if (debouncing) {
+ debug("bounce!: "); debug_hex(debouncing); debug("\n");
+ }
+ debouncing = DEBOUNCE;
+ }
+ unselect_rows();
+ }
+
+ if (debouncing) {
+ if (--debouncing) {
+ _delay_ms(1);
+ } else {
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ matrix[i] = matrix_debouncing[i];
+ }
+ }
+ }
+
+ return 1;
+}
+
+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++) {
+ print_hex8(row); print(": ");
+ print_bin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+/* Column pin configuration
+ * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
+ * pin: F7 F6 F5 F4 F1 F0 E6 D7 D6 D5 D1 D0 B7 B6 B0 C7
+ * */
+static void init_cols(void)
+{
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= 0b00001100;
+ PORTF |= 0b11110011;
+
+ DDRD &= 0b00011100;
+ PORTD |= 0b11100011;
+
+ DDRB &= ~(_BV(PB6) | _BV(PB7)| _BV(PB0));
+ PORTB |= (_BV(PB6) | _BV(PB7)| _BV(PB0));
+
+ DDRE &= ~_BV(PE6);
+ PORTE |= _BV(PE6);
+
+ DDRC &= ~_BV(PC7);
+ PORTC |= _BV(PC7);
+
+}
+
+static matrix_row_t read_cols(void)
+{
+
+ return (PINF&_BV(PF7) ? 0 : (1<<0)) |
+ (PINF&_BV(PF6) ? 0 : (1<<1)) |
+ (PINF&_BV(PF5) ? 0 : (1<<2)) |
+ (PINF&_BV(PF4) ? 0 : (1<<3)) |
+ (PINF&_BV(PF1) ? 0 : (1<<4)) |
+ (PINF&_BV(PF0) ? 0 : (1<<5)) |
+ (PINE&_BV(PE6) ? 0 : (1<<6)) |
+ (PIND&_BV(PD7) ? 0 : (1<<7)) |
+ (PIND&_BV(PD6) ? 0 : (1<<8)) |
+ (PIND&_BV(PD5) ? 0 : (1<<9)) |
+ (PIND&_BV(PD1) ? 0 : (1<<10)) |
+ (PIND&_BV(PD0) ? 0 : (1<<11)) |
+ (PINB&_BV(PB7) ? 0 : (1<<12)) |
+ (PINB&_BV(PB6) ? 0 : (1<<13)) |
+ (PINB&_BV(PB0) ? 0 : (1<<14)) |
+ (PINC&_BV(PC7) ? 0 : (1<<15));
+}
+
+/* Row pin configuration
+ * row: 0 1 2 3 4 5 x
+ * pin: B3 0 1 0 1 0 1 1
+ * B2 0 0 1 1 0 0 1
+ * B1 0 0 0 0 1 1 1
+ */
+
+static void init_rows(void)
+{
+ DDRB |= (1<<PB1 | 1<<PB2 | 1<<PB3);
+}
+
+static void unselect_rows(void)
+{
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ PORTB |= (1<<PB1);
+ PORTB |= (1<<PB2);
+ PORTB |= (1<<PB3);
+}
+
+static void select_row(uint8_t row)
+{
+ // Output low(DDR:1, PORT:0) to select
+ (row & (1<<0)) ? (PORTB |= (1<<PB3)) : (PORTB &= ~(1<<PB3));
+ (row & (1<<1)) ? (PORTB |= (1<<PB2)) : (PORTB &= ~(1<<PB2));
+ (row & (1<<2)) ? (PORTB |= (1<<PB1)) : (PORTB &= ~(1<<PB1));
+}
diff --git a/keyboards/amjkeyboard/amj96/readme.md b/keyboards/amjkeyboard/amj96/readme.md
new file mode 100644
index 0000000000..0941b6f3e1
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/readme.md
@@ -0,0 +1,20 @@
+# AMJ96
+
+The AMD96 is a 96 key custom keyboard with anodized aluminum case, twin usb ports, and support for backlight LEDs and RGB underglow via SMD LEDs.
+
+* Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin)
+* Hardware Supported: AMJ96
+* Hardware Availability: [~~Flashquark~~](https://flashquark.com/product/amj96/) (no longer available)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make amjkeyboard/amj96:default
+
+Flashing example for this keyboard:
+
+ make amjkeyboard/amj96:default:flash
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Notes
+- In-switch and underglow LEDs currently not supported.
diff --git a/keyboards/amjkeyboard/amj96/rules.mk b/keyboards/amjkeyboard/amj96/rules.mk
new file mode 100644
index 0000000000..9e9f03f764
--- /dev/null
+++ b/keyboards/amjkeyboard/amj96/rules.mk
@@ -0,0 +1,21 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = yes # Console for debug
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
+AUDIO_ENABLE = no # Audio output
+
+CUSTOM_MATRIX = yes
+SRC += matrix.c