Add support for Big Series 1-key PCB by Woodkeys.click

This commit is contained in:
Cole Markham 2017-12-17 22:04:50 -06:00 committed by Jack Humbert
parent b4bdebab9a
commit 23b45710ac
9 changed files with 431 additions and 0 deletions

26
keyboards/bigseries/bigseries.c Executable file
View File

@ -0,0 +1,26 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "bigseries.h"
void matrix_scan_kb(void) {
// Looping keyboard code goes here
// This runs every cycle (a lot)
matrix_scan_user();
#ifdef BACKLIGHT_ENABLE
backlight_task();
#endif
};

28
keyboards/bigseries/bigseries.h Executable file
View File

@ -0,0 +1,28 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef BIGSWITCH_H
#define BIGSWITCH_H
#include "quantum.h"
#define KEYMAP( \
K00 \
) { \
{ K00 } \
}
#endif

59
keyboards/bigseries/config.h Executable file
View File

@ -0,0 +1,59 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_H
#define CONFIG_H
#include "config_common.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x6071
#define DEVICE_VER 0x0002
#define MANUFACTURER WoodKeys.click
#define PRODUCT BigSeries Single Keyboard
#define DESCRIPTION Single key board for Novelkeys Big Series Switch
/* key matrix size */
#define MATRIX_ROWS 1
#define MATRIX_COLS 1
/* key matrix pins */
#define MATRIX_ROW_PINS { B0 }
#define MATRIX_COL_PINS { B4 }
#define UNUSED_PINS
/* COL2ROW or ROW2COL */
#define DIODE_DIRECTION ROW2COL
/* Set 0 if debouncing isn't needed */
#define DEBOUNCING_DELAY 50
/* 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 5
#endif
#endif

View File

@ -0,0 +1,93 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../../bigseries.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP(
KC_A),
};
bool initialized = 0;
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
return MACRO_NONE ;
}
void matrix_init_user(void) {
if (!initialized){
dprintf("Initializing in matrix_scan_user");
rgblight_enable();
rgblight_mode(7);
rgblight_sethsv(0,255,255);
rgblight_setrgb(0x00, 0x00, 0xFF);
initialized = 1;
}
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_A:
if (record->event.pressed) {
SEND_STRING("Howdy!!\n");
rgblight_step();
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 {
}
}

View File

@ -0,0 +1,23 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef CONFIG_USER_H
#define CONFIG_USER_H
#define TAPPING_TERM 400
#endif

View File

@ -0,0 +1,127 @@
/*
Copyright 2018 Cole Markham
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "../../bigseries.h"
#include "print.h"
extern rgblight_config_t rgblight_config;
enum custom_keycodes {
BL = SAFE_RANGE
};
enum custom_layers {
BASE = 0,
LED
};
//Tap Dance Declarations
enum {
TD_TOGGLE = 0
};
void dance_toggle (qk_tap_dance_state_t *state, void *user_data) {
if (state->count >= 2) {
println("Double tapped, switching layers");
if (layer_state_is(LED)) {
layer_off(LED);
} else {
layer_on(LED);
}
} else {
print("Single tapped: ");
if (layer_state_is(LED)) {
#ifdef RGBLIGHT_ENABLE
if (!rgblight_config.enable) {
rgblight_enable();
}
rgblight_step();
#endif
} else {
println("Base layer, sending string");
SEND_STRING("This thing is BIG!!\n");
}
}
}
//Tap Dance Definitions
qk_tap_dance_action_t tap_dance_actions[] = {
[TD_TOGGLE] = ACTION_TAP_DANCE_FN(dance_toggle)
// Other declarations would go here, separated by commas, if you have them
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[BASE] = KEYMAP(
TD(TD_TOGGLE)),
[LED] = KEYMAP(
TD(TD_TOGGLE)
)
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {
return MACRO_NONE ;
}
void matrix_init_user(void) {
}
void matrix_scan_user(void) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
// Nothing here, see dance_toggle
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 {
}
}

View File

@ -0,0 +1 @@
TAP_DANCE_ENABLE = yes

View File

@ -0,0 +1,15 @@
# Big Series Keyboard
![Big Series 1-Key](https://woodkeys.click/wp-content/uploads/2017/12/woodkeys_419.jpg)
A PCB for the Big Series Switch by [NovelKeys](https://novelkeys.xyz). Available in 1, 2, 3, and 4 switch versions from [Woodkeys.click](https://woodkeys.click/product-category/big-series/).
Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) / [Woodkeys.click](https://woodkeys.click)
Hardware Supported: Big Series PCBs
Hardware Availability: [Woodkeys.click](https://woodkeys.click), [NovelKeys](https://novelkeys.xyz)
Make example for this keyboard (after setting up your build environment):
make bigseries: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.

59
keyboards/bigseries/rules.mk Executable file
View File

@ -0,0 +1,59 @@
#SRC += rgb_backlight.c
# MCU name
MCU = atmega32u2
# 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 = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = yes # Console for debug(+400)
COMMAND_ENABLE = yes # Commands for debug and configuration
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled
AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below
RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port.