diff options
author | Volodymyr Lukashevych <vlukash@users.noreply.github.com> | 2019-06-11 15:18:14 -0700 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-06-11 15:18:14 -0700 |
commit | b92387b7499e21603e241d136db92c6e716b0cba (patch) | |
tree | 98626a4cd72b4fbd043a24a5c63b731c3ce0cd89 /keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h | |
parent | 2558466d78a2c2436dedeff593491bdb20780cfc (diff) |
[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.
Diffstat (limited to 'keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h')
-rw-r--r-- | keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h new file mode 100644 index 0000000000..755abc7de2 --- /dev/null +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/trackpad.h @@ -0,0 +1,32 @@ +#pragma once + +#include "pointing_device.h" +#include "quantum.h" +#include "report.h" +#include <util/delay.h> +#include "../../lib/lufa/LUFA/Drivers/Peripheral/SPI.h" + +// Trackpad speed adjustments +#define POINTER_SPEED_MULTIPLIER 2 +#define SCROLL_SPEED_DIVIDER 6 + +// Pins on corresponding ports +#define TP_RESET 1 +#define TP_SHUTDOWN 0 +#define TP_CS 0 +#define LVL_SHIFT_EN 7 + +// Configure as output +#define TP_RESET_INIT DDRF |= (1 << TP_RESET); +#define TP_SHUTDOWN_INIT DDRF |= (1 << TP_SHUTDOWN); +#define TP_CS_INIT DDRB |= (1 << TP_CS); +#define LVL_SHIFT_EN_INIT DDRC |= (1 << LVL_SHIFT_EN); + +#define TP_RESET_HI PORTF |= (1 << TP_RESET); +#define TP_RESET_LO PORTF &= ~ (1 << TP_RESET); +#define TP_SHUTDOWN_HI PORTF |= (1 << TP_SHUTDOWN); +#define TP_SHUTDOWN_LO PORTF &= ~ (1 << TP_SHUTDOWN); +#define TP_CS_HI PORTB |= (1 << TP_CS); +#define TP_CS_LO PORTB &= ~ (1 << TP_CS); +#define LVL_SHIFT_EN_HI PORTC |= (1 << LVL_SHIFT_EN); +#define LVL_SHIFT_EN_LO PORTC &= ~ (1 << LVL_SHIFT_EN); |