aboutsummaryrefslogtreecommitdiff
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 473af67d3..23fbfd0b9 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/>.
20 20
21#include "config_common.h" 21#include "config_common.h"
22 22
23#define USB_VENDOR_ID_LENOVO 0x17ef
24#define USB_DEVICE_ID_LENOVO_TPKBD 0x6009
25#define USB_DEVICE_ID_LENOVO_CUSBKBD 0x6047
26#define USB_DEVICE_ID_LENOVO_CBTKBD 0x6048
27#define USB_DEVICE_ID_LENOVO_TPPRODOCK 0x6067
28
23/* USB Device descriptor parameter */ 29/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED 30#define VENDOR_ID USB_VENDOR_ID_LENOVO
25#define PRODUCT_ID 0x6660 31#define PRODUCT_ID USB_DEVICE_ID_LENOVO_CBTKBD
26#define DEVICE_VER 0x0001 32#define DEVICE_VER 0x0001
27#define MANUFACTURER Priyadi 33#define MANUFACTURER Priyadi
28#define PRODUCT Promethium Keyboard 34#define PRODUCT Promethium Keyboard
29#define DESCRIPTION Promethium Keyboard 35#define DESCRIPTION
30 36
31/* key matrix size */ 37/* key matrix size */
32#define MATRIX_ROWS 8 38#define MATRIX_ROWS 8
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index bf797a749..db33b9f66 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -736,106 +736,36 @@ void shutdown_user()
736 736
737 737
738void ps2_mouse_init_user() { 738void ps2_mouse_init_user() {
739 uint8_t rcv;
740
739 // set TrackPoint sensitivity 741 // set TrackPoint sensitivity
740 PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); 742 PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2");
741 PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); 743 PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81");
742 PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); 744 PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A");
743 PS2_MOUSE_SEND(0x60, "set trackpoint sensitivity: 0x60"); 745 PS2_MOUSE_SEND(0x49, "set trackpoint sensitivity: 0x59");
746
747 // set TrackPoint Negative Inertia factor
748 PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2");
749 PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81");
750 PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D");
751 PS2_MOUSE_SEND(0x06, "set negative inertia factor: 0x06");
744 752
745 // set TrackPoint speed 753 // set TrackPoint speed
746 // (transfer function upper plateau speed) 754 // (transfer function upper plateau speed)
747 PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); 755 PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2");
748 PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); 756 PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81");
749 PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); 757 PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60");
750 PS2_MOUSE_SEND(0x90, "set trackpoint speed: 0x90"); 758 PS2_MOUSE_SEND(0x61, "set trackpoint speed: 0x61");
751 759
752 // set TrackPoint Negative Inertia factor 760 // inquire pts status
753 PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2");
754 PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81");
755 PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D");
756 PS2_MOUSE_SEND(0x03, "set negative inertia factor: 0x03");
757
758 // disable up threshold (click)
759 PS2_MOUSE_SEND(0xE2, "set disable up threshold: 0xE2");
760 PS2_MOUSE_SEND(0x47, "set disable up threshold: 0x47");
761 PS2_MOUSE_SEND(0x2C, "set disable up threshold: 0x2C");
762 PS2_MOUSE_SEND(0x01, "set disable up threshold: 0x01");
763
764 // enable TrackPoint Press to Select (PtS)
765 // print("ps2_mouse_init: send 0xE2: ");
766 // rcv = ps2_host_send(0xE2);
767 // phex(rcv); phex(ps2_error); print("\n");
768 // print("ps2_mouse_init: send 0x47: ");
769 // rcv = ps2_host_send(0x47);
770 // phex(rcv); phex(ps2_error); print("\n");
771 // print("ps2_mouse_init: send 0x2C: ");
772 // rcv = ps2_host_send(0x2C);
773 // phex(rcv); phex(ps2_error); print("\n");
774 // print("ps2_mouse_init: send 0x00: ");
775 // rcv = ps2_host_send(0x00);
776 // phex(rcv); phex(ps2_error); print("\n");
777
778 // set TrackPoint Press to Select threshold
779 // print("ps2_mouse_init: send 0xE2: ");
780 // rcv = ps2_host_send(0xE2);
781 // phex(rcv); phex(ps2_error); print("\n");
782 // print("ps2_mouse_init: send 0x81: ");
783 // rcv = ps2_host_send(0x81);
784 // phex(rcv); phex(ps2_error); print("\n");
785 // print("ps2_mouse_init: send 0x5C: ");
786 // rcv = ps2_host_send(0x5C);
787 // phex(rcv); phex(ps2_error); print("\n");
788 // // default PtS threshold is 0x08
789 // print("ps2_mouse_init: send 0x04: ");
790 // rcv = ps2_host_send(0x04);
791 // phex(rcv); phex(ps2_error); print("\n");
792
793 // set TrackPoint Press to Select time constant (zTc)
794 // print("ps2_mouse_init: send 0xE2: ");
795 // rcv = ps2_host_send(0xE2);
796 // phex(rcv); phex(ps2_error); print("\n");
797 // print("ps2_mouse_init: send 0x81: ");
798 // rcv = ps2_host_send(0x81);
799 // phex(rcv); phex(ps2_error); print("\n");
800 // print("ps2_mouse_init: send 0x5E: ");
801 // rcv = ps2_host_send(0x5E);
802 // phex(rcv); phex(ps2_error); print("\n");
803 // // default zTc is 0x26
804 // print("ps2_mouse_init: send 0x45: ");
805 // rcv = ps2_host_send(0x45);
806 // phex(rcv); phex(ps2_error); print("\n");
807
808 /*
809 // set TrackPoint Press to Select Jenks Curvature (jkcur)
810 print("ps2_mouse_init: send 0xE2: ");
811 rcv = ps2_host_send(0xE2);
812 phex(rcv); phex(ps2_error); print("\n");
813 print("ps2_mouse_init: send 0x81: ");
814 rcv = ps2_host_send(0x81);
815 phex(rcv); phex(ps2_error); print("\n");
816 print("ps2_mouse_init: send 0x5D: ");
817 rcv = ps2_host_send(0x5D);
818 phex(rcv); phex(ps2_error); print("\n");
819 // default jkcur is 0x87
820 print("ps2_mouse_init: send 0x87: ");
821 rcv = ps2_host_send(0x87);
822 phex(rcv); phex(ps2_error); print("\n");
823 */
824
825 /*
826 // set TrackPoint Minimum Drag (mindrag)
827 print("ps2_mouse_init: send 0xE2: ");
828 rcv = ps2_host_send(0xE2); 761 rcv = ps2_host_send(0xE2);
829 phex(rcv); phex(ps2_error); print("\n"); 762 rcv = ps2_host_send(0x2C);
830 print("ps2_mouse_init: send 0x81: "); 763 rcv = ps2_host_recv_response();
831 rcv = ps2_host_send(0x81); 764 if ((rcv & 1) == 1) {
832 phex(rcv); phex(ps2_error); print("\n"); 765 // if on, disable pts
833 print("ps2_mouse_init: send 0x59: "); 766 rcv = ps2_host_send(0xE2);
834 rcv = ps2_host_send(0x59); 767 rcv = ps2_host_send(0x47);
835 phex(rcv); phex(ps2_error); print("\n"); 768 rcv = ps2_host_send(0x2C);
836 // default PtS mindrag is 0x14 769 rcv = ps2_host_send(0x01);
837 print("ps2_mouse_init: send 0x14: "); 770 }
838 rcv = ps2_host_send(0x14);
839 phex(rcv); phex(ps2_error); print("\n");
840 */
841} \ No newline at end of file 771} \ No newline at end of file
diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk
index 891f523c2..465ef3359 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -1,4 +1,3 @@
1
2# MCU name 1# MCU name
3#MCU = at90usb1287 2#MCU = at90usb1287
4MCU = atmega32u4 3MCU = atmega32u4
@@ -66,6 +65,8 @@ BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID
66RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. 65RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
67PS2_MOUSE_ENABLE ?= yes 66PS2_MOUSE_ENABLE ?= yes
68PS2_USE_INT ?= yes 67PS2_USE_INT ?= yes
68ADAFRUIT_BLE_ENABLE ?= yes
69API_SYSEX_ENABLE ?= no
69 70
70# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE 71# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
71SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend 72SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend