aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xkeyboards/handwired/promethium/keymaps/priyadi/flash.sh1
-rw-r--r--keyboards/handwired/promethium/keymaps/priyadi/keymap.c110
2 files changed, 110 insertions, 1 deletions
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
index fb81a54ee..14a3b4378 100755
--- a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
+++ b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh
@@ -1,3 +1,4 @@
1#!/bin/sh 1#!/bin/sh
2 2
3sleep 10
3avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex 4avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex
diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
index 3d34e9822..bf797a749 100644
--- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
+++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c
@@ -11,6 +11,8 @@
11#include "process_unicode.h" 11#include "process_unicode.h"
12#include "quantum.h" 12#include "quantum.h"
13#include "rgbsps.h" 13#include "rgbsps.h"
14#include "ps2_mouse.h"
15#include "ps2.h"
14#define COUNT(x) (sizeof (x) / sizeof (*(x))) 16#define COUNT(x) (sizeof (x) / sizeof (*(x)))
15 17
16// #define RGBLED_NUM 5 18// #define RGBLED_NUM 5
@@ -730,4 +732,110 @@ void shutdown_user()
730 stop_all_notes(); 732 stop_all_notes();
731} 733}
732 734
733#endif \ No newline at end of file 735#endif
736
737
738void ps2_mouse_init_user() {
739 // set TrackPoint sensitivity
740 PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2");
741 PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81");
742 PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A");
743 PS2_MOUSE_SEND(0x60, "set trackpoint sensitivity: 0x60");
744
745 // set TrackPoint speed
746 // (transfer function upper plateau speed)
747 PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2");
748 PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81");
749 PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60");
750 PS2_MOUSE_SEND(0x90, "set trackpoint speed: 0x90");
751
752 // set TrackPoint Negative Inertia factor
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);
829 phex(rcv); phex(ps2_error); print("\n");
830 print("ps2_mouse_init: send 0x81: ");
831 rcv = ps2_host_send(0x81);
832 phex(rcv); phex(ps2_error); print("\n");
833 print("ps2_mouse_init: send 0x59: ");
834 rcv = ps2_host_send(0x59);
835 phex(rcv); phex(ps2_error); print("\n");
836 // default PtS mindrag is 0x14
837 print("ps2_mouse_init: send 0x14: ");
838 rcv = ps2_host_send(0x14);
839 phex(rcv); phex(ps2_error); print("\n");
840 */
841} \ No newline at end of file