From f516cbaa950c0aca0431c616478e904ee1556e9c Mon Sep 17 00:00:00 2001 From: scda Date: Mon, 4 Sep 2023 22:05:54 +0200 Subject: [PATCH] add trackball test code for promicro --- keyboards/scda/promicro_trackball/README.md | 20 ++++++++ keyboards/scda/promicro_trackball/config.h | 24 +++++++++ keyboards/scda/promicro_trackball/info.json | 51 +++++++++++++++++++ .../keymaps/default/keymap.json | 19 +++++++ keyboards/scda/promicro_trackball/rules.mk | 3 ++ 5 files changed, 117 insertions(+) create mode 100644 keyboards/scda/promicro_trackball/README.md create mode 100644 keyboards/scda/promicro_trackball/config.h create mode 100644 keyboards/scda/promicro_trackball/info.json create mode 100644 keyboards/scda/promicro_trackball/keymaps/default/keymap.json create mode 100644 keyboards/scda/promicro_trackball/rules.mk diff --git a/keyboards/scda/promicro_trackball/README.md b/keyboards/scda/promicro_trackball/README.md new file mode 100644 index 00000000000..bba8faf835e --- /dev/null +++ b/keyboards/scda/promicro_trackball/README.md @@ -0,0 +1,20 @@ +# DirectPins + +![Promicro Pinout Guide](https://i.imgur.com/LZ194Hf.jpg) + +copy of the [ez_maker/directpins/promicro keyboard](https://github.com/qmk/qmk_firmware/tree/b2ded61796aee1f705a222e229c5b55416d93dd0/keyboards/ez_maker/directpins/promicro) + +- Compile: `qmk compile -kb scda/promicro_trackball -km default` +- Flash: `qmk flash -kb scda/promicro_trackball -km default` + +HW setup: + +- current config requires the following pimoroni board connections + +| trackball | promicro | notes | +| --------- | ---------------- | ------------------------------------------- | +| GND | GND | +| 3.5V | VCC | +| SDA | SDA / pin 2 / D1 | can be configured as `pin_a` in `info.json` | +| SCL | SCL / pin 3 / D0 | can be configured as `pin_b` in `info.json` | +| INT | unknown | still to figure out | diff --git a/keyboards/scda/promicro_trackball/config.h b/keyboards/scda/promicro_trackball/config.h new file mode 100644 index 00000000000..48438e6adf6 --- /dev/null +++ b/keyboards/scda/promicro_trackball/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2021 CapsUnlocked + +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 . +*/ +#pragma once + + +#define POINTING_DEVICE_ROTATION_90 + +#ifndef PIMORONI_TRACKBALL_ADDRESS +# define PIMORONI_TRACKBALL_ADDRESS 0x0A +#endif diff --git a/keyboards/scda/promicro_trackball/info.json b/keyboards/scda/promicro_trackball/info.json new file mode 100644 index 00000000000..2e569b08d16 --- /dev/null +++ b/keyboards/scda/promicro_trackball/info.json @@ -0,0 +1,51 @@ +{ + "manufacturer": "me", + "keyboard_name": "DirectPins ProMicro", + "maintainer": "scda", + "development_board": "promicro", + "features": { + "bootmagic": true, + "extrakey": true, + "mousekey": true + }, + "matrix_pins": { + "direct": [ + ["D3", null], + ["D2", null], + [null, "F4"], + [null, "F5"], + ["D4", "F6"], + ["C6", "F7"], + ["D7", "B1"], + ["E6", "B3"], + ["B4", "B2"], + ["B5", null] + ] + }, + "usb": { + "device_version": "0.0.1", + "pid": "0x2320", + "vid": "0xFEED" + }, + "encoder": { + "rotary": [ + {"pin_a": "D1", "pin_b": "D0"} + ] + }, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label": "D3", "matrix": [0, 0], "x": 0, "y": 0}, + {"label": "D2", "matrix": [1, 0], "x": 0, "y": 1}, + {"label": "F4", "matrix": [2, 1], "x": 2, "y": 4}, + {"label": "F5", "matrix": [3, 1], "x": 2, "y": 5}, + {"label": "D4", "matrix": [4, 0], "x": 0, "y": 6}, {"label": "F6", "matrix": [4, 1], "x": 2, "y": 6}, + {"label": "C6", "matrix": [5, 0], "x": 0, "y": 7}, {"label": "F7", "matrix": [5, 1], "x": 2, "y": 7}, + {"label": "D7", "matrix": [6, 0], "x": 0, "y": 8}, {"label": "B1", "matrix": [6, 1], "x": 2, "y": 8}, + {"label": "E6", "matrix": [7, 0], "x": 0, "y": 9}, {"label": "B3", "matrix": [7, 1], "x": 2, "y": 9}, + {"label": "B4", "matrix": [8, 0], "x": 0, "y": 10}, {"label": "B2", "matrix": [8, 1], "x": 2, "y": 10}, + {"label": "B5", "matrix": [9, 0], "x": 0, "y": 11} + ] + } + } +} diff --git a/keyboards/scda/promicro_trackball/keymaps/default/keymap.json b/keyboards/scda/promicro_trackball/keymaps/default/keymap.json new file mode 100644 index 00000000000..06ea1448823 --- /dev/null +++ b/keyboards/scda/promicro_trackball/keymaps/default/keymap.json @@ -0,0 +1,19 @@ +{ + "keyboard": "ez_maker/directpins/promicro", + "keymap": "default", + "layout": "LAYOUT_all", + "layers": [ + [ + "KC_0", + "KC_1", + "KC_3", + "KC_5", + "KC_6", "KC_7", + "KC_8", "KC_9", + "KC_A", "KC_B", + "KC_C", "KC_D", + "KC_E", "KC_F", + "KC_G" + ] + ] +} diff --git a/keyboards/scda/promicro_trackball/rules.mk b/keyboards/scda/promicro_trackball/rules.mk new file mode 100644 index 00000000000..f5128648daf --- /dev/null +++ b/keyboards/scda/promicro_trackball/rules.mk @@ -0,0 +1,3 @@ +# This file intentionally left blank +POINTING_DEVICE_DRIVER = pimoroni_trackball +POINTING_DEVICE_ENABLE = yes