diff --git a/common/keyboard.c b/common/keyboard.c index ef2efb6f..b4f59f83 100644 --- a/common/keyboard.c +++ b/common/keyboard.c @@ -64,6 +64,7 @@ static bool has_ghost_in_row(uint8_t row) } #endif +extern uint8_t ps2_mouse_enabled; void keyboard_init(void) { @@ -75,7 +76,7 @@ void keyboard_init(void) #endif #ifdef PS2_MOUSE_ENABLE - if (ps2_enabled()) { + if (ps2_mouse_enabled) { ps2_mouse_init(); } #endif @@ -157,7 +158,7 @@ MATRIX_LOOP_END: #endif #ifdef PS2_MOUSE_ENABLE - if (ps2_enabled()) { + if (ps2_mouse_enabled) { ps2_mouse_task(); } #endif diff --git a/keyboard/tentapad/Makefile b/keyboard/tentapad/Makefile index 610e78c2..c6aad9a5 100644 --- a/keyboard/tentapad/Makefile +++ b/keyboard/tentapad/Makefile @@ -130,11 +130,13 @@ COMMAND_ENABLE = yes # Commands for debug and configuration #NKRO_ENABLE = yes # USB Nkey Rollover #USB_6KRO_ENABLE = yes # USB 6key Rollover PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -PS2_USE_BUSYWAIT = yes +PS2_USE_USART= yes +#PS2_USE_BUSYWAIT = yes BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight +FADING_LED_ENABLE = yes # Enable fading backlight BREATHING_LED_ENABLE = yes # Enable breathing backlight #LEDMAP_ENABLE = yes # Enable LED mapping #LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom diff --git a/keyboard/tentapad/Makefile.pjrc b/keyboard/tentapad/Makefile.pjrc index 9cbdce7b..9975a614 100644 --- a/keyboard/tentapad/Makefile.pjrc +++ b/keyboard/tentapad/Makefile.pjrc @@ -105,6 +105,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight +FADING_LED_ENABLE = yes # Enable fading backlight BREATHING_LED_ENABLE = yes # Enable breathing backlight #LEDMAP_ENABLE = yes # Enable LED mapping #LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom diff --git a/keyboard/tentapad/Makefile_gh60 b/keyboard/tentapad/Makefile_gh60 index 33f87de8..717dc33d 100644 --- a/keyboard/tentapad/Makefile_gh60 +++ b/keyboard/tentapad/Makefile_gh60 @@ -135,6 +135,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight +FADING_LED_ENABLE = yes # Enable fading backlight BREATHING_LED_ENABLE = yes # Enable breathing backlight #LEDMAP_ENABLE = yes # Enable LED mapping #LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom diff --git a/keyboard/tentapad/Makefile_gh60.pjrc b/keyboard/tentapad/Makefile_gh60.pjrc index 3dd80178..dae1da9e 100644 --- a/keyboard/tentapad/Makefile_gh60.pjrc +++ b/keyboard/tentapad/Makefile_gh60.pjrc @@ -105,6 +105,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality KEYMAP_IN_EEPROM_ENABLE = yes # Read keymap from eeprom #KEYMAP_SECTION_ENABLE = yes # Fixed address keymap for keymap editor SOFTPWM_LED_ENABLE = yes # Enable SoftPWM to drive backlight +FADING_LED_ENABLE = yes # Enable fading backlight BREATHING_LED_ENABLE = yes # Enable breathing backlight #LEDMAP_ENABLE = yes # Enable LED mapping #LEDMAP_IN_EEPROM_ENABLE = yes # Read LED mapping from eeprom diff --git a/keyboard/tentapad/config.h b/keyboard/tentapad/config.h index ce986978..847097b5 100644 --- a/keyboard/tentapad/config.h +++ b/keyboard/tentapad/config.h @@ -42,11 +42,7 @@ along with this program. If not, see . #define DEBOUNCE 5 /* number of backlight levels */ -#ifdef BREATHING_LED_ENABLE -#define BACKLIGHT_LEVELS 6 -#else -#define BACKLIGHT_LEVELS 3 -#endif +#define BACKLIGHT_LEVELS 8 /* number of LEDs */ #define LED_COUNT 4 @@ -64,15 +60,48 @@ along with this program. If not, see . /* PS2 mouse support */ #ifdef PS2_MOUSE_ENABLE + #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND #define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT PD3 +#define PS2_CLOCK_BIT PD5 #define PS2_DATA_PORT PORTD #define PS2_DATA_PIN PIND #define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT PD4 +#define PS2_DATA_BIT PD2 + +#ifdef PS2_USE_USART +#define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1<