Skip to content

Commit

Permalink
[Keyboard] Use old custom matrix for Drop Planck+Preonic (#14488)
Browse files Browse the repository at this point in the history
Co-authored-by: Ryan <fauxpark@gmail.com>
Co-authored-by: Jack Humbert <jack.humb@gmail.com>
  • Loading branch information
3 people authored Sep 19, 2021
1 parent f61f79b commit ef5c6ea
Show file tree
Hide file tree
Showing 21 changed files with 1,817 additions and 24 deletions.
43 changes: 29 additions & 14 deletions keyboards/planck/planck.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,41 @@
#ifndef PLANCK_H
#define PLANCK_H
/* Copyright 2018 Jack Humbert <jack.humb@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/>.
*/

#pragma once

#include "quantum.h"

#if defined(KEYBOARD_planck_ez)
#include "ez.h"
# include "ez.h"
#elif defined(KEYBOARD_planck_light)
#include "light.h"
# include "light.h"
#elif defined(KEYBOARD_planck_thk)
#include "thk.h"
# include "thk.h"
#elif defined(KEYBOARD_planck_rev1)
#include "rev1.h"
# include "rev1.h"
#elif defined(KEYBOARD_planck_rev2)
#include "rev2.h"
# include "rev2.h"
#elif defined(KEYBOARD_planck_rev3)
#include "rev3.h"
# include "rev3.h"
#elif defined(KEYBOARD_planck_rev4)
#include "rev4.h"
# include "rev4.h"
#elif defined(KEYBOARD_planck_rev5)
#include "rev5.h"
# include "rev5.h"
#elif defined(KEYBOARD_planck_rev6)
#include "rev6.h"
#endif // Planck revisions

#endif
# include "rev6.h"
#elif defined(KEYBOARD_planck_rev6_drop)
# include "rev6_drop.h"
#endif // Planck revisions
29 changes: 29 additions & 0 deletions keyboards/planck/rev6_drop/chconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/* Copyright 2020 QMK
*
* 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/>.
*/

/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/planck/rev6/chconf.h -r platforms/chibios/QMK_PROTON_C/configs/chconf.h`
*/

#pragma once

#define CH_CFG_ST_RESOLUTION 16

#define CH_CFG_ST_FREQUENCY 10000

#include_next <chconf.h>

128 changes: 128 additions & 0 deletions keyboards/planck/rev6_drop/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
/*
* Copyright 2018 Jack Humbert <jack.humb@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/>.
*/

#pragma once

/* USB Device descriptor parameter */
#define PRODUCT_ID 0xA4F9
#define DEVICE_VER 0x0006
#undef MANUFACTURER
#define MANUFACTURER Drop

#undef MATRIX_ROWS
#undef MATRIX_COLS
/* key matrix size */
#define MATRIX_ROWS 8
#define MATRIX_COLS 6

/*
* 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)
*
*/
/* Note: These are not used for arm boards. They're here purely as documentation. */
#undef MATRIX_ROW_PINS
#undef MATRIX_COL_PINS

#define MATRIX_ROW_PINS \
{ A10, A9, A8, B15, C13, C14, C15, A2 }
#define MATRIX_COL_PINS \
{ B11, B10, B2, B1, A7, B0 }

#define UNUSED_PINS

#define ENCODERS_PAD_A \
{ B12 }
#define ENCODERS_PAD_B \
{ B13 }

#define DIP_SWITCH_PINS \
{ B14, A15, A0, B9 }

#define MUSIC_MAP
#undef AUDIO_VOICES
#undef AUDIO_PIN
#define AUDIO_PIN A5
#define AUDIO_PIN_ALT A4
#define AUDIO_PIN_ALT_AS_NEGATIVE

/* 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
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION

/*
* WS2812 Underglow Matrix options
*/
#define RGB_DI_PIN A1
#define RGBLED_NUM 9
#define DRIVER_LED_TOTAL RGBLED_NUM

#define WS2812_PWM_DRIVER PWMD2
#define WS2812_PWM_CHANNEL 2
#define WS2812_PWM_PAL_MODE 1
#define WS2812_DMA_STREAM STM32_DMA1_STREAM2
#define WS2812_DMA_CHANNEL 2

#define RGB_DISABLE_WHEN_USB_SUSPENDED
22 changes: 22 additions & 0 deletions keyboards/planck/rev6_drop/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/* Copyright 2020 QMK
*
* 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 3 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 <https://www.gnu.org/licenses/>.
*/
#pragma once

#define HAL_USE_PWM TRUE
#define HAL_USE_GPT TRUE
#define HAL_USE_DAC TRUE

#include_next <halconf.h>
Loading

0 comments on commit ef5c6ea

Please sign in to comment.