1
0
Fork 0

[Keymap] Add BB8520 trackpad support for CrKbd (#5925)

* Add vlukash CrKbd keymap to support trackpad adapter.

The trackpad adapter uses Elite-C board that has five extra pins.
Also SPI pins are taken for trackpad, keymap config updates column data
pins for matrix scan.

* Update vlukash keymap

* Enable pointing devide, configure mouse BTN1

* Set TAPPING_TERM to 300

* Add support for the BlackBerry 8520 trackpad

* Add vlukash keymap for master-right no-trackpad version

* Remap backspace

* Set EXTRAKEY_ENABLE = yes

* Update thumb keys mappings

* Set bootloader to atmel-dfu

* Sync keymap

* Add scrolling support

* Make debug LEDS conditional

* Add support for both flex and no-flex PCBs

* Add readme and rename root folders

* Update readme file with blog link

* Fix readme file formatting

* Remove ADJUST keycode, code cleanup.

* Add Win key to the keymap.
This commit is contained in:
Volodymyr Lukashevych 2019-06-11 15:18:14 -07:00 committed by Drashna Jaelre
parent 2558466d78
commit b92387b749
11 changed files with 684 additions and 7 deletions

View file

@ -93,6 +93,44 @@ uint8_t matrix_cols(void)
return MATRIX_COLS;
}
void tx_rx_leds_init(void)
{
#ifndef NO_DEBUG_LEDS
TX_RX_LED_INIT;
TXLED0;
RXLED0;
#endif
}
void tx_led_on(void)
{
#ifndef NO_DEBUG_LEDS
TXLED1;
#endif
}
void tx_led_off(void)
{
#ifndef NO_DEBUG_LEDS
TXLED0;
#endif
}
void rx_led_on(void)
{
#ifndef NO_DEBUG_LEDS
RXLED1;
#endif
}
void rx_led_off(void)
{
#ifndef NO_DEBUG_LEDS
RXLED0;
#endif
}
void matrix_init(void)
{
debug_enable = true;
@ -102,9 +140,7 @@ void matrix_init(void)
unselect_rows();
init_cols();
TX_RX_LED_INIT;
TXLED0;
RXLED0;
tx_rx_leds_init();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
@ -189,10 +225,10 @@ int serial_transaction(int master_changed) {
int ret=serial_update_buffers();
#endif
if (ret ) {
if(ret==2) RXLED1;
if(ret==2) rx_led_on();
return 1;
}
RXLED0;
rx_led_off();
memcpy(&matrix[slaveOffset],
(void *)serial_slave_buffer, SERIAL_SLAVE_BUFFER_LENGTH);
return 0;
@ -241,7 +277,7 @@ uint8_t matrix_master_scan(void) {
if( serial_transaction(mchanged) ) {
#endif
// turn on the indicator led when halves are disconnected
TXLED1;
tx_led_on();
error_count++;
@ -254,7 +290,7 @@ uint8_t matrix_master_scan(void) {
}
} else {
// turn off the indicator led on no error
TXLED0;
tx_led_off();
error_count = 0;
}
matrix_scan_quantum();