aboutsummaryrefslogtreecommitdiff
path: root/keyboards/ep
diff options
context:
space:
mode:
authorElliot Powell <32494740+e11i0t23@users.noreply.github.com>2018-11-16 19:31:44 +0000
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2018-11-16 11:31:44 -0800
commit774bee642685b6349e00603a9fd8a94432a7e893 (patch)
tree83bc0ab9f78d7a8bda7947aa2c16913faf7b9c3d /keyboards/ep
parentdefcfb4953d49a0fc72ecf49faeac0534aafc190 (diff)
downloadqmk_firmware-774bee642685b6349e00603a9fd8a94432a7e893.tar.gz
qmk_firmware-774bee642685b6349e00603a9fd8a94432a7e893.zip
Moved ep40 to ep/40 for easier adding of next ep keyboard (#4439)
* add initial ep40 files * fixed issues * updated keymap * Added media control * Update keyboards/handwired/ep40/rules.mk Co-Authored-By: e11i0t23 <32494740+e11i0t23@users.noreply.github.com> * Fixed requested changes * Fixed more requested changes * Added delete key to layor 1 * Updated defualt keympap to have a Backspace mod del key * removed place holder Co-Authored-By: e11i0t23 <32494740+e11i0t23@users.noreply.github.com> * removed obsolete code Co-Authored-By: e11i0t23 <32494740+e11i0t23@users.noreply.github.com> * Moved ep40 to ep/40 * Fixed file names for moved code * Fixed readme
Diffstat (limited to 'keyboards/ep')
-rw-r--r--keyboards/ep/40/40.c43
-rw-r--r--keyboards/ep/40/40.h44
-rw-r--r--keyboards/ep/40/config.h114
-rw-r--r--keyboards/ep/40/info.json12
-rw-r--r--keyboards/ep/40/keymaps/default/keymap.c71
-rw-r--r--keyboards/ep/40/keymaps/default/readme.md1
-rw-r--r--keyboards/ep/40/readme.md15
-rw-r--r--keyboards/ep/40/rules.mk80
8 files changed, 380 insertions, 0 deletions
diff --git a/keyboards/ep/40/40.c b/keyboards/ep/40/40.c
new file mode 100644
index 000000000..7c235f3ce
--- /dev/null
+++ b/keyboards/ep/40/40.c
@@ -0,0 +1,43 @@
1/* Copyright 2018 Elliot Powell
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include "40.h"
17
18void matrix_init_kb(void) {
19 // put your keyboard start-up code here
20 // runs once when the firmware starts up
21
22 matrix_init_user();
23}
24
25void matrix_scan_kb(void) {
26 // put your looping keyboard code here
27 // runs every cycle (a lot)
28
29 matrix_scan_user();
30}
31
32bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
33 // put your per-action keyboard code here
34 // runs for every action, just before processing by the firmware
35
36 return process_record_user(keycode, record);
37}
38
39void led_set_kb(uint8_t usb_led) {
40 // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
41
42 led_set_user(usb_led);
43}
diff --git a/keyboards/ep/40/40.h b/keyboards/ep/40/40.h
new file mode 100644
index 000000000..30f3d15b4
--- /dev/null
+++ b/keyboards/ep/40/40.h
@@ -0,0 +1,44 @@
1/* Copyright 2018 Elliot Powell
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#ifndef EP40_H
17#define EP40_H
18
19#include "quantum.h"
20
21/* This a shortcut to help you visually see your layout.
22 *
23 * The first section contains all of the arguments representing the physical
24 * layout of the board and position of the keys.
25 *
26 * The second converts the arguments into a two-dimensional array which
27 * represents the switch matrix.
28 */
29#define xxx KC_NO
30
31#define LAYOUT(\
32 k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b,\
33 k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b,\
34 k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b,\
35 k30, k31, k32, k34, k36, k38, k39, k3a, k3b \
36) \
37{ \
38 {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b},\
39 {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, xxx, k1b},\
40 {k20, xxx, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b},\
41 {k30, k31, k32, xxx, k34, xxx, k36, xxx, k38, k39, k3a, k3b} \
42}
43
44#endif
diff --git a/keyboards/ep/40/config.h b/keyboards/ep/40/config.h
new file mode 100644
index 000000000..90630cd68
--- /dev/null
+++ b/keyboards/ep/40/config.h
@@ -0,0 +1,114 @@
1/*
2Copyright 2018 Elliot Powell
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#include "config_common.h"
21
22/* USB Device descriptor parameter */
23#define VENDOR_ID 0xFEED
24#define PRODUCT_ID 0x4040
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Elliot Powell
27#define PRODUCT ep40
28#define DESCRIPTION A simple 40% keyboard
29
30/* key matrix size */
31#define MATRIX_ROWS 4
32#define MATRIX_COLS 12
33
34/*
35 * Keyboard Matrix Assignments
36 *
37 * Change this to how you wired your keyboard
38 * COLS: AVR pins used for columns, left to right
39 * ROWS: AVR pins used for rows, top to bottom
40 * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
41 * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
42 *
43*/
44#define MATRIX_ROW_PINS { C7, C6, B6, B5 }
45#define MATRIX_COL_PINS { F6, F5, F4, F1, F0, D2, D3, D5, D4, D6, D7, B4 }
46
47/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */
48#define DIODE_DIRECTION COL2ROW
49
50/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
51#define DEBOUNCING_DELAY 5
52
53/* define if matrix has ghost (lacks anti-ghosting diodes) */
54//#define MATRIX_HAS_GHOST
55
56/* If defined, GRAVE_ESC will always act as ESC when CTRL is held.
57 * This is userful for the Windows task manager shortcut (ctrl+shift+esc).
58 */
59// #define GRAVE_ESC_CTRL_OVERRIDE
60
61/*
62 * Force NKRO
63 *
64 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
65 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
66 * makefile for this to work.)
67 *
68 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
69 * until the next keyboard reset.
70 *
71 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
72 * fully operational during normal computer usage.
73 *
74 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
75 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
76 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
77 * power-up.
78 *
79 */
80//#define FORCE_NKRO
81
82/*
83 * Magic Key Options
84 *
85 * Magic keys are hotkey commands that allow control over firmware functions of
86 * the keyboard. They are best used in combination with the HID Listen program,
87 * found here: https://www.pjrc.com/teensy/hid_listen.html
88 *
89 * The options below allow the magic key functionality to be changed. This is
90 * useful if your keyboard/keypad is missing keys and you want magic key support.
91 *
92 */
93
94/* key combination for magic key command */
95#define IS_COMMAND() ( \
96 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
97)
98/*
99 * Feature disable options
100 * These options are also useful to firmware size reduction.
101 */
102
103/* disable debug print */
104//#define NO_DEBUG
105
106/* disable print */
107//#define NO_PRINT
108
109/* disable action features */
110//#define NO_ACTION_LAYER
111//#define NO_ACTION_TAPPING
112//#define NO_ACTION_ONESHOT
113//#define NO_ACTION_MACRO
114//#define NO_ACTION_FUNCTION
diff --git a/keyboards/ep/40/info.json b/keyboards/ep/40/info.json
new file mode 100644
index 000000000..1c57ac674
--- /dev/null
+++ b/keyboards/ep/40/info.json
@@ -0,0 +1,12 @@
1{
2 "keyboard_name":"ep40",
3 "url":null,
4 "maintainer":"e11i0t23",
5 "width":12,
6 "hight":4,
7 "layouts": {
8 "LAYOUT": {
9 "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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3, "w":2.25}, {"x":5.25, "y":3, "w":2.75}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}]
10 }
11 }
12}
diff --git a/keyboards/ep/40/keymaps/default/keymap.c b/keyboards/ep/40/keymaps/default/keymap.c
new file mode 100644
index 000000000..1ac66bc01
--- /dev/null
+++ b/keyboards/ep/40/keymaps/default/keymap.c
@@ -0,0 +1,71 @@
1/* Copyright 2018 Elliot Powell
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16#include QMK_KEYBOARD_H
17
18static bool bsdel_mods = false;
19
20enum custom_keycodes {
21 M_BSDEL = SAFE_RANGE, // ensure these codes start after the highest keycode defined in Quantum
22};
23
24const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
25 [0] = LAYOUT( /* Base */
26 KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, M_BSDEL,\
27 KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, \
28 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT,\
29 LCTL_T(KC_LBRC), KC_LGUI, KC_LALT, KC_SPC, LT(1, KC_SPC), KC_RALT, MO(2), RCTL_T(KC_RBRC), KC_F5 \
30 ),
31
32 [1] = LAYOUT( /* Base */
33 KC_TRNS, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0, KC_TRNS,\
34 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_UP, KC_DOWN, KC_RIGHT, KC_TRNS,\
35 KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_TRNS,\
36 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \
37 ),
38
39 [2] = LAYOUT( /* Base */
40 KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 ,\
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_NUHS, KC_TRNS,\
42 KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS,\
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET \
44 ),
45};
46
47bool process_record_user(uint16_t keycode, keyrecord_t *record) {
48 switch (keycode) {
49 case M_BSDEL: {
50 uint8_t kc = KC_BSPC;
51
52 if (record->event.pressed) {
53 if (keyboard_report->mods) {
54 kc = KC_DEL;
55 }
56 register_code (kc);
57 bsdel_mods = keyboard_report->mods;
58 }
59 else {
60 if (bsdel_mods) {
61 kc = KC_DEL;
62 }
63 unregister_code (kc);
64 }
65
66 return false;
67 break;
68 }
69 }
70 return true;
71}
diff --git a/keyboards/ep/40/keymaps/default/readme.md b/keyboards/ep/40/keymaps/default/readme.md
new file mode 100644
index 000000000..242c0afb9
--- /dev/null
+++ b/keyboards/ep/40/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for ep40 \ No newline at end of file
diff --git a/keyboards/ep/40/readme.md b/keyboards/ep/40/readme.md
new file mode 100644
index 000000000..647842bad
--- /dev/null
+++ b/keyboards/ep/40/readme.md
@@ -0,0 +1,15 @@
1# ep40
2
3![ep40](https://i.imgur.com/Jl7w6I9.jpg)
4
5A simple 40% keyboard
6
7Keyboard Maintainer: [Elliot Powell](https://github.com/e11i0t23), [/u/e11i0t23 on reddit](https://reddit.com/u/e11i0t23)
8Hardware Supported: EP40 PCB
9Hardware Availability: None at the moment
10
11Make example for this keyboard (after setting up your build environment):
12
13 make ep/40:default
14
15See 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).
diff --git a/keyboards/ep/40/rules.mk b/keyboards/ep/40/rules.mk
new file mode 100644
index 000000000..9ddf9717e
--- /dev/null
+++ b/keyboards/ep/40/rules.mk
@@ -0,0 +1,80 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17
18#
19# LUFA specific
20#
21# Target architecture (see library "Board Types" documentation).
22ARCH = AVR8
23
24# Input clock frequency.
25# This will define a symbol, F_USB, in all source code files equal to the
26# input clock frequency (before any prescaling is performed) in Hz. This value may
27# differ from F_CPU if prescaling is used on the latter, and is required as the
28# raw input clock is fed directly to the PLL sections of the AVR for high speed
29# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
30# at the end, this will be done automatically to create a 32-bit value in your
31# source code.
32#
33# If no clock division is performed on the input clock inside the AVR (via the
34# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
35F_USB = $(F_CPU)
36
37# Interrupt driven control endpoint task(+60)
38OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
39
40
41# Bootloader selection
42# Teensy halfkay
43# Pro Micro caterina
44# Atmel DFU atmel-dfu
45# LUFA DFU lufa-dfu
46# QMK DFU qmk-dfu
47# atmega32a bootloadHID
48BOOTLOADER = atmel-dfu
49
50
51# If you don't know the bootloader type, then you can specify the
52# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line
53# Teensy halfKay 512
54# Teensy++ halfKay 1024
55# Atmel DFU loader 4096
56# LUFA bootloader 4096
57# USBaspLoader 2048
58# OPT_DEFS += -DBOOTLOADER_SIZE=4096
59
60
61# Build Options
62# change yes to no to disable
63#
64BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
65MOUSEKEY_ENABLE = no # Mouse keys(+4700)
66EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
67CONSOLE_ENABLE = yes # Console for debug(+400)
68COMMAND_ENABLE = yes # Commands for debug and configuration
69# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
70SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
71# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
72NKRO_ENABLE = no # USB Nkey Rollover
73BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default
74RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
75MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
76UNICODE_ENABLE = no # Unicode
77BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
78AUDIO_ENABLE = no # Audio output on port C6
79FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches
80HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400)