fantastic60: Disable bootmagic and change method of detecting ps2 mouse
This commit is contained in:
parent
25f391d613
commit
2dce1236b7
@ -121,8 +121,8 @@ endif
|
||||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
#MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = yes # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
|
@ -74,6 +74,20 @@ void matrix_init(void)
|
||||
unselect_rows();
|
||||
init_cols();
|
||||
|
||||
#ifdef PS2_MOUSE_ENABLE
|
||||
// ps2 mouse detecting
|
||||
DDRC &= ~(1<<PC7);
|
||||
PORTC |= (1<<PC7);
|
||||
_delay_us(30); // without this wait read unstable value.
|
||||
if ((PINC & (1<<PC7)) == 0) {
|
||||
ps2_mouse_enabled = 1;
|
||||
}
|
||||
else {
|
||||
ps2_mouse_enabled = 0;
|
||||
}
|
||||
PORTC &= ~(1<<PC7);
|
||||
#endif
|
||||
|
||||
// initialize matrix state: all keys off
|
||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
|
||||
matrix[i] = 0;
|
||||
|
Reference in New Issue
Block a user