summaryrefslogtreecommitdiff
path: root/keyboards/molecule
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/molecule')
-rw-r--r--keyboards/molecule/adns.c6
-rwxr-xr-xkeyboards/molecule/config.h17
-rwxr-xr-xkeyboards/molecule/info.json98
-rwxr-xr-xkeyboards/molecule/molecule.c17
-rwxr-xr-xkeyboards/molecule/molecule.h41
5 files changed, 57 insertions, 122 deletions
diff --git a/keyboards/molecule/adns.c b/keyboards/molecule/adns.c
index be40cf7ea7..96fc83ee0b 100644
--- a/keyboards/molecule/adns.c
+++ b/keyboards/molecule/adns.c
@@ -237,11 +237,11 @@ motion_delta_t readSensor(void) {
return delta;
}
-void pointing_device_task(void) {
+bool pointing_device_task(void) {
motion_delta_t delta = readSensor();
report_mouse_t report = pointing_device_get_report();
-
+
if(delta.motion_ind) {
// clamp deltas from -127 to 127
report.x = delta.delta_x < -127 ? -127 : delta.delta_x > 127 ? 127 : delta.delta_x;
@@ -250,5 +250,5 @@ void pointing_device_task(void) {
}
pointing_device_set_report(report);
- pointing_device_send();
+ return pointing_device_send();
}
diff --git a/keyboards/molecule/config.h b/keyboards/molecule/config.h
index 9812cd5b83..1755979bbc 100755
--- a/keyboards/molecule/config.h
+++ b/keyboards/molecule/config.h
@@ -17,23 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#pragma once
-
-/*
- * 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)
- *
- */
-#define MATRIX_ROW_PINS { F4, F5, F6, B6 }
-#define MATRIX_COL_PINS { D3, D2, D1, D0, D4, C6, D7, E6, B4, B5 }
-
-/* COL2ROW, ROW2COL */
-#define DIODE_DIRECTION ROW2COL
-
/* OLED */
#define OLED_TIMEOUT 0
diff --git a/keyboards/molecule/info.json b/keyboards/molecule/info.json
index dd4a2773ca..51ca67c282 100755
--- a/keyboards/molecule/info.json
+++ b/keyboards/molecule/info.json
@@ -8,55 +8,65 @@
"pid": "0x0000",
"device_version": "0.0.1"
},
+ "matrix_pins": {
+ "cols": ["D3", "D2", "D1", "D0", "D4", "C6", "D7", "E6", "B4", "B5"],
+ "rows": ["F4", "F5", "F6", "B6"]
+ },
+ "diode_direction": "ROW2COL",
"processor": "atmega32u4",
"bootloader": "atmel-dfu",
"layouts": {
"LAYOUT": {
"layout": [
- {"label":"Q", "x":0, "y":1},
- {"label":"W", "x":1, "y":0.25},
- {"label":"E", "x":2, "y":0},
- {"label":"R", "x":3, "y":0.5},
- {"label":"T", "x":4, "y":0.75},
- {"label":"Y", "x":9.75, "y":0.75},
- {"label":"U", "x":10.75, "y":0.5},
- {"label":"I", "x":11.75, "y":0},
- {"label":"O", "x":12.75, "y":0.25},
- {"label":"P", "x":13.75, "y":1},
-
- {"label":"A", "x":0, "y":2},
- {"label":"S", "x":1, "y":1.25},
- {"label":"D", "x":2, "y":1},
- {"label":"F", "x":3, "y":1.5},
- {"label":"G", "x":4, "y":1.75},
- {"label":"H", "x":9.75, "y":1.75},
- {"label":"J", "x":10.75, "y":1.5},
- {"label":"K", "x":11.75, "y":1},
- {"label":"L", "x":12.75, "y":1.25},
- {"label":";", "x":13.75, "y":2},
-
- {"label":"Z", "x":0, "y":3},
- {"label":"X", "x":1, "y":2.25},
- {"label":"C", "x":2, "y":2},
- {"label":"V", "x":3, "y":2.5},
- {"label":"B", "x":4, "y":2.75},
- {"label":"N", "x":9.75, "y":2.75},
- {"label":"M", "x":10.75, "y":2.5},
- {"label":",", "x":11.75, "y":2},
- {"label":".", "x":12.75, "y":2.25},
- {"label":"/", "x":13.75, "y":3},
-
- {"label":"Ctrl", "x":1, "y":3.25},
- {"label":"Shift", "x":2, "y":3},
- {"label":"Alt", "x":5.25, "y":3},
- {"label":"Space", "x":6.25, "y":3.25, "h":1.5},
- {"label":"Enter", "x":7.5, "y":3.25, "h":1.5},
- {"label":"Super", "x":8.5, "y":3},
- {"label":"Shift", "x":11.75, "y":3},
- {"label":"Ctrl", "x":12.75, "y":3.25},
-
- {"label":"Lower", "x":5.25, "y":4},
- {"label":"Raise", "x":8.5, "y":4}
+ {"matrix": [0, 0], "x": 0, "y": 1},
+ {"matrix": [0, 1], "x": 1, "y": 0.25},
+ {"matrix": [0, 2], "x": 2, "y": 0},
+ {"matrix": [0, 3], "x": 3, "y": 0.5},
+ {"matrix": [0, 4], "x": 4, "y": 0.75},
+
+ {"matrix": [0, 5], "x": 9.75, "y": 0.75},
+ {"matrix": [0, 6], "x": 10.75, "y": 0.5},
+ {"matrix": [0, 7], "x": 11.75, "y": 0},
+ {"matrix": [0, 8], "x": 12.75, "y": 0.25},
+ {"matrix": [0, 9], "x": 13.75, "y": 1},
+
+ {"matrix": [1, 0], "x": 0, "y": 2},
+ {"matrix": [1, 1], "x": 1, "y": 1.25},
+ {"matrix": [1, 2], "x": 2, "y": 1},
+ {"matrix": [1, 3], "x": 3, "y": 1.5},
+ {"matrix": [1, 4], "x": 4, "y": 1.75},
+
+ {"matrix": [1, 5], "x": 9.75, "y": 1.75},
+ {"matrix": [1, 6], "x": 10.75, "y": 1.5},
+ {"matrix": [1, 7], "x": 11.75, "y": 1},
+ {"matrix": [1, 8], "x": 12.75, "y": 1.25},
+ {"matrix": [1, 9], "x": 13.75, "y": 2},
+
+ {"matrix": [2, 0], "x": 0, "y": 3},
+ {"matrix": [2, 1], "x": 1, "y": 2.25},
+ {"matrix": [2, 2], "x": 2, "y": 2},
+ {"matrix": [2, 3], "x": 3, "y": 2.5},
+ {"matrix": [2, 4], "x": 4, "y": 2.75},
+
+ {"matrix": [2, 5], "x": 9.75, "y": 2.75},
+ {"matrix": [2, 6], "x": 10.75, "y": 2.5},
+ {"matrix": [2, 7], "x": 11.75, "y": 2},
+ {"matrix": [2, 8], "x": 12.75, "y": 2.25},
+ {"matrix": [2, 9], "x": 13.75, "y": 3},
+
+ {"matrix": [3, 0], "x": 1, "y": 3.25},
+ {"matrix": [3, 1], "x": 2, "y": 3},
+ {"matrix": [3, 3], "x": 5.25, "y": 3},
+ {"matrix": [3, 4], "x": 6.25, "y": 3.25, "h": 1.5},
+
+ {"matrix": [3, 5], "x": 7.5, "y": 3.25, "h": 1.5},
+ {"matrix": [3, 6], "x": 8.5, "y": 3},
+ {"matrix": [3, 8], "x": 11.75, "y": 3},
+ {"matrix": [3, 9], "x": 12.75, "y": 3.25},
+
+ {"matrix": [3, 2], "x": 5.25, "y": 4},
+
+ {"matrix": [3, 7], "x": 8.5, "y": 4}
]
}
}
diff --git a/keyboards/molecule/molecule.c b/keyboards/molecule/molecule.c
deleted file mode 100755
index c5f035289e..0000000000
--- a/keyboards/molecule/molecule.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Copyright 2021 bbrfkr
- *
- * 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 "molecule.h"
diff --git a/keyboards/molecule/molecule.h b/keyboards/molecule/molecule.h
deleted file mode 100755
index a7769f89a1..0000000000
--- a/keyboards/molecule/molecule.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Copyright 2021 bbrfkr
- *
- * 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"
-
-/* This is a shortcut to help you visually see your layout.
- *
- * The first section contains all of the arguments representing the physical
- * layout of the board and position of the keys.
- *
- * The second converts the arguments into a two-dimensional array which
- * represents the switch matrix.
- */
-#define LAYOUT( \
- L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \
- L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \
- L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \
- L30, L31, L33, L34, R30, R31, R33, R34, \
- L32, R32 \
- ) \
- { \
- { L00, L01, L02, L03, L04, R00, R01, R02, R03, R04 }, \
- { L10, L11, L12, L13, L14, R10, R11, R12, R13, R14 }, \
- { L20, L21, L22, L23, L24, R20, R21, R22, R23, R24 }, \
- { L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 }, \
- }