aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames OFarrell <jofarrell@gmail.com>2018-03-11 17:44:30 +1000
committerJack Humbert <jack.humb@gmail.com>2018-03-16 16:30:43 -0400
commit241421efd44b7d85870df6eef72fd68fcfaa8e59 (patch)
tree0728f6d35da88488105cc5983d2e0d15c1e8d0a3
parent3d1801e63a03779df5b47076b5b129b41d5f8891 (diff)
downloadqmk_firmware-241421efd44b7d85870df6eef72fd68fcfaa8e59.tar.gz
qmk_firmware-241421efd44b7d85870df6eef72fd68fcfaa8e59.zip
Added support for ca66
-rw-r--r--keyboards/ca66/ca66.c1
-rw-r--r--keyboards/ca66/ca66.h20
-rw-r--r--keyboards/ca66/config.h58
-rw-r--r--keyboards/ca66/keymaps/default/keymap.c36
-rw-r--r--keyboards/ca66/readme.md13
-rw-r--r--keyboards/ca66/rules.mk56
6 files changed, 184 insertions, 0 deletions
diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c
new file mode 100644
index 000000000..91f4826f9
--- /dev/null
+++ b/keyboards/ca66/ca66.c
@@ -0,0 +1 @@
#include "ca66.h"
diff --git a/keyboards/ca66/ca66.h b/keyboards/ca66/ca66.h
new file mode 100644
index 000000000..9e3638aac
--- /dev/null
+++ b/keyboards/ca66/ca66.h
@@ -0,0 +1,20 @@
1#ifndef KB_H
2#define KB_H
3
4#include "quantum.h"
5
6#define KEYMAP( \
7 K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \
8 K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \
9 K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \
10 K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K414, \
11 K401, K402, K403, K404, K406, K408, K409, K410, K411, K412, K413 \
12) { \
13 { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \
14 { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \
15 { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO, K214 }, \
16 { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \
17 { KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \
18}
19
20#endif
diff --git a/keyboards/ca66/config.h b/keyboards/ca66/config.h
new file mode 100644
index 000000000..f00b5109d
--- /dev/null
+++ b/keyboards/ca66/config.h
@@ -0,0 +1,58 @@
1#ifndef CONFIG_H
2#define CONFIG_H
3
4#include "config_common.h"
5
6/* USB Device descriptor parameter */
7#define VENDOR_ID 0xFEED
8#define PRODUCT_ID 0x6060
9#define DEVICE_VER 0x0001
10#define MANUFACTURER Barry
11#define PRODUCT CA66
12#define DESCRIPTION CA66
13
14/* key matrix size */
15#define MATRIX_ROWS 5
16#define MATRIX_COLS 15
17
18/* key matrix pins */
19#define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 }
20#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 }
21#define UNUSED_PINS
22
23/* COL2ROW or ROW2COL */
24#define DIODE_DIRECTION COL2ROW
25
26/* number of backlight levels */
27
28#ifdef BACKLIGHT_PIN
29#define BACKLIGHT_LEVELS 3
30#endif
31
32/* Set 0 if debouncing isn't needed */
33#define DEBOUNCING_DELAY 5
34
35/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
36#define LOCKING_SUPPORT_ENABLE
37
38/* Locking resynchronize hack */
39#define LOCKING_RESYNC_ENABLE
40
41/* key combination for command */
42#define IS_COMMAND() ( \
43 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
44)
45
46/* prevent stuck modifiers */
47#define PREVENT_STUCK_MODIFIERS
48
49#define RGB_DI_PIN B1
50#ifdef RGB_DI_PIN
51#define RGBLIGHT_ANIMATIONS
52#define RGBLED_NUM 6
53#define RGBLIGHT_HUE_STEP 8
54#define RGBLIGHT_SAT_STEP 8
55#define RGBLIGHT_VAL_STEP 8
56#endif
57
58#endif
diff --git a/keyboards/ca66/keymaps/default/keymap.c b/keyboards/ca66/keymaps/default/keymap.c
new file mode 100644
index 000000000..7feb0afb9
--- /dev/null
+++ b/keyboards/ca66/keymaps/default/keymap.c
@@ -0,0 +1,36 @@
1#include "ca66.h"
2
3const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
4
5 KEYMAP(
6 KC_GESC, 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_BSPC, KC_PSCR,
7 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,
8 MO(1), 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_PGUP,
9 KC_LSFT, KC_GRV, 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_PGDN,
10 KC_LCTL, KC_LGUI, KC_LALT, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
11
12 KEYMAP(
13 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_DEL, KC_DEL, RGB_TOG,
14 KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD,
15 KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME,
16 KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END,
17 KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI),
18};
19
20void matrix_init_user(void) {
21}
22
23void matrix_scan_user(void) {
24}
25
26bool process_record_user(uint16_t keycode, keyrecord_t *record) {
27 return true;
28}
29
30void led_set_user(uint8_t usb_led) {
31 if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
32 DDRD |= (1 << 1); PORTD &= ~(1 << 1);
33 } else {
34 DDRD &= ~(1 << 1); PORTD &= ~(1 << 1);
35 }
36}
diff --git a/keyboards/ca66/readme.md b/keyboards/ca66/readme.md
new file mode 100644
index 000000000..f8464fdd1
--- /dev/null
+++ b/keyboards/ca66/readme.md
@@ -0,0 +1,13 @@
1CA66
2==
3
4Custom 65%
5
6Keyboard Maintainer: QMK Community
7Hardware Supported: CA66
8
9Make example for this keyboard (after setting up your build environment):
10
11 make ca66:default
12
13See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/ca66/rules.mk b/keyboards/ca66/rules.mk
new file mode 100644
index 000000000..d3ad3d20c
--- /dev/null
+++ b/keyboards/ca66/rules.mk
@@ -0,0 +1,56 @@
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# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Interrupt driven control endpoint task(+60)
37OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
38
39
40# Boot Section Size in *bytes*
41OPT_DEFS += -DBOOTLOADER_SIZE=4096
42
43
44# Build Options
45# comment out to disable the options.
46#
47BOOTMAGIC_ENABLE ?= no
48MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
49EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
50CONSOLE_ENABLE ?= no # Console for debug(+400)
51COMMAND_ENABLE ?= no # Commands for debug and configuration
52SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
53NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
54BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality
55AUDIO_ENABLE ?= no
56RGBLIGHT_ENABLE ?= yes