Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cerberus to QMK #24226

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
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
fauxpark marked this conversation as resolved.
Show resolved Hide resolved
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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"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
22 changes: 22 additions & 0 deletions keyboards/cannonkeys/cerberus/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# 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:solderable:default

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