summaryrefslogtreecommitdiffstats
path: root/keyboard/atomic
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/atomic')
-rw-r--r--keyboard/atomic/Makefile49
-rw-r--r--keyboard/atomic/Makefile.pjrc2
-rw-r--r--keyboard/atomic/README 2.md141
-rw-r--r--keyboard/atomic/config.h8
-rw-r--r--keyboard/atomic/keymap_common.h122
-rw-r--r--keyboard/atomic/keymap_plain.c46
-rw-r--r--keyboard/atomic/keymap_ricky.c15
-rw-r--r--keyboard/atomic/keymap_vlad.c14
-rw-r--r--keyboard/atomic/led.c13
-rw-r--r--keyboard/atomic/matrix.c72
10 files changed, 169 insertions, 313 deletions
diff --git a/keyboard/atomic/Makefile b/keyboard/atomic/Makefile
index c4e0cb45d..12351b990 100644
--- a/keyboard/atomic/Makefile
+++ b/keyboard/atomic/Makefile
@@ -39,7 +39,7 @@
#----------------------------------------------------------------------------
# Target file name (without extension).
-TARGET = atomic_lufa
+TARGET = planck_lufa
# Directory common source filess exist
TOP_DIR = ../..
@@ -47,19 +47,49 @@ TOP_DIR = ../..
# Directory keyboard dependent files exist
TARGET_DIR = .
-# project specific files
-SRC = keymap_common.c \
- matrix.c \
- led.c
+
+
+# # project specific files
+ifdef COMMON
+
+ SRC = keymap_common.c \
+ led.c \
+ backlight.c
ifdef KEYMAP
- SRC := keymap_$(KEYMAP).c $(SRC)
+ SRC := common_keymaps/keymap_$(KEYMAP).c $(SRC)
else
- SRC := keymap_vlad.c $(SRC)
+ SRC := common_keymaps/keymap_jack.c $(SRC)
endif
-CONFIG_H = config.h
+ifdef MATRIX
+ SRC := matrix_$(MATRIX).c $(SRC)
+else
+ SRC := matrix_pcb.c $(SRC)
+endif
+
+else
+
+SRC = extended_keymap_common.c \
+ analog.c \
+ led.c \
+ backlight.c
+
+ifdef KEYMAP
+ SRC := extended_keymaps/extended_keymap_$(KEYMAP).c $(SRC)
+else
+ SRC := extended_keymaps/extended_keymap_default.c $(SRC)
+endif
+
+ifdef MATRIX
+ SRC := matrix_$(MATRIX).c $(SRC)
+else
+ SRC := matrix_pcb.c $(SRC)
+endif
+endif
+
+CONFIG_H = config.h
# MCU name
#MCU = at90usb1287
@@ -119,9 +149,10 @@ MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
-
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
# Optimize size but this may cause error "relocation truncated to fit"
#EXTRALDFLAGS = -Wl,--relax
diff --git a/keyboard/atomic/Makefile.pjrc b/keyboard/atomic/Makefile.pjrc
index 9655ff65a..be83ba18b 100644
--- a/keyboard/atomic/Makefile.pjrc
+++ b/keyboard/atomic/Makefile.pjrc
@@ -55,7 +55,7 @@ SRC = keymap_common.c \
ifdef KEYMAP
SRC := keymap_$(KEYMAP).c $(SRC)
else
- SRC := keymap_poker.c $(SRC)
+ SRC := keymap_jack.c $(SRC)
endif
CONFIG_H = config.h
diff --git a/keyboard/atomic/README 2.md b/keyboard/atomic/README 2.md
deleted file mode 100644
index 510cb5c8b..000000000
--- a/keyboard/atomic/README 2.md
+++ /dev/null
@@ -1,141 +0,0 @@
-GH60 keyboard firmware
-======================
-DIY compact keyboard designed and run by komar007 and Geekhack community.
-
-- Both Rev.A and Rev.B PCB are supported by one firmware binary(issue #64)
-
-## GH60 Resources
-- [KOMAR's project page](http://blog.komar.be/projects/gh60-programmable-keyboard/)
-- [Prototyping](http://geekhack.org/index.php?topic=34959.0)
-- [Rev.A PCB test](http://geekhack.org/index.php?topic=37570.0)
-- [Rev.B PCB test](http://geekhack.org/index.php?topic=50685.0)
-- [Group buy](http://geekhack.org/index.php?topic=41464.0)
-
-
-## Build
-Move to this directory then just run `make` like:
-
- $ make
-
-Use `make -f Makefile.pjrc` if you want to use PJRC stack but I find no reason to do so now.
-
-
-## Keymap
-Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_<name>.c` and see keymap document(you can find in top README.md) and existent keymap files.
-
-To build firmware binary hex file with a certain keymap just do `make` with `KEYMAP` option like:
-
- $ make KEYMAP=[poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|<name>]
-
-
-### 1 Poker
-[keymap_poker.c](keymap_poker.c) emulates original Poker layers
-while both [keymap_poker_bit.c](keymap_poker_bit.c) and [keymap_poker_set.c](keymap_poker_set.c) implements same layout in different way and they fix a minor issue of original Poker and enhance arrow keys.
-
- Fn + Esc = `
- Fn + {left, down, up, right} = {home, pgdown, pgup, end}
-
-#### 1.0 Default layer
- ,-----------------------------------------------------------.
- | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
- |-----------------------------------------------------------|
- |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
- |-----------------------------------------------------------|
- |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
- |-----------------------------------------------------------|
- |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
- |-----------------------------------------------------------|
- |Ctrl|Gui |Alt | Space |Fn |Gui |App |Ctrl|
- `-----------------------------------------------------------'
-#### 1.1 Poker Fn layer
- ,-----------------------------------------------------------.
- |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |
- |-----------------------------------------------------------|
- | |FnQ| Up| | | | | | |Cal| |Hom|Ins| |
- |-----------------------------------------------------------|
- | |Lef|Dow|Rig| | |Psc|Slk|Pau| |Tsk|End| |
- |-----------------------------------------------------------|
- | |Del| |Web|Mut|VoU|VoD| |PgU|PgD|Del| Up |
- |-----------------------------------------------------------|
- | | | | FnS |Fn |Left|Down|Righ|
- `-----------------------------------------------------------'
-
-
-### 2. Plain
-Without any Fn layer this will be useful if you want to use key remapping tool like AHK on host.
-See [keymap_plain.c](keymap_plain.c) for detail.
-
-#### 1.0 Plain Default layer
- ,-----------------------------------------------------------.
- |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
- |-----------------------------------------------------------|
- |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
- |-----------------------------------------------------------|
- |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
- |-----------------------------------------------------------|
- |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
- |-----------------------------------------------------------|
- |Ctrl|Gui |Alt | Space |Alt |Gui |App |Ctrl|
- `-----------------------------------------------------------'
-
-
-### 3. Hasu
-This is my favorite keymap with HHKB Fn, Vi cursor and Mousekey layer. See [keymap_hasu.c](keymap_hasu.c) for detail.
-
-
-### 4. SpaceFN
-This layout proposed by spiceBar uses space bar to change layer with using Dual role key technique. See [keymap_spacefn.c](keymap_spacefn.c) and [SpaceFN discussion](http://geekhack.org/index.php?topic=51069.0).
-
-#### 4.0 Default layer
- ,-----------------------------------------------------------.
- |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |
- |-----------------------------------------------------------|
- |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \|
- |-----------------------------------------------------------|
- |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
- |-----------------------------------------------------------|
- |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |
- |-----------------------------------------------------------|
- |Ctrl|Gui |Alt | Space/Fn |Alt |Gui |App |Ctrl|
- `-----------------------------------------------------------'
-#### 4.1 SpaceFN layer
- ,-----------------------------------------------------------.
- |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
- |-----------------------------------------------------------|
- | | | | | | | |Hom|Up |End|Psc|Slk|Pau|Ins |
- |-----------------------------------------------------------|
- | | | | | | |PgU|Lef|Dow|Rig| | | |
- |-----------------------------------------------------------|
- | | | | | |Spc|PgD|` |~ | | | |
- |-----------------------------------------------------------|
- | | | | Fn | | | | |
- `-----------------------------------------------------------'
-
-
-### 5. HHKB
-[keymap_hhkb.c](keymap_hhkb.c) emulates original HHKB layers.
-#### 5.0: Default layer
- ,-----------------------------------------------------------.
- |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|
- |-----------------------------------------------------------|
- |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Bspc |
- |-----------------------------------------------------------|
- |Ctrl | A| S| D| F| G| H| J| K| L|Fn3| '|Return |
- |-----------------------------------------------------------|
- |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn |
- |-----------------------------------------------------------|
- | |Gui |Alt | Space | |Alt |Gui | |
- `-----------------------------------------------------------'
-#### 5.1: HHKB Fn layer
- ,-----------------------------------------------------------.
- |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del|
- |-----------------------------------------------------------|
- |Caps | | | | | | | |Psc|Slk|Pus|Up | | |
- |-----------------------------------------------------------|
- | |VoD|VoU|Mut|Ejc| | *| /|Hom|PgU|Lef|Rig|Enter |
- |-----------------------------------------------------------|
- | | | | | | | +| -|End|PgD|Dow| | |
- |-----------------------------------------------------------|
- | | | | | | | | |
- `-----------------------------------------------------------'
-
diff --git a/keyboard/atomic/config.h b/keyboard/atomic/config.h
index 5ea953805..fd286bb99 100644
--- a/keyboard/atomic/config.h
+++ b/keyboard/atomic/config.h
@@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define PRODUCT_ID 0x6060
#define DEVICE_VER 0x0001
#define MANUFACTURER Ortholinear Keyboards
-#define PRODUCT Atomic Keyboard
-#define DESCRIPTION t.m.k. keyboard firmware for Atomic
+#define PRODUCT Atomic
+#define DESCRIPTION A compact ortholinear keyboard
/* key matrix size */
#define MATRIX_ROWS 5
@@ -34,6 +34,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
+/* number of backlight levels */
+/* NOTE: this is the max value of 0..BACKLIGHT_LEVELS so really 16 levels. */
+#define BACKLIGHT_LEVELS 15
+
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
diff --git a/keyboard/atomic/keymap_common.h b/keyboard/atomic/keymap_common.h
index c582c0135..4a0bcfbb0 100644
--- a/keyboard/atomic/keymap_common.h
+++ b/keyboard/atomic/keymap_common.h
@@ -33,55 +33,97 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];
-// JCK: Semi-Standard layout
-#define KEYMAP_JCK( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \
- K40, K41, K43, K46, K4A, K4B, K4C, K4D, K4E \
-) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, KC_##K0E }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D, KC_##K2E }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \
- { KC_##K40, KC_##K41, KC_NO, KC_##K43, KC_NO, KC_NO, KC_##K46, KC_NO, KC_NO, KC_NO, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
-}
-// ASK: Short Space layout
-#define KEYMAP_ASK_MESSY( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3C, K3D, K3E, \
- K40, K41, K43, K44, K46, K48, K49, K4A, K4B, K4C, K4D, K4E \
+// MIT Layout
+/*
+ * ,-----------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------'
+ */
+#define KEYMAP( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K37, K38, K39, K3A, K3B \
) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, KC_##K0E }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO, KC_##K2D, KC_##K2E }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_##K3C, KC_##K3D, KC_##K3E }, \
- { KC_##K40, KC_##K41, KC_NO, KC_##K43, KC_##K44, KC_NO, KC_##K46, KC_NO, KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K35, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B } \
}
-#define KEYMAP_ASK( \
- K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0E, \
- K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \
- K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2E, \
- K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, K3E, \
- K40, K41, K43, K44, K46, K47, K48, K4A, K4B, K4C, K4D, K4E \
+// Grid Layout
+/*
+ * ,-----------------------------------------------------------------------.
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------|
+ * | | | | | | | | | | | | |
+ * `-----------------------------------------------------------------------'
+ */
+#define KEYMAP_GRID( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \
) { \
- { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, KC_##K0E }, \
- { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E }, \
- { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_NO, KC_##K2E }, \
- { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_NO, KC_##K3D, KC_##K3E }, \
- { KC_##K40, KC_##K41, KC_NO, KC_##K43, KC_##K44, KC_NO, KC_##K46, KC_##K47, KC_##K48, KC_NO, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E } \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B } \
}
+#define KEYMAP_REVERSE( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K37, K38, K39, K3A, K3B \
+ ) { \
+ { KC_##K0B, KC_##K0A, KC_##K09, KC_##K08, KC_##K07, KC_##K06, KC_##K05, KC_##K04, KC_##K03, KC_##K02, KC_##K01, KC_##K00 }, \
+ { KC_##K1B, KC_##K1A, KC_##K19, KC_##K18, KC_##K17, KC_##K16, KC_##K15, KC_##K14, KC_##K13, KC_##K12, KC_##K11, KC_##K10 }, \
+ { KC_##K2B, KC_##K2A, KC_##K29, KC_##K28, KC_##K27, KC_##K26, KC_##K25, KC_##K24, KC_##K23, KC_##K22, KC_##K21, KC_##K20 }, \
+ { KC_##K3B, KC_##K3A, KC_##K39, KC_##K38, KC_##K37, KC_##K35, KC_##K35, KC_##K34, KC_##K33, KC_##K32, KC_##K31, KC_##K30 }, \
+ }
+
+#define KEYMAP_AND_REVERSE(args...) KEYMAP(args), KEYMAP_REVERSE(args)
-// MLO: Semi-Grid layout
+#define KEYMAP_SWAP( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K37, K38, K39, K3A, K3B \
+ ) { \
+ { KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05 }, \
+ { KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15 }, \
+ { KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25 }, \
+ { KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K35, KC_##K35, KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34 }, \
+}
+
+#define KEYMAP_AND_SWAP(args...) KEYMAP(args), KEYMAP_SWAP(args)
-// KLN: Grid layout
+/*
+ Keymap for the Planck 48 key variant.
+ */
+#define KEYMAP_48( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \
+ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \
+) { \
+ { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B }, \
+ { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B }, \
+ { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B }, \
+ { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B }, \
+}
-// PKR: Standard layout
#endif
diff --git a/keyboard/atomic/keymap_plain.c b/keyboard/atomic/keymap_plain.c
deleted file mode 100644
index e7f53649f..000000000
--- a/keyboard/atomic/keymap_plain.c
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "keymap_common.h"
-
-// JCK: Semi-Standard layout
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty */
- [0] = KEYMAP_JCK(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, DEL, \
- ESC, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, MPLY, \
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, VOLD, VOLU, \
- LCTL, LALT, LGUI, SPC, FN1, LEFT, DOWN, UP, RGHT),
- [1] = KEYMAP_JCK(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, \
- TAB, Q, W, F, P, G, J, L, U, Y, SCLN, LBRC, RBRC, BSLS, DEL, \
- ESC, A, R, S, T, D, H, N, E, I, O, QUOT, ENT, MPLY, \
- LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, RSFT, VOLD, VOLU, \
- LCTL, LALT, LGUI, SPC, FN1, LEFT, DOWN, UP, RGHT),
- [2] = KEYMAP_JCK(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, BSPC, \
- TAB, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, LBRC, RBRC, BSLS, DEL, \
- ESC, FN3, FN4, TRNS, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, ENT, MPLY, \
- LSFT, FN9, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, VOLD, VOLU, \
- LCTL, LALT, LGUI, SPC, TRNS, MNXT, VOLD, VOLU, MPLY),
-};
-const uint16_t PROGMEM fn_actions[] = {
- [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay
- [3] = ACTION_DEFAULT_LAYER_SET(0),
- [4] = ACTION_DEFAULT_LAYER_SET(1),
-
- [9] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE),
-
- [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1),
- [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2),
- [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3),
- [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4),
- [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
- [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6),
- [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7),
- [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8),
- [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9),
- [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0),
- [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS),
- [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL),
- [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV),
- [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC),
- [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC),
- [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS),
-};
diff --git a/keyboard/atomic/keymap_ricky.c b/keyboard/atomic/keymap_ricky.c
deleted file mode 100644
index fcc91a1fa..000000000
--- a/keyboard/atomic/keymap_ricky.c
+++ /dev/null
@@ -1,15 +0,0 @@
-#include "keymap_common.h"
-
-// JCK: Semi-Standard layout
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty */
- [0] = KEYMAP_JCK(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, PSCR, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, INS, \
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, DEL, \
- LCTL, LGUI, LALT, SPC, RALT, RCTL, LEFT, DOWN, RGHT)
-};
-const uint16_t PROGMEM fn_actions[] = {
-};
-
diff --git a/keyboard/atomic/keymap_vlad.c b/keyboard/atomic/keymap_vlad.c
deleted file mode 100644
index e56bcf161..000000000
--- a/keyboard/atomic/keymap_vlad.c
+++ /dev/null
@@ -1,14 +0,0 @@
-#include "keymap_common.h"
-
-// JCK: Semi-Standard layout
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* 0: qwerty */
- [0] = KEYMAP_ASK(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, \
- TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, DEL, \
- CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, VOLU, \
- LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, VOLD, \
- LCTL, LGUI, LALT, LGUI, SPC, RGUI, RALT, RGUI, RCTL, LEFT, DOWN, RGHT)
-};
-const uint16_t PROGMEM fn_actions[] = {
-}; \ No newline at end of file
diff --git a/keyboard/atomic/led.c b/keyboard/atomic/led.c
index 2d52fbf1c..2c0574660 100644
--- a/keyboard/atomic/led.c
+++ b/keyboard/atomic/led.c
@@ -22,4 +22,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
void led_set(uint8_t usb_led)
{
+ // // Using PE6 Caps Lock LED
+ // if (usb_led & (1<<USB_LED_CAPS_LOCK))
+ // {
+ // // Output high.
+ // DDRE |= (1<<6);
+ // PORTE |= (1<<6);
+ // }
+ // else
+ // {
+ // // Output low.
+ // DDRE &= ~(1<<6);
+ // PORTE &= ~(1<<6);
+ // }
}
diff --git a/keyboard/atomic/matrix.c b/keyboard/atomic/matrix.c
index 98102cb69..2f2dbdb10 100644
--- a/keyboard/atomic/matrix.c
+++ b/keyboard/atomic/matrix.c
@@ -1,5 +1,6 @@
/*
-Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2012 Jun Wako
+Generated by planckkeyboard.com (2014 Jack Humbert)
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
@@ -22,7 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <stdbool.h>
#include <avr/io.h>
#include <util/delay.h>
-#include "action_layer.h"
#include "print.h"
#include "debug.h"
#include "util.h"
@@ -43,7 +43,6 @@ static void init_cols(void);
static void unselect_rows(void);
static void select_row(uint8_t row);
-
inline
uint8_t matrix_rows(void)
{
@@ -56,7 +55,6 @@ uint8_t matrix_cols(void)
return MATRIX_COLS;
}
-
void matrix_init(void)
{
// initialize row and col
@@ -96,7 +94,6 @@ uint8_t matrix_scan(void)
}
}
-
return 1;
}
@@ -109,7 +106,7 @@ bool matrix_is_modified(void)
inline
bool matrix_is_on(uint8_t row, uint8_t col)
{
- return (matrix[row] & ((matrix_row_t)1<<col));
+ return (matrix[row] & ((matrix_row_t)1<col));
}
inline
@@ -137,51 +134,39 @@ uint8_t matrix_key_count(void)
return count;
}
-/* Column pin configuration
- * col: 0 1 2 3 4 5 6 7 8 9 10 11
- * pin: F0 F1 F4 F5 F6 F7 B6 B5 B4 D7 D5 D4
- */
-
static void init_cols(void)
{
- DDRC &= ~(1<<6 | 1<<7);
- PORTC |= (1<<6 | 1<<7);
- DDRD &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
- PORTD |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
- DDRB &= ~(1<<4 | 1<<5 | 1<<6);
- PORTB |= (1<<4 | 1<<5 | 1<<6);
- DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7);
- PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7);
+ DDRB &= ~(1<<6 | 1<<5 | 1<<4);
+ PORTB |= (1<<6 | 1<<5 | 1<<4);
+ DDRD &= ~(1<<7 | 1<<6 | 1<<4);
+ PORTD |= (1<<7 | 1<<6 | 1<<4);
+ DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7);
+ PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7);
+
}
static matrix_row_t read_cols(void)
{
- return (PINC&(1<<6) ? 0 : (1<< 0)) |
- (PINC&(1<<7) ? 0 : (1<< 1)) |
- (PIND&(1<<5) ? 0 : (1<< 2)) |
- (PIND&(1<<4) ? 0 : (1<< 3)) |
- (PIND&(1<<6) ? 0 : (1<< 4)) |
- (PIND&(1<<7) ? 0 : (1<< 5)) |
- (PINB&(1<<4) ? 0 : (1<< 6)) |
- (PINB&(1<<5) ? 0 : (1<< 7)) |
- (PINB&(1<<6) ? 0 : (1<< 8)) |
- (PINF&(1<<7) ? 0 : (1<< 9)) |
- (PINF&(1<<6) ? 0 : (1<<10)) |
- (PINF&(1<<5) ? 0 : (1<<11)) |
- (PINF&(1<<4) ? 0 : (1<<12)) |
- (PINF&(1<<1) ? 0 : (1<<13)) |
- (PINF&(1<<0) ? 0 : (1<<14));
+ return (PIND&(1<<4) ? 0 : (1<<0)) |
+ (PIND&(1<<6) ? 0 : (1<<1)) |
+ (PIND&(1<<7) ? 0 : (1<<2)) |
+ (PINB&(1<<4) ? 0 : (1<<3)) |
+ (PINB&(1<<5) ? 0 : (1<<4)) |
+ (PINB&(1<<6) ? 0 : (1<<5)) |
+ (PINF&(1<<7) ? 0 : (1<<6)) |
+ (PINF&(1<<6) ? 0 : (1<<7)) |
+ (PINF&(1<<5) ? 0 : (1<<8)) |
+ (PINF&(1<<4) ? 0 : (1<<9)) |
+ (PINF&(1<<1) ? 0 : (1<<10)) |
+ (PINF&(1<<0) ? 0 : (1<<11));
+
}
-/* Row pin configuration
- * row: 0 1 2 3
- * pin: B0 B1 B2 B3
- */
static void unselect_rows(void)
{
- // Hi-Z(DDR:0, PORT:0) to unselect
- DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<7);
- PORTB |= (1<<0 | 1<<1 | 1<<2 | 1<<3 | 1<<7);
+ DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3);
+ PORTB |= (1<<0 | 1<<1 | 1<<2 | 1<<3);
+
}
static void select_row(uint8_t row)
@@ -203,9 +188,6 @@ static void select_row(uint8_t row)
DDRB |= (1<<3);
PORTB &= ~(1<<3);
break;
- case 4:
- DDRB |= (1<<7);
- PORTB &= ~(1<<7);
- break;
+
}
}