When using the library to configure a TCA8418 in keyboard matrix mode the matrix() method sets up the KP_GPIOx registers but doesn't clear the equivalent bits from either the GPI_EMx or GPIO_INT_ENx registers.
Proposed solution:
In matrix() set the appropriate GPI_EMx and GPIO_INT_ENx register bits to 0 when setting the matching KP_GPIOx register bit to 1.
Took me a long time to chase this one down, including requesting support from TI.
To reproduce:
begin()
and then creates a 7x10 matrix by callingmatrix(7, 10)
.Result: A key event for 20 and a key event for 98. Expected result: A key event for 20 and nothing else
More details:
begin()
assumes the TCA8418 will be used in GPIO mode and sets all of the GIO pins to send key events to the FIFO queue and enables interrupts on all the GPIO pins.When using the library to configure a TCA8418 in keyboard matrix mode the
matrix()
method sets up the KP_GPIOx registers but doesn't clear the equivalent bits from either theGPI_EMx
orGPIO_INT_ENx
registers.Proposed solution:
In
matrix()
set the appropriateGPI_EMx
andGPIO_INT_ENx
register bits to0
when setting the matchingKP_GPIOx
register bit to1
.