-
-
Notifications
You must be signed in to change notification settings - Fork 39.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Keyboard] SharkPCB release Beta compatibility (#16713)
Co-authored-by: Drashna Jaelre <drashna@live.com> Co-authored-by: Ryan <fauxpark@gmail.com>
- Loading branch information
1 parent
fdd4af9
commit 5fe3b9f
Showing
24 changed files
with
712 additions
and
59 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/* Copyright 2019 Álvaro "Gondolindrim" Volpato | ||
* | ||
* 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/>. | ||
*/ | ||
#include "alpha.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,39 @@ | ||
/* Copyright 2019 Álvaro "Gondolindrim" Volpato | ||
* | ||
* 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 | ||
|
||
#include "quantum.h" | ||
|
||
/* This a shortcut to help you visually see your layout. | ||
* | ||
* The first section contains all of the arguments representing the physical | ||
* layout of the board and position of the keys. | ||
* | ||
* The second converts the arguments into a two-dimensional array which | ||
* represents the switch matrix. | ||
*/ | ||
#define LAYOUT_ortho_4x12( \ | ||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ | ||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ | ||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ | ||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ | ||
) \ | ||
{ \ | ||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ | ||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ | ||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ | ||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,32 @@ | ||
/* Copyright 2020 Gondolindrim | ||
* | ||
* 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/>. | ||
*/ | ||
|
||
#include "beta.h" | ||
void board_init(void) { | ||
setPinInput(B6); | ||
setPinInput(B7); | ||
} | ||
|
||
#ifdef ENCODER_ENABLE | ||
bool encoder_update_kb(uint8_t index, bool clockwise) { | ||
if(!encoder_update_user(index, clockwise)) return false; | ||
if (index == 0) { | ||
if (clockwise) tap_code_delay(KC_VOLU, 10); | ||
else tap_code_delay(KC_VOLD, 10); | ||
} | ||
return true; | ||
} | ||
#endif |
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,31 @@ | ||
/* Copyright 2020 Gondolindrim | ||
* | ||
* 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 | ||
#include "quantum.h" | ||
|
||
#define LAYOUT_ortho_4x12( \ | ||
K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ | ||
K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ | ||
K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ | ||
K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ | ||
)\ | ||
{\ | ||
{ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ | ||
{ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B }, \ | ||
{ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ | ||
{ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B } \ | ||
} |
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,25 @@ | ||
/* 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/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define CH_CFG_ST_FREQUENCY 10000 | ||
|
||
#define CH_CFG_OPTIMIZE_SPEED FALSE | ||
|
||
#define CH_CFG_USE_CONDVARS_TIMEOUT FALSE | ||
|
||
#include_next <chconf.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,66 @@ | ||
/* | ||
Copyright 2020 Gondolindrim | ||
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 | ||
|
||
#include "config_common.h" | ||
|
||
/* USB Device descriptor parameter */ | ||
#define VENDOR_ID 0xAC11 | ||
#define PRODUCT_ID 0x5369 // For Shark+1 | ||
#define DEVICE_VER 0x0002 | ||
#define MANUFACTURER AcheronProject | ||
#define PRODUCT SharkPCB rev. Beta | ||
|
||
#define MATRIX_ROWS 4 | ||
#define MATRIX_COLS 12 | ||
|
||
#define MATRIX_COL_PINS { A5 , A10, C13, B9 , B8 , B5 , B4 , B3 , A15, A0 , A1 , A2 } | ||
#define MATRIX_ROW_PINS { A8 , B14, A4 , A3 } | ||
#define DIODE_DIRECTION COL2ROW | ||
|
||
#define DEBOUNCE 5 | ||
|
||
#define LOCKING_SUPPORT_ENABLE | ||
#define LOCKING_RESYNC_ENABLE | ||
|
||
#define BACKLIGHT_PIN A6 | ||
#define BACKLIGHT_PWM_DRIVER PWMD3 | ||
#define BACKLIGHT_PWM_CHANNEL 1 | ||
#define BACKLIGHT_PAL_MODE 2 | ||
#define BACKLIGHT_LEVELS 20 | ||
#define BACKLIGHT_BREATHING | ||
#define BREATHING_PERIOD 5 | ||
#define BACKLIGHT_ON_STATE 1 | ||
|
||
#define STM32_HSECLK 8000000 | ||
|
||
#define RGB_DI_PIN B15 | ||
#define RGBLED_NUM 24 | ||
#define RGBLIGHT_ANIMATIONS | ||
|
||
#define WS2812_PWM_COMPLEMENTARY_OUTPUT | ||
#define WS2812_PWM_DRIVER PWMD1 | ||
#define WS2812_PWM_CHANNEL 3 | ||
#define WS2812_PWM_PAL_MODE 1 | ||
#define WS2812_DMA_STREAM STM32_DMA2_STREAM5 | ||
#define WS2812_DMA_CHANNEL 6 | ||
|
||
#define ENCODERS_PAD_A { C15 } | ||
#define ENCODERS_PAD_B { C14 } | ||
|
||
#define EEPROM_I2C_24LC256 |
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,24 @@ | ||
/* 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/>. | ||
*/ | ||
|
||
#pragma once | ||
|
||
#define HAL_USE_PWM TRUE | ||
#define HAL_USE_PAL TRUE | ||
|
||
#define HAL_USE_I2C TRUE | ||
|
||
#include_next <halconf.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,43 @@ | ||
/* Copyright 2019 | ||
* | ||
* 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/>. | ||
*/ | ||
#include QMK_KEYBOARD_H | ||
|
||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[0] = LAYOUT_ortho_4x12( | ||
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_BSPC, | ||
KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , KC_QUOT, | ||
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM , KC_DOT , KC_SLSH , KC_ENT , | ||
KC_LCTL , KC_LALT , KC_LGUI , KC_NO , MO(1) , KC_SPC , KC_SPC , MO(2) , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT | ||
), | ||
[1] = LAYOUT_ortho_4x12( | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS | ||
), | ||
[2] = LAYOUT_ortho_4x12( | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS | ||
), | ||
[3] = LAYOUT_ortho_4x12( | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , | ||
KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS , KC_TRNS | ||
) | ||
}; |
Oops, something went wrong.