New keyboard: Cu75 (#2374)
* Added Modular keyboards L,R and NUM Created code modules for the 3 modules of the modular keyboard. Original idea by MechboardsUK. Uses i2c implementation similar to lets split * Remove modular from master This is to fix incorrect branching * Addition of cu75 Addition of cu75 keyboard, uses libraries from LFKeyboards directory which are path linked to reduce file duplication. Minor fix on cu24 readme * Minor Readme Fix
This commit is contained in:
parent
cd0c089b49
commit
88a7fa762f
12 changed files with 803 additions and 1 deletions
|
@ -6,7 +6,7 @@ A luxurious 24 key keypad with various layouts. Includes RGB underglow, backligh
|
|||
|
||||
Keyboard Maintainer: [Yiancar](https://github.com/yiancar)
|
||||
Hardware Supported: PCB v1.0 (uses a 32u4)
|
||||
Hardware Availability: http://caps-unlocked.com/
|
||||
Hardware Availability: [caps-unlocked.com](http://caps-unlocked.com/)
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
|
|
151
keyboards/cu75/config.h
Normal file
151
keyboards/cu75/config.h
Normal file
|
@ -0,0 +1,151 @@
|
|||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.com>
|
||||
|
||||
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"
|
||||
|
||||
#define VENDOR_ID 0xFEED
|
||||
#define PRODUCT_ID 0x6062
|
||||
#define DEVICE_VER 0x0001
|
||||
#define MANUFACTURER LFKeyboards/CapsUnlocked
|
||||
#define PRODUCT CU75
|
||||
#define DESCRIPTION A luxurious fully customisable 75%
|
||||
|
||||
#define DIODE_DIRECTION COL2ROW
|
||||
#define MATRIX_ROWS 6
|
||||
#define MATRIX_COLS 16
|
||||
#define MATRIX_ROW_PINS {F1, B7, B3, D2, D3, B2}
|
||||
#define MATRIX_COL_PINS {F4, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, B1, B0, F0}
|
||||
#define UNUSED_PINS {}
|
||||
|
||||
#define RGB_DI_PIN C7 // Have to set it to something to get the ws2812 code to compile
|
||||
#define RGBLED_NUM 24 // Number of LEDs
|
||||
#define RGBLIGHT_ANIMATIONS
|
||||
#define RGBLIGHT_HUE_STEP 10
|
||||
#define RGBLIGHT_SAT_STEP 17
|
||||
#define RGBLIGHT_VAL_STEP 17
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCING_DELAY 5
|
||||
|
||||
/* define if matrix has ghost (lacks anti-ghosting diodes) */
|
||||
//#define MATRIX_HAS_GHOST
|
||||
|
||||
/* number of backlight levels */
|
||||
#define BACKLIGHT_LEVELS 8
|
||||
#define BACKLIGHT_PWM_MAP {8, 16, 40, 55, 70, 128, 200, 255}
|
||||
|
||||
/* 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
|
||||
|
||||
/*
|
||||
* Force NKRO
|
||||
*
|
||||
* Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
|
||||
* state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
|
||||
* makefile for this to work.)
|
||||
*
|
||||
* If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
|
||||
* until the next keyboard reset.
|
||||
*
|
||||
* NKRO may prevent your keystrokes from being detected in the BIOS, but it is
|
||||
* fully operational during normal computer usage.
|
||||
*
|
||||
* For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
|
||||
* or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
|
||||
* bootmagic, NKRO mode will always be enabled until it is toggled again during a
|
||||
* power-up.
|
||||
*
|
||||
*/
|
||||
//#define FORCE_NKRO
|
||||
|
||||
/*
|
||||
* Magic Key Options
|
||||
*
|
||||
* Magic keys are hotkey commands that allow control over firmware functions of
|
||||
* the keyboard. They are best used in combination with the HID Listen program,
|
||||
* found here: https://www.pjrc.com/teensy/hid_listen.html
|
||||
*
|
||||
* The options below allow the magic key functionality to be changed. This is
|
||||
* useful if your keyboard/keypad is missing keys and you want magic key support.
|
||||
*
|
||||
*/
|
||||
|
||||
/* key combination for magic key command */
|
||||
#define IS_COMMAND() ( \
|
||||
keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
|
||||
)
|
||||
|
||||
/* control how magic key switches layers */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
|
||||
|
||||
/* override magic key keymap */
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
|
||||
//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
|
||||
//#define MAGIC_KEY_HELP1 H
|
||||
//#define MAGIC_KEY_HELP2 SLASH
|
||||
//#define MAGIC_KEY_DEBUG D
|
||||
//#define MAGIC_KEY_DEBUG_MATRIX X
|
||||
//#define MAGIC_KEY_DEBUG_KBD K
|
||||
//#define MAGIC_KEY_DEBUG_MOUSE M
|
||||
//#define MAGIC_KEY_VERSION V
|
||||
//#define MAGIC_KEY_STATUS S
|
||||
//#define MAGIC_KEY_CONSOLE C
|
||||
//#define MAGIC_KEY_LAYER0_ALT1 ESC
|
||||
//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
|
||||
//#define MAGIC_KEY_LAYER0 0
|
||||
//#define MAGIC_KEY_LAYER1 1
|
||||
//#define MAGIC_KEY_LAYER2 2
|
||||
//#define MAGIC_KEY_LAYER3 3
|
||||
//#define MAGIC_KEY_LAYER4 4
|
||||
//#define MAGIC_KEY_LAYER5 5
|
||||
//#define MAGIC_KEY_LAYER6 6
|
||||
//#define MAGIC_KEY_LAYER7 7
|
||||
//#define MAGIC_KEY_LAYER8 8
|
||||
//#define MAGIC_KEY_LAYER9 9
|
||||
//#define MAGIC_KEY_BOOTLOADER PAUSE
|
||||
//#define MAGIC_KEY_LOCK CAPS
|
||||
//#define MAGIC_KEY_EEPROM E
|
||||
//#define MAGIC_KEY_NKRO N
|
||||
//#define MAGIC_KEY_SLEEP_LED Z
|
||||
|
||||
/*
|
||||
* Feature disable options
|
||||
* These options are also useful to firmware size reduction.
|
||||
*/
|
||||
|
||||
/* disable debug print */
|
||||
//#define NO_DEBUG
|
||||
|
||||
/* disable print */
|
||||
//#define NO_PRINT
|
||||
|
||||
/* disable action features */
|
||||
//#define NO_ACTION_LAYER
|
||||
//#define NO_ACTION_TAPPING
|
||||
//#define NO_ACTION_ONESHOT
|
||||
//#define NO_ACTION_MACRO
|
||||
//#define NO_ACTION_FUNCTION
|
||||
|
||||
#endif
|
179
keyboards/cu75/cu75.c
Normal file
179
keyboards/cu75/cu75.c
Normal file
|
@ -0,0 +1,179 @@
|
|||
#include <avr/sfr_defs.h>
|
||||
#include <avr/timer_avr.h>
|
||||
#include <avr/wdt.h>
|
||||
#include "cu75.h"
|
||||
#include "keymap.h"
|
||||
#include "debug.h"
|
||||
#include "../lfkeyboards/issi.h"
|
||||
#include "../lfkeyboards/TWIlib.h"
|
||||
#include "../lfkeyboards/lighting.h"
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float test_sound[][2] = SONG(STARTUP_SOUND);
|
||||
#include <audio/audio.h>
|
||||
#endif
|
||||
|
||||
uint16_t click_hz = CLICK_HZ;
|
||||
uint16_t click_time = CLICK_MS;
|
||||
uint8_t click_toggle = CLICK_ENABLED;
|
||||
|
||||
|
||||
void matrix_init_kb(void)
|
||||
{
|
||||
// put your keyboard start-up code here
|
||||
// runs once when the firmware starts up
|
||||
matrix_init_user();
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
audio_init();
|
||||
PLAY_NOTE_ARRAY(test_sound, false, STACCATO);
|
||||
// Fix port B5
|
||||
cbi(DDRB, 5);
|
||||
sbi(PORTB, 5);
|
||||
#else
|
||||
// If we're not using the audio pin, drive it low
|
||||
sbi(DDRC, 6);
|
||||
cbi(PORTC, 6);
|
||||
#endif
|
||||
#ifdef ISSI_ENABLE
|
||||
issi_init();
|
||||
#endif
|
||||
}
|
||||
|
||||
void matrix_scan_kb(void)
|
||||
{
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
wdt_reset();
|
||||
#endif
|
||||
#ifdef ISSI_ENABLE
|
||||
// switch/underglow lighting update
|
||||
static uint32_t issi_device = 0;
|
||||
static uint32_t twi_last_ready = 0;
|
||||
if(twi_last_ready > 1000){
|
||||
// Its been way too long since the last ISSI update, reset the I2C bus and start again
|
||||
dprintf("TWI failed to recover, TWI re-init\n");
|
||||
twi_last_ready = 0;
|
||||
TWIInit();
|
||||
force_issi_refresh();
|
||||
}
|
||||
if(isTWIReady()){
|
||||
twi_last_ready = 0;
|
||||
// If the i2c bus is available, kick off the issi update, alternate between devices
|
||||
update_issi(issi_device, issi_device);
|
||||
if(issi_device){
|
||||
issi_device = 0;
|
||||
}else{
|
||||
issi_device = 3;
|
||||
}
|
||||
}else{
|
||||
twi_last_ready++;
|
||||
}
|
||||
#endif
|
||||
matrix_scan_user();
|
||||
}
|
||||
|
||||
void click(uint16_t freq, uint16_t duration){
|
||||
#ifdef AUDIO_ENABLE
|
||||
if(freq >= 100 && freq <= 20000 && duration < 100){
|
||||
play_note(freq, 10);
|
||||
for (uint16_t i = 0; i < duration; i++){
|
||||
_delay_ms(1);
|
||||
}
|
||||
stop_all_notes();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool process_record_kb(uint16_t keycode, keyrecord_t* record)
|
||||
{
|
||||
// Test code that turns on the switch led for the key that is pressed
|
||||
// set_backlight_by_keymap(record->event.key.col, record->event.key.row);
|
||||
if (click_toggle && record->event.pressed){
|
||||
click(click_hz, click_time);
|
||||
}
|
||||
if (keycode == RESET) {
|
||||
reset_keyboard_kb();
|
||||
} else {
|
||||
}
|
||||
return process_record_user(keycode, record);
|
||||
}
|
||||
|
||||
void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
|
||||
{
|
||||
#ifdef AUDIO_ENABLE
|
||||
int8_t sign = 1;
|
||||
#endif
|
||||
if(id == LFK_ESC_TILDE){
|
||||
// Send ~ on shift-esc
|
||||
void (*method)(uint8_t) = (event->event.pressed) ? &add_key : &del_key;
|
||||
uint8_t shifted = get_mods() & (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT));
|
||||
method(shifted ? KC_GRAVE : KC_ESCAPE);
|
||||
send_keyboard_report();
|
||||
}else if(event->event.pressed){
|
||||
switch(id){
|
||||
case LFK_SET_DEFAULT_LAYER:
|
||||
// set/save the current base layer to eeprom, falls through to LFK_CLEAR
|
||||
eeconfig_update_default_layer(1UL << opt);
|
||||
default_layer_set(1UL << opt);
|
||||
case LFK_CLEAR:
|
||||
// Go back to default layer
|
||||
layer_clear();
|
||||
break;
|
||||
#ifdef AUDIO_ENABLE
|
||||
case LFK_CLICK_FREQ_LOWER:
|
||||
sign = -1; // continue to next statement
|
||||
case LFK_CLICK_FREQ_HIGHER:
|
||||
click_hz += sign * 100;
|
||||
click(click_hz, click_time);
|
||||
break;
|
||||
case LFK_CLICK_TOGGLE:
|
||||
if(click_toggle){
|
||||
click_toggle = 0;
|
||||
click(4000, 100);
|
||||
click(1000, 100);
|
||||
}else{
|
||||
click_toggle = 1;
|
||||
click(1000, 100);
|
||||
click(4000, 100);
|
||||
}
|
||||
break;
|
||||
case LFK_CLICK_TIME_SHORTER:
|
||||
sign = -1; // continue to next statement
|
||||
case LFK_CLICK_TIME_LONGER:
|
||||
click_time += sign;
|
||||
click(click_hz, click_time);
|
||||
break;
|
||||
#endif
|
||||
case LFK_DEBUG_SETTINGS:
|
||||
dprintf("Click:\n");
|
||||
dprintf(" toggle: %d\n", click_toggle);
|
||||
dprintf(" freq(hz): %d\n", click_hz);
|
||||
dprintf(" duration(ms): %d\n", click_time);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void reset_keyboard_kb(){
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
MCUSR = 0;
|
||||
wdt_disable();
|
||||
wdt_reset();
|
||||
#endif
|
||||
reset_keyboard();
|
||||
}
|
||||
|
||||
void led_set_kb(uint8_t usb_led)
|
||||
{
|
||||
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
|
||||
|
||||
led_set_user(usb_led);
|
||||
}
|
||||
|
||||
// LFK lighting info
|
||||
const uint8_t switch_matrices[] = {0, 1};
|
||||
const uint8_t rgb_matrices[] = {6, 7};
|
||||
const uint8_t rgb_sequence[] = {
|
||||
24, 23, 22, 21, 20, 19, 18, 17, 1, 2, 3, 4, 5,
|
||||
6, 7, 8, 10, 11, 12, 13, 14, 15, 16, 9
|
||||
};
|
110
keyboards/cu75/cu75.h
Normal file
110
keyboards/cu75/cu75.h
Normal file
|
@ -0,0 +1,110 @@
|
|||
#ifndef CU75_H
|
||||
#define CU75_H
|
||||
|
||||
/* if the kb.h file exists (because we're running from qmkbuilder) include it */
|
||||
#ifdef __has_include
|
||||
#if __has_include("kb.h")
|
||||
#include "kb.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include "quantum.h"
|
||||
#include "matrix.h"
|
||||
#include <avr/sfr_defs.h>
|
||||
|
||||
#ifndef cbi
|
||||
#define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit))
|
||||
#endif
|
||||
|
||||
#ifndef sbi
|
||||
#define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit))
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct RGB_Color {
|
||||
uint16_t red;
|
||||
uint16_t green;
|
||||
uint16_t blue;
|
||||
} RGB_Color;
|
||||
|
||||
typedef struct Layer_Info {
|
||||
uint32_t layer;
|
||||
uint32_t mask;
|
||||
RGB_Color color;
|
||||
} Layer_Info;
|
||||
|
||||
extern const uint32_t layer_count;
|
||||
extern const Layer_Info layer_info[];
|
||||
|
||||
enum action_functions {
|
||||
LFK_CLEAR = 0, // Resets all layers
|
||||
LFK_ESC_TILDE, // esc+lshift = ~
|
||||
LFK_SET_DEFAULT_LAYER, // changes and saves current base layer to eeprom
|
||||
LFK_CLICK_TOGGLE, // Adjusts click duration
|
||||
LFK_CLICK_FREQ_HIGHER, // Adjusts click frequency
|
||||
LFK_CLICK_FREQ_LOWER, // Adjusts click frequency
|
||||
LFK_CLICK_TIME_LONGER, // Adjusts click duration
|
||||
LFK_CLICK_TIME_SHORTER, // Adjusts click duration
|
||||
LFK_DEBUG_SETTINGS, // prints LED and click settings to HID
|
||||
LFK_LED_TEST // cycles through switch and RGB LEDs
|
||||
};
|
||||
|
||||
#define CLICK_HZ 500
|
||||
#define CLICK_MS 2
|
||||
#define CLICK_ENABLED 0
|
||||
|
||||
void reset_keyboard_kb(void);
|
||||
void click(uint16_t freq, uint16_t duration);
|
||||
|
||||
/* Vanilla Keymap */
|
||||
// This a shortcut to help you visually see your layout.
|
||||
/*
|
||||
* ,-------------------------------------------------------------------------------.
|
||||
* | 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 | 0A | 0B | 0C | 0D | 0E | 0F | 0G |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 1A | 1B | 1C | 1D | 1E | 1G |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | 21 | 22 |23 | 24 | 25 | 26 | 27 | 28 | 29 | 2A | 2B | 2C | 2D | 2E | 2F |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | 31 | 32 |33 | 34 | 35 | 36 | 37 | 38 | 39 | 3A | 3B | 3C | 3D | 3F |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | 41 | 42 |43 | 45 | 46 | 47 | 48 | 49 | 4A | 4B | 4C | 4D | 4E | 4F |
|
||||
* |-------------------------------------------------------------------------------|
|
||||
* | 51 | 52 | 53 | 54 | 57 | 59 | 5A | 5B | 5C | 5D | 5E | 5F |
|
||||
* `-------------------------------------------------------------------------------'
|
||||
*/
|
||||
// The first section contains all of the arguements
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define KEYMAP( \
|
||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \
|
||||
k41, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \
|
||||
k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \
|
||||
) { \
|
||||
{k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \
|
||||
{k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \
|
||||
{k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \
|
||||
{k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \
|
||||
{k41, KC_NO, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \
|
||||
{k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \
|
||||
}
|
||||
|
||||
#define ISO_KEYMAP( \
|
||||
k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \
|
||||
k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \
|
||||
k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k3D, k2F, \
|
||||
k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k2E, k3F, \
|
||||
k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \
|
||||
k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \
|
||||
) { \
|
||||
{k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \
|
||||
{k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \
|
||||
{k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, KC_NO}, \
|
||||
{k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, KC_NO, k3F, KC_NO}, \
|
||||
{k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, KC_NO}, \
|
||||
{k51, k52, k53, k54, KC_NO, KC_NO, k57, KC_NO, k59, k5A, k5B, k5C, k5D, k5E, k5F, KC_NO}, \
|
||||
}
|
||||
|
||||
#endif //CU75_H
|
8
keyboards/cu75/keymaps/default/config.h
Normal file
8
keyboards/cu75/keymaps/default/config.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
91
keyboards/cu75/keymaps/default/keymap.c
Normal file
91
keyboards/cu75/keymaps/default/keymap.c
Normal file
|
@ -0,0 +1,91 @@
|
|||
#include "cu75.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
//Define a shorter 'transparent' key code to make the keymaps more compact
|
||||
#define KC_TR KC_TRNS
|
||||
|
||||
enum keymap_layout {
|
||||
VANILLA = 0,
|
||||
FUNC,
|
||||
SETTINGS,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[VANILLA] = KEYMAP(
|
||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||
* ,------------------------------------------------------------.----.
|
||||
* |Esc | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|F13|F14| F15|
|
||||
* |------------------------------------------------------------|----|
|
||||
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
||||
* |------------------------------------------------------------|----|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| Del|
|
||||
* |------------------------------------------------------------|----|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp|
|
||||
* |------------------------------------------------------------|----|
|
||||
* |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgDn|
|
||||
* |-----------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt |Space| Space |Space|Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
KC_ESC,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_F13, KC_F14, KC_F15,
|
||||
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_INS,
|
||||
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,
|
||||
KC_CAPS, 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,
|
||||
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_UP, KC_PGDN,
|
||||
KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC,KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[FUNC] = KEYMAP(
|
||||
/* Keymap VANILLA: Function Layer
|
||||
* ,-------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | RGB_TOG|
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |RESET |RGB_MODE|
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |RGB_HUI| |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | |RGB_SAD|RGB_HUD|RGB_SAI|
|
||||
* `-------------------------------------------------------------------'
|
||||
*/
|
||||
KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,
|
||||
KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,KC_TR, RGB_TOG,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RESET, RGB_MOD,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_VAD, RGB_VAI, KC_TR, KC_TR, RGB_HUI, KC_TR,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
||||
ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
53
keyboards/cu75/keymaps/default/rules.mk
Normal file
53
keyboards/cu75/keymaps/default/rules.mk
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
|
||||
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 = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Disable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = yes # Disable RGB underlight
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE = no
|
||||
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||
WATCHDOG_ENABLE = no # Resets keyboard if matrix_scan isn't run every 250ms
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||
endif
|
||||
|
||||
|
||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||
# #
|
||||
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
||||
# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
|
||||
# #
|
||||
# # Set to B, C or D
|
||||
# LFK_REV = D
|
||||
|
||||
# ifeq ($(LFK_REV), B)
|
||||
# MCU = atmega32u4
|
||||
# else
|
||||
# MCU = at90usb1286
|
||||
# endif
|
||||
# OPT_DEFS += -DLFK_REV_$(LFK_REV)
|
||||
# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"
|
8
keyboards/cu75/keymaps/iso/config.h
Normal file
8
keyboards/cu75/keymaps/iso/config.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
|
||||
#endif
|
91
keyboards/cu75/keymaps/iso/keymap.c
Normal file
91
keyboards/cu75/keymaps/iso/keymap.c
Normal file
|
@ -0,0 +1,91 @@
|
|||
#include "cu75.h"
|
||||
#include "action_layer.h"
|
||||
|
||||
//Define a shorter 'transparent' key code to make the keymaps more compact
|
||||
#define KC_TR KC_TRNS
|
||||
|
||||
enum keymap_layout {
|
||||
VANILLA = 0,
|
||||
FUNC,
|
||||
SETTINGS,
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[VANILLA] = ISO_KEYMAP(
|
||||
/* Keymap VANILLA: (Base Layer) Default Layer
|
||||
* ,------------------------------------------------------------.----.
|
||||
* |Esc | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|F13|F14| F15|
|
||||
* |------------------------------------------------------------|----|
|
||||
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0| - | = |Backspa| Ins|
|
||||
* |------------------------------------------------------------|----|
|
||||
* |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Ret | Del|
|
||||
* |--------------------------------------------------------. |----|
|
||||
* |CAPS | A| S| D| F| G| H| J| K| L| ;| '| # | |PgUp|
|
||||
* |------------------------------------------------------------|----|
|
||||
* |Shft| \ | Z| X| C| V| B| N| M| ,| .| /|Shift | Up |PgDn|
|
||||
* |-----------------------------------------------------------------|
|
||||
* |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig |
|
||||
* `-----------------------------------------------------------------'
|
||||
*/
|
||||
KC_ESC,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_F13, KC_F14, KC_F15,
|
||||
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_INS,
|
||||
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_ENT, KC_DEL,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_PGUP,
|
||||
KC_LSFT, KC_NUBS, 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,
|
||||
KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC,KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
[FUNC] = KEYMAP(
|
||||
/* Keymap VANILLA: Function Layer
|
||||
* ,-------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | | | | RGB_TOG|
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |RESET |RGB_MODE|
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | | | | | | |RGB_HUI| |
|
||||
* |-------------------------------------------------------------------|
|
||||
* | | | | | | | |RGB_SAD|RGB_HUD|RGB_SAI|
|
||||
* `-------------------------------------------------------------------'
|
||||
*/
|
||||
KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,
|
||||
KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,KC_TR, RGB_TOG,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RESET, RGB_MOD,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_VAD, RGB_VAI, KC_TR, KC_TR, RGB_HUI, KC_TR,
|
||||
KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM fn_actions[] = {
|
||||
ACTION_FUNCTION(LFK_CLEAR), // FN0 - reset layers
|
||||
ACTION_FUNCTION(LFK_ESC_TILDE), // FN1 - esc+shift = ~, else escape
|
||||
};
|
||||
|
||||
|
||||
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
||||
{
|
||||
// MACRODOWN only works in this function
|
||||
switch(id) {
|
||||
}
|
||||
return MACRO_NONE;
|
||||
};
|
||||
|
||||
|
||||
void matrix_init_user(void) {
|
||||
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
|
||||
}
|
53
keyboards/cu75/keymaps/iso/rules.mk
Normal file
53
keyboards/cu75/keymaps/iso/rules.mk
Normal file
|
@ -0,0 +1,53 @@
|
|||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
|
||||
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
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
# BACKLIGHT_ENABLE = no # Disable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Disable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Disable RGB underlight
|
||||
RGBLIGHT_CUSTOM_DRIVER = yes # RGB code is implemented in lefkeyboards, not WS2812
|
||||
SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE = no
|
||||
|
||||
ISSI_ENABLE = no # If the I2C pullup resistors aren't install this must be disabled
|
||||
WATCHDOG_ENABLE = yes # Resets keyboard if matrix_scan isn't run every 250ms
|
||||
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||
TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||
endif
|
||||
|
||||
ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||
TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||
endif
|
||||
|
||||
|
||||
# # Set the LFK78 hardware version. This is defined in rules.mk, but can be overidden here if desired
|
||||
# #
|
||||
# # RevB - first public release, uses atmega32u4, has audio, ISSI matrix split between RGB and backlight
|
||||
# # RevC/D - at90usb1286, no audio, ISSI device 0 is backlight, 4 is RGB
|
||||
# #
|
||||
# # Set to B, C or D
|
||||
# LFK_REV = D
|
||||
|
||||
# ifeq ($(LFK_REV), B)
|
||||
# MCU = atmega32u4
|
||||
# else
|
||||
# MCU = at90usb1286
|
||||
# endif
|
||||
# OPT_DEFS += -DLFK_REV_$(LFK_REV)
|
||||
# OPT_DEFS += -DUSB_PRODUCT=\"LFK_Rev$(LFK_REV)\"
|
17
keyboards/cu75/readme.md
Normal file
17
keyboards/cu75/readme.md
Normal file
|
@ -0,0 +1,17 @@
|
|||
# CU75
|
||||
|
||||
![CU75](https://geekhack.org/index.php?action=dlattach;topic=91767.0;attach=179167;image)
|
||||
|
||||
A luxurious 75% keyboard with various layouts. Includes RGB underglow, backlight and an aluminium, brass and nylon case.
|
||||
|
||||
Keyboard Maintainer: [Yiancar](https://github.com/yiancar) and [LFKeyboards](https://github.com/lfkeyboards)
|
||||
Hardware Supported: PCB v1.0 (uses a 32u4)
|
||||
Hardware Availability: [caps-unlocked.com](http://caps-unlocked.com/)
|
||||
|
||||
This PCB uses lighting libraries from LFKeyboards
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
|
||||
make CU75: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.
|
41
keyboards/cu75/rules.mk
Normal file
41
keyboards/cu75/rules.mk
Normal file
|
@ -0,0 +1,41 @@
|
|||
MCU = atmega32u4
|
||||
OPT_DEFS += -DBOOTLOADER_SIZE=4096
|
||||
|
||||
|
||||
# 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
|
||||
|
||||
SRC = ../lfkeyboards/TWIlib.c ../lfkeyboards/issi.c ../lfkeyboards/lighting.c
|
Loading…
Reference in a new issue