aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/snagpad
diff options
context:
space:
mode:
authorGravatar William Chang <william@factual.com>2019-11-20 22:17:07 -0800
committerGravatar William Chang <william@factual.com>2019-11-20 22:17:07 -0800
commite7f4d56592b3975c38af329e77b4efd9108495e8 (patch)
tree0a416bccbf70bfdbdb9ffcdb3bf136b47378c014 /keyboards/snagpad
parent71493b2f9bbd5f3d18373c518fa14ccafcbf48fc (diff)
parent8416a94ad27b3ff058576f09f35f0704a8b39ff3 (diff)
downloadqmk_firmware-e7f4d56592b3975c38af329e77b4efd9108495e8.tar.gz
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'keyboards/snagpad')
-rw-r--r--keyboards/snagpad/config.h15
-rw-r--r--keyboards/snagpad/info.json49
-rw-r--r--keyboards/snagpad/readme.md24
-rw-r--r--keyboards/snagpad/rules.mk42
-rw-r--r--keyboards/snagpad/snagpad.h40
5 files changed, 84 insertions, 86 deletions
diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h
index 9503ae25f..a4ab9d5e2 100644
--- a/keyboards/snagpad/config.h
+++ b/keyboards/snagpad/config.h
@@ -48,25 +48,22 @@
#define RGBLIGHT_VAL_STEP 8
#endif
-// Does not use WT_MONO_BACKLIGHT
-// #define WT_MONO_BACKLIGHT
-
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
// EEPROM usage
// TODO: refactor with new user EEPROM code (coming soon)
#define EEPROM_MAGIC 0x451F
-#define EEPROM_MAGIC_ADDR 32
+#define EEPROM_MAGIC_ADDR 34
// Bump this every time we change what we store
// This will automatically reset the EEPROM with defaults
// and avoid loading invalid data from the EEPROM
#define EEPROM_VERSION 0x08
-#define EEPROM_VERSION_ADDR 34
+#define EEPROM_VERSION_ADDR 36
// Dynamic keymap starts after EEPROM version
-#define DYNAMIC_KEYMAP_EEPROM_ADDR 35
-// Dynamic macro starts after dynamic keymaps (35+(4*5*4*2)) = (35+160)
-#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 195
-#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 829
+#define DYNAMIC_KEYMAP_EEPROM_ADDR 37
+// Dynamic macro starts after dynamic keymaps (37+(4*5*4*2)) = (37+160)
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 197
+#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 827
#define DYNAMIC_KEYMAP_MACRO_COUNT 16 \ No newline at end of file
diff --git a/keyboards/snagpad/info.json b/keyboards/snagpad/info.json
index f6b19ee81..6e3ab601a 100644
--- a/keyboards/snagpad/info.json
+++ b/keyboards/snagpad/info.json
@@ -7,11 +7,50 @@
"height": 5,
"layouts": {
- "LAYOUT_ortho_5x4": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}]
- },
+ "LAYOUT_ortho_5x4": {
+ "layout": [
+ {"label":"Num Lock", "x":0, "y":0},
+ {"label":"/", "x":1, "y":0},
+ {"label":"*", "x":2, "y":0},
+ {"label":"-", "x":3, "y":0},
+ {"label":"7", "x":0, "y":1},
+ {"label":"8", "x":1, "y":1},
+ {"label":"9", "x":2, "y":1},
+ {"label":"+", "x":3, "y":1},
+ {"label":"4", "x":0, "y":2},
+ {"label":"5", "x":1, "y":2},
+ {"label":"6", "x":2, "y":2},
+ {"label":"+", "x":3, "y":2},
+ {"label":"1", "x":0, "y":3},
+ {"label":"2", "x":1, "y":3},
+ {"label":"3", "x":2, "y":3},
+ {"label":"Enter", "x":3, "y":3},
+ {"label":"0", "x":0, "y":4},
+ {"label":"0", "x":1, "y":4},
+ {"label":".", "x":2, "y":4},
+ {"label":"Enter", "x":3, "y":4}
+ ]
+ },
"LAYOUT_numpad_5x4": {
- "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1, "h":2}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "h":2}, {"x":0, "y":4, "w":2}, {"x":2, "y":4}]
- }
+ "layout": [
+ {"label":"Num Lock", "x":0, "y":0},
+ {"label":"/", "x":1, "y":0},
+ {"label":"*", "x":2, "y":0},
+ {"label":"-", "x":3, "y":0},
+ {"label":"7", "x":0, "y":1},
+ {"label":"8", "x":1, "y":1},
+ {"label":"9", "x":2, "y":1},
+ {"label":"4", "x":0, "y":2},
+ {"label":"5", "x":1, "y":2},
+ {"label":"6", "x":2, "y":2},
+ {"label":"+", "x":3, "y":1, "h":2},
+ {"label":"1", "x":0, "y":3},
+ {"label":"2", "x":1, "y":3},
+ {"label":"3", "x":2, "y":3},
+ {"label":"0", "x":0, "y":4, "w":2},
+ {"label":".", "x":2, "y":4},
+ {"label":"Enter", "x":3, "y":3, "h":2}
+ ]
+ }
}
}
diff --git a/keyboards/snagpad/readme.md b/keyboards/snagpad/readme.md
index eeafceba9..b59bd7588 100644
--- a/keyboards/snagpad/readme.md
+++ b/keyboards/snagpad/readme.md
@@ -1,21 +1,21 @@
# Snagpad
-QMK for Snagpad
-This PCB can be used as a standard numpad, or a ortho 5x4 macropad.
+A five-row PCB that can be built as a standard numpad or an ortholinear 5x4 macropad. Can be built as single PCB with custom case, or as two PCB style with standoffs. Requires a Pro Micro.
-For QMK Configurator, the info.json is utilised.
-- For 2U keys on numpad, the first 1u row/column key assignment is the same as the 2u position.
+Keyboard Maintainer: [Flehrad](https://github.com/flehrad)
+Hardware Supported: Snagpad PCB, Pro Micro
+Hardware Availability: [GitHub](https://github.com/flehrad/Snagpad)
-Build requires a pro micro.
+Make example for this keyboard (after setting up your build environment):
-Can be built as single PCB with custom case, or as two PCB style with standoffs.
+ make snagpad:default
-If you like this simple PCB and want to make a donation, you can at https://paypal.me/theboardpodcast
+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).
-Check out our:
-
-YouTube (https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw)
+If you like this simple PCB and want to make a donation, you can do so at https://paypal.me/theboardpodcast.
-Podcast (www.libsyn.com/theboardpodcast)
+Check out our:
-Patreon (www.patreon.com/theboardpodcast)
+- [YouTube](https://www.youtube.com/channel/UCg98oJZNffR9nDLJNkorjqw)
+- [Podcast](https://podcasts.apple.com/au/podcast/theboard-mechanical-keyboard/id1147089749?mt=2)
+- [Patreon](https://www.patreon.com/theboardpodcast)
diff --git a/keyboards/snagpad/rules.mk b/keyboards/snagpad/rules.mk
index 624ed262e..9256eaed1 100644
--- a/keyboards/snagpad/rules.mk
+++ b/keyboards/snagpad/rules.mk
@@ -1,54 +1,16 @@
# MCU name
MCU = atmega32u4
-# Processor frequency.
-# This will define a symbol, F_CPU, in all source code files equal to the
-# processor frequency in Hz. You can then use this symbol in your source code to
-# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
-# automatically to create a 32-bit value in your source code.
-#
-# This will be an integer division of F_USB below, as it is sourced by
-# F_USB after it has run through any CPU prescalers. Note that this value
-# does not *change* the processor frequency - it should merely be updated to
-# reflect the processor speed set externally so that the code can use accurate
-# software delays.
-F_CPU = 16000000
-
-#
-# LUFA specific
-#
-# Target architecture (see library "Board Types" documentation).
-ARCH = AVR8
-
-# Input clock frequency.
-# This will define a symbol, F_USB, in all source code files equal to the
-# input clock frequency (before any prescaling is performed) in Hz. This value may
-# differ from F_CPU if prescaling is used on the latter, and is required as the
-# raw input clock is fed directly to the PLL sections of the AVR for high speed
-# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
-# at the end, this will be done automatically to create a 32-bit value in your
-# source code.
-#
-# If no clock division is performed on the input clock inside the AVR (via the
-# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
-F_USB = $(F_CPU)
-
-# Interrupt driven control endpoint task(+60)
-OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
-
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
-# atmega32a bootloadHID
+# ATmega32A bootloadHID
+# ATmega328P USBasp
BOOTLOADER = caterina
-# Boot Section Size in *bytes*
-# OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-
# Build Options
# comment out to disable the options.
#
diff --git a/keyboards/snagpad/snagpad.h b/keyboards/snagpad/snagpad.h
index d6a62ddf7..f1e5e34e6 100644
--- a/keyboards/snagpad/snagpad.h
+++ b/keyboards/snagpad/snagpad.h
@@ -3,28 +3,28 @@
#include "quantum.h"
#define LAYOUT_ortho_5x4( \
- K00, K01, K02, K03, \
- K10, K11, K12, K13, \
- K20, K21, K22, K23, \
- K30, K31, K32, K33, \
- K40, K41, K42, K43 \
+ K00, K01, K02, K03, \
+ K10, K11, K12, K13, \
+ K20, K21, K22, K23, \
+ K30, K31, K32, K33, \
+ K40, K41, K42, K43 \
) { \
- { K00, K01, K02, K03 }, \
- { K10, K11, K12, K13 }, \
- { K20, K21, K22, K23 }, \
- { K30, K31, K32, K33 }, \
- { K40, K41, K42, K43 } \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, K23 }, \
+ { K30, K31, K32, K33 }, \
+ { K40, K41, K42, K43 } \
}
#define LAYOUT_numpad_5x4( \
- K00, K01, K02, K03, \
- K10, K11, K12, \
- K20, K21, K22, K13, \
- K30, K31, K32, \
- K40, K42, K33 \
+ K00, K01, K02, K03, \
+ K10, K11, K12, \
+ K20, K21, K22, K13, \
+ K30, K31, K32, \
+ K40, K42, K33 \
) { \
- { K00, K01, K02, K03 }, \
- { K10, K11, K12, K13 }, \
- { K20, K21, K22, KC_NO }, \
- { K30, K31, K32, K33 }, \
- { K40, KC_NO, K42, KC_NO } \
+ { K00, K01, K02, K03 }, \
+ { K10, K11, K12, K13 }, \
+ { K20, K21, K22, KC_NO }, \
+ { K30, K31, K32, K33 }, \
+ { K40, KC_NO, K42, KC_NO } \
}