summaryrefslogtreecommitdiff
path: root/keyboards/preonic/rev3_drop
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/preonic/rev3_drop')
-rw-r--r--keyboards/preonic/rev3_drop/config.h38
-rw-r--r--keyboards/preonic/rev3_drop/info.json8
-rw-r--r--keyboards/preonic/rev3_drop/matrix.c8
-rw-r--r--keyboards/preonic/rev3_drop/mcuconf.h2
-rw-r--r--keyboards/preonic/rev3_drop/rules.mk8
5 files changed, 16 insertions, 48 deletions
diff --git a/keyboards/preonic/rev3_drop/config.h b/keyboards/preonic/rev3_drop/config.h
index e136e01d64..4d1bfe67b9 100644
--- a/keyboards/preonic/rev3_drop/config.h
+++ b/keyboards/preonic/rev3_drop/config.h
@@ -17,20 +17,11 @@
#pragma once
-#undef MATRIX_ROWS
-#undef MATRIX_COLS
-/* key matrix size */
-#define MATRIX_ROWS 10
-#define MATRIX_COLS 6
-
#undef MATRIX_ROW_PINS
#undef MATRIX_COL_PINS
#define MATRIX_ROW_PINS { A10, A9, A8, B15, C13, C14, C15, A2, A3, A6 }
#define MATRIX_COL_PINS { B11, B10, B2, B1, A7, B0 }
-#define ENCODERS_PAD_A { B12 }
-#define ENCODERS_PAD_B { B13 }
-
#define DIP_SWITCH_PINS { B14, A15, A0, B9 }
#define MUSIC_MAP
@@ -40,35 +31,6 @@
#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.
diff --git a/keyboards/preonic/rev3_drop/info.json b/keyboards/preonic/rev3_drop/info.json
index 081d9e1983..3f32a10b36 100644
--- a/keyboards/preonic/rev3_drop/info.json
+++ b/keyboards/preonic/rev3_drop/info.json
@@ -6,6 +6,14 @@
"pid": "0xA649",
"device_version": "0.0.3"
},
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B12", "pin_b": "B13"}
+ ]
+ },
+ "processor": "STM32F303",
+ "bootloader": "stm32-dfu",
+ "community_layouts": ["ortho_5x12"],
"layouts": {
"LAYOUT_preonic_1x2uC": {
"layout": [
diff --git a/keyboards/preonic/rev3_drop/matrix.c b/keyboards/preonic/rev3_drop/matrix.c
index 82214e03d9..60718caaba 100644
--- a/keyboards/preonic/rev3_drop/matrix.c
+++ b/keyboards/preonic/rev3_drop/matrix.c
@@ -17,6 +17,10 @@
#include "quantum.h"
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
typedef uint16_t matrix_col_t;
/*
@@ -67,7 +71,7 @@ void matrix_init(void) {
memset(matrix, 0, MATRIX_ROWS * sizeof(matrix_row_t));
memset(matrix_debouncing, 0, MATRIX_COLS * sizeof(matrix_col_t));
- matrix_init_quantum();
+ matrix_init_kb();
}
uint8_t matrix_scan(void) {
@@ -142,7 +146,7 @@ uint8_t matrix_scan(void) {
debouncing = false;
}
- matrix_scan_quantum();
+ matrix_scan_kb();
return 1;
}
diff --git a/keyboards/preonic/rev3_drop/mcuconf.h b/keyboards/preonic/rev3_drop/mcuconf.h
index 838a3bb69e..32c615b3a2 100644
--- a/keyboards/preonic/rev3_drop/mcuconf.h
+++ b/keyboards/preonic/rev3_drop/mcuconf.h
@@ -14,6 +14,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#pragma once
+
#include_next <mcuconf.h>
// The SysTick timer from the normal quantum/stm32 uses TIM2 -- the WS2812 pin used
diff --git a/keyboards/preonic/rev3_drop/rules.mk b/keyboards/preonic/rev3_drop/rules.mk
index 3d0e376081..e3f9e52110 100644
--- a/keyboards/preonic/rev3_drop/rules.mk
+++ b/keyboards/preonic/rev3_drop/rules.mk
@@ -1,9 +1,3 @@
-# MCU name
-MCU = STM32F303
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu
-
# Build Options
# change yes to no to disable
#
@@ -26,5 +20,3 @@ RGB_MATRIX_ENABLE = no
RGB_MATRIX_DRIVER = WS2812
SRC += matrix.c
-
-LAYOUTS = ortho_5x12