summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2015-10-30 00:49:11 -0400
committerJack Humbert <jack.humb@gmail.com>2015-10-30 00:49:11 -0400
commit5901f5911b7642822b05c53a5a1d6b6549e15199 (patch)
treed6eca9e3527cfb9505a766bc0c9515dea585a303
parenteb2795b4d649f062430c859012bc6bd8faa847ff (diff)
atomic files
-rw-r--r--keyboard/atomic/atomic.c40
-rw-r--r--keyboard/atomic/atomic.h30
-rw-r--r--keyboard/atomic/keymaps/keymap_abienz.c36
-rw-r--r--keyboard/atomic/keymaps/keymap_default.c79
4 files changed, 185 insertions, 0 deletions
diff --git a/keyboard/atomic/atomic.c b/keyboard/atomic/atomic.c
new file mode 100644
index 0000000000..fa66266a4c
--- /dev/null
+++ b/keyboard/atomic/atomic.c
@@ -0,0 +1,40 @@
+#include "atomic.h"
+
+__attribute__ ((weak))
+void * matrix_init_user(void) {
+ // leave these blank
+};
+
+__attribute__ ((weak))
+void * matrix_scan_user(void) {
+ // leave these blank
+};
+
+void * matrix_init_kb(void) {
+ // put your keyboard start-up code here
+ // runs once when the firmware starts up
+
+ MCUCR |= (1<<JTD);
+ MCUCR |= (1<<JTD);
+
+#ifdef BACKLIGHT_ENABLE
+ backlight_init_ports();
+#endif
+
+ // Turn status LED on
+ DDRE |= (1<<6);
+ PORTE |= (1<<6);
+
+ if (matrix_init_user) {
+ (*matrix_init_user)();
+ }
+};
+
+void * matrix_scan_kb(void) {
+ // put your looping keyboard code here
+ // runs every cycle (a lot)
+
+ if (matrix_scan_user) {
+ (*matrix_scan_user)();
+ }
+}; \ No newline at end of file
diff --git a/keyboard/atomic/atomic.h b/keyboard/atomic/atomic.h
new file mode 100644
index 0000000000..95982ecad1
--- /dev/null
+++ b/keyboard/atomic/atomic.h
@@ -0,0 +1,30 @@
+#ifndef ATOMIC_H
+#define ATOMIC_H
+
+#include "matrix.h"
+#include "keymap_common.h"
+#include "backlight.h"
+#include <stddef.h>
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP_SEMI_STANDARD( \
+ 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 \
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, KC_NO, 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, KC_NO, K2D, K2E }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, KC_NO, K3C, K3D, K3E }, \
+ { K40, K41, KC_NO, K43, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, K4E } \
+}
+
+void * matrix_init_user(void);
+void * matrix_scan_user(void);
+
+#endif \ No newline at end of file
diff --git a/keyboard/atomic/keymaps/keymap_abienz.c b/keyboard/atomic/keymaps/keymap_abienz.c
new file mode 100644
index 0000000000..589a64dc4e
--- /dev/null
+++ b/keyboard/atomic/keymaps/keymap_abienz.c
@@ -0,0 +1,36 @@
+#include "atomic.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = { /* Colemak */
+ { 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_NO },
+ { KC_TAB, CM_Q, CM_W, CM_F, CM_P, CM_G, CM_J, CM_L, CM_U, CM_Y, CM_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL },
+ { KC_BSPC, CM_A, CM_R, CM_S, CM_T, CM_D, CM_H, CM_N, CM_E, CM_I, CM_O, KC_QUOT, KC_ENT, KC_NO, KC_PGUP },
+ { KC_LSFT, CM_Z, CM_X, CM_C, CM_V, CM_B, CM_K, CM_M, CM_COMM, CM_DOT, CM_SLSH, KC_RSFT, KC_NO, KC_UP, KC_PGDN },
+ { KC_LCTL, KC_LGUI, KC_NO, KC_LALT, FUNC(1), KC_SPC, KC_NO, KC_RALT, FUNC(2), KC_RGUI, KC_NO, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
+ },
+ [1] = { /* function */
+ { KC_GRV, 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_NO },
+ { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
+ { KC_TRNS, KC_TRNS, KC_TRNS, KC_SLEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS },
+ { KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_MPLY },
+ { KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, FUNC(1), KC_TRNS, KC_NO, KC_TRNS, FUNC(2), KC_TRNS, KC_NO, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT },
+ }
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [1] = ACTION_LAYER_MOMENTARY(1),
+ [2] = ACTION_LAYER_MOMENTARY(1),
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ return MACRODOWN(TYPE(KC_T), END);
+ break;
+ }
+ return MACRO_NONE;
+};
+
diff --git a/keyboard/atomic/keymaps/keymap_default.c b/keyboard/atomic/keymaps/keymap_default.c
new file mode 100644
index 0000000000..f37d9d9a51
--- /dev/null
+++ b/keyboard/atomic/keymaps/keymap_default.c
@@ -0,0 +1,79 @@
+#include "atomic.h"
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [0] = { /* Qwerty */
+ { 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, KC_DEL },
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+// ┌─ 2u ────────────┐
+// │ X │
+// └─────────────────┘
+ { 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 },
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
+// │ X │ │ X │
+// └─────────────────┘ └─────────────────┘
+ { KC_ESC, 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_ENT, KC_PGUP },
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
+// │ X │ │ X │
+// └─────────────────┘ └─────────────────┘
+// ┌─ 2u ────────────┐
+// │ X │
+// └─────────────────┘
+ { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN },
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+// ┌─ 2u ────────────┐
+// │ X │
+// └─────────────────┘
+// ┌─ 2u ────────────┐ ┌─ 2u ────────────┐
+// │ X │ │ X │
+// └─────────────────┘ └─────────────────┘
+// ┌─ 2u ────────────┐
+// │ X │
+// └─────────────────┘
+ { BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, BL_STEP, KC_LEFT, KC_DOWN, KC_RGHT },
+// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
+// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
+// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
+// ┌─ 1.25u ──┬ 1.25u ───┬─── 1.25u ┬─── 1.25u ─┬─ 2u ────────────┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬──── 1.25u ┐
+// │ X │ X │ X │ X │ X │ X │ X │ X │ X │
+// └──────────┴──────────┴──────────┴───────────┴─────────────────┴──────────┴──────────┴──────────┴───────────┘
+// ┌─ 2u ────────────┐
+// │ X │
+// └─────────────────┘
+// ┌───────────────────── 6.25u ────────────────────────────┐
+// │ X │
+// └────────────────────────────────────────────────────────┘
+// ┌─────────────────────── 6.25u ──────────────────────────┬─ 1.25u ──┬─ 1.25u ──┬─ 1.25u ──┬─── 1.25u ┬── 1.25u ──┐
+// │ X │ X │ X │ X │ X │ X │
+// └────────────────────────────────────────────────────────┴──────────┴──────────┴──────────┴──────────┴───────────┘
+ }
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [1] = ACTION_LAYER_MOMENTARY(2), // to RAISE
+ [2] = ACTION_LAYER_MOMENTARY(3), // to LOWER
+
+ [3] = ACTION_DEFAULT_LAYER_SET(0),
+ [4] = ACTION_DEFAULT_LAYER_SET(1),
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ switch(id) {
+ case 0:
+ return MACRODOWN(TYPE(KC_T), END);
+ break;
+ }
+ return MACRO_NONE;
+};