Add Crawlpad 2017 files.
parent
53b043d4ef
commit
6fddb31c4c
@ -0,0 +1,52 @@
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
#include "config_common.h"
|
||||
|
||||
/* USB Device descriptor parameter */
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6070
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER WoodKeys.click
|
||||
#define PRODUCT CrawlPad
|
||||
#define DESCRIPTION ATX Keycrawl 2017
|
||||
|
||||
/* key matrix size */
|
||||
#define MATRIX_ROWS 4
|
||||
#define MATRIX_COLS 4
|
||||
|
||||
/* key matrix pins */
|
||||
#define MATRIX_ROW_PINS { F0, F1, F4, F5 }
|
||||
#define MATRIX_COL_PINS { D4, D5, D6, D7 }
|
||||
#define UNUSED_PINS
|
||||
|
||||
/* Pins for custom per-row LEDs. Should be changed to use named pins. */
|
||||
#define LED_ROW_PINS { 8, 9, 10, 11 }
|
||||
|
||||
/* COL2ROW or ROW2COL */
|
||||
#define DIODE_DIRECTION ROW2COL
|
||||
|
||||
/* Set 0 if debouncing isn't needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
|
||||
#define LOCKING_SUPPORT_ENABLE
|
||||
|
||||
/* Locking resynchronize hack */
|
||||
#define LOCKING_RESYNC_ENABLE
|
||||
|
||||
/* key combination for command */
|
||||
#define IS_COMMAND() ( \
|
||||
false \
|
||||
)
|
||||
|
||||
/* prevent stuck modifiers */
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
#define RGB_DI_PIN D3
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLED_NUM 3
|
||||
#endif
|
||||
|
||||
#endif
|
@ -0,0 +1 @@
|
||||
#include "crawlpad.h"
|
@ -0,0 +1,18 @@
|
||||
#ifndef KB_H
|
||||
#define KB_H
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#define KEYMAP( \
|
||||
K00, K01, K02, K03, \
|
||||
K10, K11, K12, K13, \
|
||||
K20, K21, K22, K23, \
|
||||
K30, K31, K32, K33 \
|
||||
) { \
|
||||
{ K00, K01, K02, K03 }, \
|
||||
{ K10, K11, K12, K13 }, \
|
||||
{ K20, K21, K22, K23 }, \
|
||||
{ K30, K31, K32, K33 } \
|
||||
}
|
||||
|
||||
#endif
|
File diff suppressed because one or more lines are too long
@ -0,0 +1,117 @@
|
||||
#include "../../crawlpad.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
BL1 = SAFE_RANGE,
|
||||
BL2,
|
||||
BL3,
|
||||
BL4
|
||||
};
|
||||
|
||||
const uint8_t LED_PINS[] = LED_ROW_PINS;
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
KEYMAP(
|
||||
KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_P4, KC_P5, KC_P6, KC_PMNS,
|
||||
KC_P1, KC_P2, KC_P3, KC_PAST,
|
||||
MO(1), KC_P0, KC_PDOT, KC_ENT),
|
||||
|
||||
KEYMAP(
|
||||
KC_NLCK, BL1, KC_TRNS, KC_PSLS,
|
||||
RESET, BL2, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL3, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, BL4, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
||||
|
||||
void set_led(int idx, bool enable) {
|
||||
uint8_t pin = LED_PINS[idx];
|
||||
if (enable) {
|
||||
_SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF);
|
||||
} else {
|
||||
/* PORTx &= ~n */
|
||||
_SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF);
|
||||
}
|
||||
}
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
|
||||
return MACRO_NONE ;
|
||||
}
|
||||
|
||||
void matrix_init_user(void) {
|
||||
/* set LED row pins to output and low */
|
||||
DDRB |= (1 << 4) | (1 << 5) | (1 << 6) | (1 << 7);
|
||||
PORTB &= ~(1 << 4) & ~(1 << 5) & ~(1 << 6) & ~(1 << 7);
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case BL1:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 4);
|
||||
} else {
|
||||
PORTB &= ~(1 << 4);
|
||||
}
|
||||
return false;
|
||||
case BL2:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 5);
|
||||
} else {
|
||||
PORTB &= ~(1 << 5);
|
||||
}
|
||||
return false;
|
||||
case BL3:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 6);
|
||||
} else {
|
||||
PORTB &= ~(1 << 6);
|
||||
}
|
||||
return false;
|
||||
case BL4:
|
||||
if (record->event.pressed) {
|
||||
PORTB |= (1 << 7);
|
||||
} else {
|
||||
PORTB &= ~(1 << 7);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
if (usb_led & (1 << USB_LED_NUM_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_CAPS_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_SCROLL_LOCK)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_COMPOSE)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
if (usb_led & (1 << USB_LED_KANA)) {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
# Crawlpad
|
||||
|
||||
![Crawlpad](https://imgur.com/8BnztWo)
|
||||
|
||||
A 4x4 macropad/numpad, exclusively availabe at Keycrawl events.
|
||||
|
||||
Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
|
||||
Hardware Supported: Crawlpad
|
||||
Hardware Availability: Exclusive to Keycrawl events, contact [awwwwwwyeaahhhhhh](https://www.reddit.com/user/awwwwwwyeaahhhhhh) for more details.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make crawlpad:default
|
||||
|
||||
See [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.
|
||||
|
||||
For those that prefer a GUI tool, the crawlpad.json file in this repo can be used on [kbfirmware.com](http://kbfirmware.com].
|
@ -0,0 +1,56 @@
|
||||
# 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
|
||||
|
||||
|
||||
# Boot Section Size in *bytes*
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE ?= no # Console for debug(+400)
|
||||
COMMAND_ENABLE ?= no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE ?= no # [Crawlpad] Custom backlighting code is used, so this should not be enabled
|
||||
AUDIO_ENABLE ?= no # [Crawlpad] This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
|
||||
RGBLIGHT_ENABLE ?= no # [Crawlpad] This can be enabled if a ws2812 strip is connected to the expansion port.
|
Loading…
Reference in New Issue