Skip to content

Commit

Permalink
[Keyboard] Add CherryB Studio Keyboards (#11475)
Browse files Browse the repository at this point in the history
Co-authored-by: Joel Challis <[email protected]>
Co-authored-by: Ryan <[email protected]>
Co-authored-by: James Young <[email protected]>
  • Loading branch information
4 people authored Apr 2, 2021
1 parent cd981ec commit 43d74d7
Show file tree
Hide file tree
Showing 10 changed files with 582 additions and 0 deletions.
14 changes: 14 additions & 0 deletions keyboards/cherrybstudio/cb87/cb87.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
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 "cb87.h"
73 changes: 73 additions & 0 deletions keyboards/cherrybstudio/cb87/cb87.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
/*
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_all( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K100, K101, K102, K103, K104, K105, \
K106, K107, K108, K109, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K300, K301, K302, \
K303, K304, K305, K306, K307, K308, K309, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, \
K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K600, K601, K602, K603, \
K604, K605, K606, K607, K608, K609, K700, K701, K702, K703, K704, K705, K706, K707, \
K708, K709, K800, K801, K802, K803, K804, K805, K806, K807, K808 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409 }, \
{ K500, K501, K502, K503, K504, K505, K506, K507, K508, K509 }, \
{ K600, K601, K602, K603, K604, K605, K606, K607, K608, K609 }, \
{ K700, K701, K702, K703, K704, K705, K706, K707, K708, K709 }, \
{ K800, K801, K802, K803, K804, K805, K806, K807, K808, KC_NO } \
}

#define LAYOUT_tkl_ansi( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K100, K101, K102, K103, K104, K105, \
K106, K107, K108, K109, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K300, K301, K302, \
K303, K304, K305, K306, K307, K308, K309, K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, \
K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K600, K601, K603, \
K604, K606, K607, K608, K609, K700, K701, K702, K703, K704, K705, K706, K707, \
K708, K709, K800, K801, K802, K803, K804, K805, K806, K807, K808 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309 }, \
{ K400, K401, K402, K403, K404, K405, K406, K407, K408, K409 }, \
{ K500, K501, K502, K503, K504, K505, K506, K507, K508, K509 }, \
{ K600, K601, KC_NO, K603, K604, KC_NO, K606, K607, K608, K609 }, \
{ K700, K701, K702, K703, K704, K705, K706, K707, K708, K709 }, \
{ K800, K801, K802, K803, K804, K805, K806, K807, K808, KC_NO } \
}

#define LAYOUT_tkl_iso( \
K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K100, K101, K102, K103, K104, K105, \
K106, K107, K108, K109, K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K300, K301, K302, \
K303, K304, K305, K306, K307, K308, K309, K400, K401, K402, K403, K404, K405, K407, K408, K409, \
K500, K501, K502, K503, K504, K505, K506, K507, K508, K509, K600, K601, K602, K603, \
K604, K605, K606, K607, K608, K609, K700, K701, K702, K703, K704, K705, K706, K707, \
K708, K709, K800, K801, K802, K803, K804, K805, K806, K807, K808 \
) { \
{ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009 }, \
{ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109 }, \
{ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209 }, \
{ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309 }, \
{ K400, K401, K402, K403, K404, K405, KC_NO, K407, K408, K409 }, \
{ K500, K501, K502, K503, K504, K505, K506, K507, K508, K509 }, \
{ K600, K601, K602, K603, K604, K605, K606, K607, K608, K609 }, \
{ K700, K701, K702, K703, K704, K705, K706, K707, K708, K709 }, \
{ K800, K801, K802, K803, K804, K805, K806, K807, K808, KC_NO } \
}
63 changes: 63 additions & 0 deletions keyboards/cherrybstudio/cb87/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
/*
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 0x4342 // CB
#define PRODUCT_ID 0x8787
#define DEVICE_VER 0x0001
#define MANUFACTURER CherryB Studio
#define PRODUCT CB87

/* key matrix size */
#define MATRIX_ROWS 9
#define MATRIX_COLS 10

/*
* Keyboard Matrix Assignments
*
* Change this to how you wired your keyboard
* COLS: AVR pins used for columns, left to right
* ROWS: AVR pins used for rows, top to bottom
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode)
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode)
*
* 0 1 2 3 4 5 6 7 8 9
*/
#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3 }
#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, F5, C6, C7, F7 }
//#define UNUSED_PINS

/* COL2ROW, ROW2COL*/
#define DIODE_DIRECTION COL2ROW
#define BACKLIGHT_PIN B6
#ifdef BACKLIGHT_PIN
#define BACKLIGHT_LEVELS 3
#endif

#define LED_CAPS_LOCK_PIN F0

/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5

#define RGB_DI_PIN E6
#ifdef RGB_DI_PIN
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 22 /* 16 Bottom 6 top*/
#define RGBLIGHT_HUE_STEP 8
#define RGBLIGHT_SAT_STEP 8
#define RGBLIGHT_VAL_STEP 8
#endif
Loading

0 comments on commit 43d74d7

Please sign in to comment.