add trackball test code for promicro

This commit is contained in:
scda 2023-09-04 22:05:54 +02:00
parent a3c215b363
commit f516cbaa95
5 changed files with 117 additions and 0 deletions

View File

@ -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 |

View File

@ -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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#define POINTING_DEVICE_ROTATION_90
#ifndef PIMORONI_TRACKBALL_ADDRESS
# define PIMORONI_TRACKBALL_ADDRESS 0x0A
#endif

View File

@ -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}
]
}
}
}

View File

@ -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"
]
]
}

View File

@ -0,0 +1,3 @@
# This file intentionally left blank
POINTING_DEVICE_DRIVER = pimoroni_trackball
POINTING_DEVICE_ENABLE = yes