diff options
author | lokher <lokher@gmail.com> | 2022-12-06 17:04:10 +0800 |
---|---|---|
committer | lokher <lokher@gmail.com> | 2022-12-06 17:04:10 +0800 |
commit | 27fc28fd2ff52e079a5bc58d6aaea4c752420615 (patch) | |
tree | 7ac943fb1ba4f430a7220efd18f66f6a77205c30 /keyboards/boston_meetup | |
parent | e736133392fe6427cfb995da0787337189828272 (diff) | |
parent | 2709b6ed616f8012ff4cfd3ee69a822a8d188351 (diff) |
Merge upstream master
Diffstat (limited to 'keyboards/boston_meetup')
-rw-r--r-- | keyboards/boston_meetup/2019/config.h | 171 | ||||
-rw-r--r-- | keyboards/boston_meetup/2019/keymaps/default/keymap.c | 147 |
2 files changed, 318 insertions, 0 deletions
diff --git a/keyboards/boston_meetup/2019/config.h b/keyboards/boston_meetup/2019/config.h new file mode 100644 index 0000000000..296e84cf65 --- /dev/null +++ b/keyboards/boston_meetup/2019/config.h @@ -0,0 +1,171 @@ +#pragma once + +#undef MATRIX_ROWS +#undef MATRIX_COLS +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS + +#define MATRIX_ROW_PINS { A3, B8, B9, B1 } +#define MATRIX_COL_PINS { A7, A8, B2, B10 } + +#define ENCODERS_PAD_A { B13 } +#define ENCODERS_PAD_B { B14 } + +//Audio +#undef AUDIO_VOICES +#undef AUDIO_PIN +#define AUDIO_PIN A5 +#define AUDIO_PIN_ALT A4 +#define AUDIO_PIN_ALT_AS_NEGATIVE + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(ONE_UP_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + +#define AUDIO_CLICKY + /* to enable clicky on startup */ + //#define AUDIO_CLICKY_ON +#define AUDIO_CLICKY_FREQ_RANDOMNESS 1.5f +#endif + +// configure oled driver for the 128x32 oled +#define OLED_UPDATE_INTERVAL 33 // ~30fps + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 6 + +/* 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 + +/* + * 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 + +/* Haptic Driver initialization settings + * Feedback Control Settings */ +#define FB_ERM_LRA 1 /* For ERM:0 or LRA:1*/ +#define FB_BRAKEFACTOR 6 /* For 1x:0, 2x:1, 3x:2, 4x:3, 6x:4, 8x:5, 16x:6, Disable Braking:7 */ +#define FB_LOOPGAIN 1 /* For Low:0, Medium:1, High:2, Very High:3 */ + +/* default 3V ERM vibration motor voltage and library*/ +#if FB_ERM_LRA == 0 +#define RATED_VOLTAGE 3 +#define V_RMS 2.3 +#define V_PEAK 3.30 +/* Library Selection */ +#define LIB_SELECTION 4 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +/* default 2V LRA voltage and library */ +#elif FB_ERM_LRA == 1 +#define RATED_VOLTAGE 2 +#define V_RMS 2.0 +#define V_PEAK 2.85 +#define F_LRA 200 +/* Library Selection */ +#define LIB_SELECTION 6 /* For Empty:0' TS2200 library A to D:1-5, LRA Library: 6 */ + +#endif + +/* Control 1 register settings */ +#define DRIVE_TIME 25 +#define AC_COUPLE 0 +#define STARTUP_BOOST 1 + +/* Control 2 Settings */ +#define BIDIR_INPUT 1 +#define BRAKE_STAB 1 /* Loopgain is reduced when braking is almost complete to improve stability */ +#define SAMPLE_TIME 3 +#define BLANKING_TIME 1 +#define IDISS_TIME 1 + +/* Control 3 settings */ +#define NG_THRESH 2 +#define ERM_OPEN_LOOP 1 +#define SUPPLY_COMP_DIS 0 +#define DATA_FORMAT_RTO 0 +#define LRA_DRIVE_MODE 0 +#define N_PWM_ANALOG 0 +#define LRA_OPEN_LOOP 0 +/* Control 4 settings */ +#define ZC_DET_TIME 0 +#define AUTO_CAL_TIME 3 + +#define RGBLIGHT_EFFECT_BREATHING +#define RGBLIGHT_EFFECT_RAINBOW_MOOD +#define RGBLIGHT_EFFECT_RAINBOW_SWIRL +#define RGBLIGHT_EFFECT_SNAKE +#define RGBLIGHT_EFFECT_KNIGHT +#define RGBLIGHT_EFFECT_CHRISTMAS +#define RGBLIGHT_EFFECT_STATIC_GRADIENT +#define RGBLIGHT_EFFECT_RGB_TEST +#define RGBLIGHT_EFFECT_ALTERNATING +#define RGBLIGHT_EFFECT_TWINKLE + +#define RGBLED_NUM 10 +#define RGB_DI_PIN B5 +#define RGB_MATRIX_LED_COUNT RGBLED_NUM + +#define RGB_MATRIX_KEYPRESSES + +#define SOLENOID_PIN A14 diff --git a/keyboards/boston_meetup/2019/keymaps/default/keymap.c b/keyboards/boston_meetup/2019/keymaps/default/keymap.c new file mode 100644 index 0000000000..b4d7280640 --- /dev/null +++ b/keyboards/boston_meetup/2019/keymaps/default/keymap.c @@ -0,0 +1,147 @@ +#include QMK_KEYBOARD_H + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +enum custom_layers { + _BASE, + _LOWER, + _RAISE, + _ADJUST +}; + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, +}; + +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define CTL_TTAB CTL_T(KC_TAB) // Tap for Esc, hold for Ctrl +#define CTL_ENT CTL_T(KC_ENT) // Tap for Enter, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define LT_RAI(kc) LT(_RAISE, kc) // L-ayer T-ap to Raise + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,------. + * | Esc | + * |------+------+-------------. + * | : | 7 | 8 | 9 | + * |------+------+------+------| + * | RAISE| 4 | 5 | 6 | + * |------+------+------+------| + * | LOWER| 1 | 2 | 3 | + * `---------------------------' + */ +[_BASE] = LAYOUT( + KC_ESC, + KC_COLN, KC_P7, KC_P8, KC_P9, + RAISE, KC_P4, KC_P5, KC_P6, + LOWER, KC_P1, KC_P2, KC_P3 +), + +/* Lower + * ,------. + * | Nmlk | + * |------+------+-------------. + * | : | / | * | - | + * |------+------+------+------| + * | | | = | + | + * |------+------+------+------| + * | | 0 | . | ENT | + * `---------------------------' + */ +[_LOWER] = LAYOUT( + KC_NUM, + KC_COLN, KC_PSLS, KC_PAST, KC_PMNS, + _______, XXXXXXX, KC_EQL, KC_PPLS, + _______, KC_P0, KC_PDOT, KC_PENT +), + +/* Raise + * ,------. + * | Esc | + * |------+------+-------------. + * |RGB TG|RGB M+|RGB M-| | + * |------+------+------+------| + * | |RGB H+|RGB S+|RGB V+| + * |------+------+------+------| + * | ` |RGB H-|RGB S-|RGB V-| + * `---------------------------' + */ +[_RAISE] = LAYOUT( + KC_NUM, + RGB_TOG, RGB_MOD, RGB_RMOD, XXXXXXX, + _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, RGB_HUD, RGB_SAD, RGB_VAD + +), + +/* Adjust + * ,------. + * | DFU | + * |------+------+-------------. + * |HPT TG|HPT FB|HPT RS| BKSP | + * |------+------+------+------| + * | |HPT M+| | | + * |------+------+------+------| + * | |HPT M-|Clk TG| Del | + * `---------------------------' + */ +[_ADJUST] = LAYOUT( + QK_BOOT, + HF_TOGG, HF_FDBK, HF_RST, KC_BSPC, + _______, HF_NEXT, XXXXXXX, XXXXXXX, + _______, HF_PREV, CK_TOGG, KC_DEL +), + + +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + layer_on(_LOWER); + } else { + layer_off(_LOWER); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + layer_on(_RAISE); + } else { + layer_off(_RAISE); + } + return false; + break; + } + return true; +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} |