summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/handwired/promethium/config.h12
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c110
-rw-r--r--keyboards/handwired/promethium/rules.mk3
3 files changed, 31 insertions, 94 deletions
diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h
index 473af67d34..23fbfd0b9a 100644
--- a/keyboards/handwired/promethium/config.h
+++ b/keyboards/handwired/promethium/config.h
@@ -20,13 +20,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"
+#define USB_VENDOR_ID_LENOVO 0x17ef
+#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009
+#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047
+#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048
+#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067
+
/* USB Device descriptor parameter */
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0x6660
+#define VENDOR_ID USB_VENDOR_ID_LENOVO
+#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD
#define DEVICE_VER 0x0001
#define MANUFACTURER Priyadi
#define PRODUCT Promethium Keyboard
-#define DESCRIPTION Promethium Keyboard
+#define DESCRIPTION
/* key matrix size */
#define MATRIX_ROWS 8
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index bf797a7491..db33b9f666 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -736,106 +736,36 @@ void shutdown_user()
void ps2_mouse_init_user() {
+ uint8_t rcv;
+
// set TrackPoint sensitivity
PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2");
PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81");
PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A");
- PS2_MOUSE_SEND(0x60, "set trackpoint sensitivity: 0x60");
+ PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59");
+
+ // set TrackPoint Negative Inertia factor
+ PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2");
+ PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81");
+ PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D");
+ PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06");
// set TrackPoint speed
// (transfer function upper plateau speed)
PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2");
PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81");
PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60");
- PS2_MOUSE_SEND(0x90, "set trackpoint speed: 0x90");
+ PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61");
- // set TrackPoint Negative Inertia factor
- PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2");
- PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81");
- PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D");
- PS2_MOUSE_SEND(0x03, "set negative inertia factor: 0x03");
-
- // disable up threshold (click)
- PS2_MOUSE_SEND(0xE2, "set disable up threshold: 0xE2");
- PS2_MOUSE_SEND(0x47, "set disable up threshold: 0x47");
- PS2_MOUSE_SEND(0x2C, "set disable up threshold: 0x2C");
- PS2_MOUSE_SEND(0x01, "set disable up threshold: 0x01");
-
- // enable TrackPoint Press to Select (PtS)
- // print("ps2_mouse_init: send 0xE2: ");
- // rcv = ps2_host_send(0xE2);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x47: ");
- // rcv = ps2_host_send(0x47);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x2C: ");
- // rcv = ps2_host_send(0x2C);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x00: ");
- // rcv = ps2_host_send(0x00);
- // phex(rcv); phex(ps2_error); print("\n");
-
- // set TrackPoint Press to Select threshold
- // print("ps2_mouse_init: send 0xE2: ");
- // rcv = ps2_host_send(0xE2);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x81: ");
- // rcv = ps2_host_send(0x81);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x5C: ");
- // rcv = ps2_host_send(0x5C);
- // phex(rcv); phex(ps2_error); print("\n");
- // // default PtS threshold is 0x08
- // print("ps2_mouse_init: send 0x04: ");
- // rcv = ps2_host_send(0x04);
- // phex(rcv); phex(ps2_error); print("\n");
-
- // set TrackPoint Press to Select time constant (zTc)
- // print("ps2_mouse_init: send 0xE2: ");
- // rcv = ps2_host_send(0xE2);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x81: ");
- // rcv = ps2_host_send(0x81);
- // phex(rcv); phex(ps2_error); print("\n");
- // print("ps2_mouse_init: send 0x5E: ");
- // rcv = ps2_host_send(0x5E);
- // phex(rcv); phex(ps2_error); print("\n");
- // // default zTc is 0x26
- // print("ps2_mouse_init: send 0x45: ");
- // rcv = ps2_host_send(0x45);
- // phex(rcv); phex(ps2_error); print("\n");
-
- /*
- // set TrackPoint Press to Select Jenks Curvature (jkcur)
- print("ps2_mouse_init: send 0xE2: ");
- rcv = ps2_host_send(0xE2);
- phex(rcv); phex(ps2_error); print("\n");
- print("ps2_mouse_init: send 0x81: ");
- rcv = ps2_host_send(0x81);
- phex(rcv); phex(ps2_error); print("\n");
- print("ps2_mouse_init: send 0x5D: ");
- rcv = ps2_host_send(0x5D);
- phex(rcv); phex(ps2_error); print("\n");
- // default jkcur is 0x87
- print("ps2_mouse_init: send 0x87: ");
- rcv = ps2_host_send(0x87);
- phex(rcv); phex(ps2_error); print("\n");
- */
-
- /*
- // set TrackPoint Minimum Drag (mindrag)
- print("ps2_mouse_init: send 0xE2: ");
+ // inquire pts status
rcv = ps2_host_send(0xE2);
- phex(rcv); phex(ps2_error); print("\n");
- print("ps2_mouse_init: send 0x81: ");
- rcv = ps2_host_send(0x81);
- phex(rcv); phex(ps2_error); print("\n");
- print("ps2_mouse_init: send 0x59: ");
- rcv = ps2_host_send(0x59);
- phex(rcv); phex(ps2_error); print("\n");
- // default PtS mindrag is 0x14
- print("ps2_mouse_init: send 0x14: ");
- rcv = ps2_host_send(0x14);
- phex(rcv); phex(ps2_error); print("\n");
- */
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_recv_response();
+ if ((rcv & 1) == 1) {
+ // if on, disable pts
+ rcv = ps2_host_send(0xE2);
+ rcv = ps2_host_send(0x47);
+ rcv = ps2_host_send(0x2C);
+ rcv = ps2_host_send(0x01);
+ }
} \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
index 891f523c22..465ef3359a 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -1,4 +1,3 @@
-
# MCU name
#MCU = at90usb1287
MCU = atmega32u4
@@ -66,6 +65,8 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
PS2_MOUSE_ENABLE ?= yes
PS2_USE_INT ?= yes
+ADAFRUIT_BLE_ENABLE ?= yes
+API_SYSEX_ENABLE ?= no
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend