Skip to content

Commit

Permalink
Add Cerberus to QMK (#24226)
Browse files Browse the repository at this point in the history
* Add Cerberus to QMK

* Update readme to add hotswap callouts

* Update readme formatting

* Use format json to update keyboard.json formatting

* Split Cerberus HS and Solderable into separate folders

* Update JSON formatting

* make solderable keymaps a bit more useful

* Backlight fix on solderable

* Update keyboards/cannonkeys/cerberus/hotswap/keyboard.json

Co-authored-by: jack <[email protected]>

* Remove cerberus VIA keymaps

* Apply suggestions from code review

Change some whitespace

Co-authored-by: Drashna Jaelre <[email protected]>

* Add RGB control keycodes to cerberus keymap

* Add backlight controls to default keymap on solderable version

* Update keyboards/cannonkeys/cerberus/readme.md

---------

Co-authored-by: jack <[email protected]>
Co-authored-by: Drashna Jaelre <[email protected]>
  • Loading branch information
3 people authored Dec 5, 2024
1 parent 3c324cb commit d76f7bf
Show file tree
Hide file tree
Showing 15 changed files with 1,233 additions and 0 deletions.
9 changes: 9 additions & 0 deletions keyboards/cannonkeys/cerberus/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define WS2812_SPI_DRIVER SPID2
#define WS2812_SPI_MOSI_PAL_MODE 0
#define WS2812_SPI_SCK_PAL_MODE 0
#define WS2812_SPI_SCK_PIN B13
9 changes: 9 additions & 0 deletions keyboards/cannonkeys/cerberus/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define HAL_USE_SPI TRUE

#include_next <halconf.h>

311 changes: 311 additions & 0 deletions keyboards/cannonkeys/cerberus/hotswap/keyboard.json

Large diffs are not rendered by default.

26 changes: 26 additions & 0 deletions keyboards/cannonkeys/cerberus/hotswap/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H
enum layer_names {
_BASE,
_FN1,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_BASE] = LAYOUT_all(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_INS, KC_HOME, KC_PGUP,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), KC_UP,
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_LGUI, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT
),

[_FN1] = LAYOUT_all(
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_PSCR, KC_SCRL, KC_PAUS,
UG_TOGG, UG_HUEU, UG_SATU, UG_VALU, UG_SPDU, 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, UG_HUED, UG_SATD, UG_VALD, UG_SPDD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
KC_TRNS, UG_PREV, UG_NEXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
QK_BOOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
),
};
2 changes: 2 additions & 0 deletions keyboards/cannonkeys/cerberus/hotswap/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF
50 changes: 50 additions & 0 deletions keyboards/cannonkeys/cerberus/info.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{
"manufacturer": "CannonKeys",
"maintainer": "awkannan",
"bootloader": "stm32-dfu",
"diode_direction": "COL2ROW",
"features": {
"bootmagic": true,
"command": true,
"console": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"rgblight": true
},
"matrix_pins": {
"cols": ["B0", "C15", "C14", "A7", "A5", "C13", "A4", "A2", "A1", "A0", "B9", "B8", "B7", "A3", "B6", "B4", "B3", "A15"],
"rows": ["B11", "B10", "B2", "F0", "B5"]
},
"processor": "STM32F072",
"qmk": {
"locking": {
"enabled": true,
"resync": true
}
},
"rgblight": {
"animations": {
"alternating": true,
"breathing": true,
"christmas": true,
"knight": true,
"rainbow_mood": true,
"rainbow_swirl": true,
"rgb_test": true,
"snake": true,
"static_gradient": true,
"twinkle": true
},
"led_count": 4
},
"url": "https://cannonkeys.com",
"usb": {
"device_version": "0.0.1",
"vid": "0xCA04"
},
"ws2812": {
"driver": "spi",
"pin": "B15"
}
}
9 changes: 9 additions & 0 deletions keyboards/cannonkeys/cerberus/mcuconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#include_next <mcuconf.h>

#undef STM32_SPI_USE_SPI2
#define STM32_SPI_USE_SPI2 TRUE
28 changes: 28 additions & 0 deletions keyboards/cannonkeys/cerberus/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Cerberus Keyboard by CannonKeys

This folder contains firmware for both the Solderable and Hotswap version of Cerberus

The hotswap PCB does not support per-key LEDs and has reduced layout support (no ISO)

* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan)
* Hardware Supported: STM32F072CBT6

Make example for this keyboard (after setting up your build environment):

make cannonkeys/cerberus/hotswap:default
make cannonkeys/cerberus/solderable:default

Flashing example for this keyboard:

make cannonkeys/cerberus/hotswap:default:flash
make cannonkeys/cerberus/solderable:default:flash

See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).

## Bootloader

Enter the bootloader in 3 ways:

* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (usually the top left key or Escape) and plug in the keyboard
* **Physical reset button**: Toggle the switch on the back of the pcb to "1" and briefly press the button on the back of the PCB
* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available
8 changes: 8 additions & 0 deletions keyboards/cannonkeys/cerberus/solderable/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later

#pragma once

#define BACKLIGHT_PWM_DRIVER PWMD3
#define BACKLIGHT_PWM_CHANNEL 1
#define BACKLIGHT_PAL_MODE 1
10 changes: 10 additions & 0 deletions keyboards/cannonkeys/cerberus/solderable/halconf.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Copyright 2024 Andrew Kannan
// SPDX-License-Identifier: GPL-2.0-or-later


#pragma once

#define HAL_USE_PWM TRUE

#include_next <halconf.h>

Loading

0 comments on commit d76f7bf

Please sign in to comment.