aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPriyadi Iman Nurcahyo <priyadi@priyadi.net>2016-12-14 07:10:28 +0700
committerPriyadi Iman Nurcahyo <priyadi@priyadi.net>2016-12-14 07:10:28 +0700
commite5b165c2555365b495a29c4f85f8bf53a511304a (patch)
treede7b158040fbe3720f4022d734d4f682cbb1b14c
parent32e952bda9ca6bde37c2a450c51a036b13aabd80 (diff)
downloadqmk_firmware-e5b165c2555365b495a29c4f85f8bf53a511304a.tar.gz
qmk_firmware-e5b165c2555365b495a29c4f85f8bf53a511304a.zip
fine tune trackpoint initialization
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c110
-rw-r--r--keyboards/handwired/promethium/rules.mk1
2 files changed, 21 insertions, 90 deletions
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 f305c07e8..465ef3359 100644
--- a/keyboards/handwired/promethium/rules.mk
+++ b/keyboards/handwired/promethium/rules.mk
@@ -66,6 +66,7 @@ RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this
66PS2_MOUSE_ENABLE ?= yes 66PS2_MOUSE_ENABLE ?= yes
67PS2_USE_INT ?= yes 67PS2_USE_INT ?= yes
68ADAFRUIT_BLE_ENABLE ?= 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