forked from qmk/qmk_firmware
-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request qmk#14 from sadekbaroudi/fp/rockon_v3
rock on v3 firmware support
- Loading branch information
Showing
18 changed files
with
748 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com> | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 2 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define DEVICE_VER 0x0003 | ||
|
||
|
||
/* key matrix size */ | ||
/* Rows are doubled up */ | ||
#define MATRIX_ROWS 9 | ||
#define MATRIX_COLS 8 | ||
|
||
// SHIFT REGISTER | ||
// Only needed for matrix_74hc595_spi.c | ||
#define SHIFTREG_MATRIX_COL_CS B6 | ||
#define SHIFTREG_DIVISOR 8 // needs to be the same as the PMW33XX_CS_DIVISOR below | ||
#define MATRIX_ROW_PINS_SR { D4, C6, D7, E6, B4, F4, F5, F6, F7 } | ||
|
||
#define RGB_DI_PIN D3 | ||
#ifdef RGBLIGHT_ENABLE | ||
#ifdef RGBLED_NUM | ||
#undef RGBLED_NUM | ||
#endif | ||
#define RGBLED_NUM 69 | ||
#endif | ||
|
||
#ifdef RGB_MATRIX_ENABLE | ||
#ifdef DRIVER_LED_TOTAL | ||
#undef DRIVER_LED_TOTAL | ||
#endif | ||
#define DRIVER_LED_TOTAL 69 | ||
#endif | ||
|
||
// SPI config for shift register (and trackball if enabled) | ||
#define SPI_DRIVER SPID1 | ||
#define SPI_SCK_PIN B1 | ||
#define SPI_SCK_PAL_MODE 5 | ||
#define SPI_MOSI_PIN B2 | ||
#define SPI_MOSI_PAL_MODE 5 | ||
#define SPI_MISO_PIN B3 | ||
#define SPI_MISO_PAL_MODE 5 | ||
|
||
/* COL2ROW, ROW2COL*/ | ||
#define DIODE_DIRECTION COL2ROW | ||
|
||
#define ENCODERS_PAD_A {C7, D5, F1} | ||
#define ENCODERS_PAD_B {D2, B7, F0} | ||
|
||
#ifdef CIRQUE_ENABLE | ||
// cirque trackpad config | ||
#define CIRQUE_PINNACLE_ADDR 0x2A | ||
#define POINTING_DEVICE_ROTATION_90 | ||
#define CIRQUE_PINNACLE_TAP_ENABLE | ||
#define POINTING_DEVICE_TASK_THROTTLE_MS 5 | ||
#define I2C1_CLOCK_SPEED 400000 | ||
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_2 | ||
#endif | ||
|
||
#ifdef FP_TRACKBALL_ENABLE | ||
// Trackball config | ||
#define FP_POINTING_DEFAULT_DPI 800 | ||
#define PMW33XX_CS_PIN B5 | ||
#define PMW33XX_CPI FP_POINTING_DEFAULT_DPI | ||
#define PMW33XX_CS_DIVISOR 8 // needs to be the same as the SHIFTREG_DIVISOR above | ||
#define POINTING_DEVICE_INVERT_Y | ||
#endif | ||
|
||
#define DYNAMIC_KEYMAP_LAYER_COUNT 5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[ | ||
{ | ||
"type" : "single", | ||
"name" : "CIRQUE_ENABLE", | ||
"user_input": "Do you have a cirque?" | ||
}, | ||
{ | ||
"type" : "single", | ||
"name" : "FP_TRACKBALL_ENABLE", | ||
"user_input": "Do you have a trackball?" | ||
}, | ||
{ | ||
"type" : "one-of", | ||
"names" : [ "RGBLIGHT_ENABLE", "RGB_MATRIX_ENABLE" ], | ||
"user_input": "No RGB, RGB light, RGB matrix?" | ||
}, | ||
{ | ||
"type" : "single", | ||
"name" : "ENCODER_ENABLE", | ||
"user_input": "Do you have one or more rotary encoders?" | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// BEGIN SADEK PWM LED testing | ||
/* Copyright 2020 QMK | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/* | ||
* This file was auto-generated by: | ||
* `qmk chibios-confupdate -i keyboards/tkw/grandiceps/halconf.h -r platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h` | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define HAL_USE_SERIAL TRUE | ||
#define HAL_USE_SPI TRUE | ||
#define SPI_USE_WAIT TRUE | ||
#define SPI_SELECT_MODE SPI_SELECT_MODE_PAD | ||
|
||
#include_next <halconf.h> |
107 changes: 107 additions & 0 deletions
107
keyboards/fingerpunch/rockon/v3/keymaps/default/keymap.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
#include QMK_KEYBOARD_H | ||
|
||
// Defines names for use in layer keycodes and the keymap | ||
enum layer_names { | ||
_QWERTY, | ||
_COLEMAK, | ||
_LOWER, | ||
_RAISE, | ||
_ADJUST | ||
}; | ||
|
||
enum custom_keycodes { | ||
QWERTY = SAFE_RANGE, | ||
LOWER, | ||
RAISE, | ||
ADJUST | ||
}; | ||
|
||
// All the KC_MUTE keycodes below represent the encoders. If you aren't using encoders, you can ignore these: | ||
// --> KC_MUTE, KC_LCTL, KC_LGUI, LOWER, KC_SPC, KC_LALT, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_RALT, KC_SPC, RAISE, KC_RGUI, KC_RCTL, KC_MUTE, <-- | ||
// --> KC_MUTE <-- | ||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
|
||
[_QWERTY] = LAYOUT_rockon( | ||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, | ||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ADJUST, ADJUST, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
KC_MUTE, KC_LCTL, KC_LGUI, LOWER, KC_SPC, KC_LALT, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_RALT, KC_SPC, RAISE, KC_RGUI, KC_RCTL, KC_MUTE, | ||
KC_MUTE | ||
), | ||
|
||
|
||
[_COLEMAK] = LAYOUT_rockon( | ||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, | ||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, | ||
KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, | ||
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, ADJUST, ADJUST, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, | ||
KC_MUTE, KC_LCTL, KC_LGUI, LOWER, KC_SPC, KC_LALT, KC_MS_BTN1, KC_MS_BTN2, KC_MS_BTN3, KC_RALT, KC_SPC, RAISE, KC_RGUI, KC_RCTL, KC_MUTE, | ||
KC_MUTE | ||
), | ||
|
||
|
||
[_LOWER] = LAYOUT_rockon( | ||
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______ | ||
), | ||
|
||
[_RAISE] = LAYOUT_rockon( | ||
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, | ||
_______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______ | ||
), | ||
|
||
[_ADJUST] = LAYOUT_rockon( | ||
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, | ||
_______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TG(_QWERTY), _______, _______, _______, _______, _______, KC_F11, KC_F12, _______, | ||
_______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TG(_COLEMAK), _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
_______ | ||
) | ||
}; | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
switch (keycode) { | ||
case LOWER: | ||
if (record->event.pressed) { | ||
layer_on(_LOWER); | ||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
} else { | ||
layer_off(_LOWER); | ||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
} | ||
return false; | ||
break; | ||
case RAISE: | ||
if (record->event.pressed) { | ||
layer_on(_RAISE); | ||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
} else { | ||
layer_off(_RAISE); | ||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | ||
} | ||
return false; | ||
break; | ||
case ADJUST: | ||
if (record->event.pressed) { | ||
layer_on(_ADJUST); | ||
} else { | ||
layer_off(_ADJUST); | ||
} | ||
return false; | ||
break; | ||
default: | ||
break; | ||
} | ||
|
||
return true; | ||
} |
2 changes: 2 additions & 0 deletions
2
keyboards/fingerpunch/rockon/v3/keymaps/sadekbaroudi/config.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
// #define FP_LAYER_LIGHTING_HUE_0 HSV_YELLOW | ||
// #define FP_LAYER_LIGHTING_HUE_4 HSV_BLUE |
Oops, something went wrong.