Co-authored-by: Ryan <fauxpark@gmail.com> Co-authored-by: Nick Brassel <nick@tzarc.org>post_sat75_updates
@ -0,0 +1,101 @@ | |||
// Copyright 2023 Andrew Kannan | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
#include "quantum.h" | |||
#include "via.h" // only for EEPROM address | |||
#include "satisfaction_keycodes.h" | |||
#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR) | |||
#define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1) | |||
#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) | |||
enum s75_keyboard_value_id { | |||
id_encoder_modes = 1, | |||
id_oled_default_mode, | |||
id_encoder_custom, | |||
id_oled_mode | |||
}; | |||
enum encoder_modes { | |||
ENC_MODE_VOLUME, | |||
ENC_MODE_MEDIA, | |||
ENC_MODE_SCROLL, | |||
ENC_MODE_BRIGHTNESS, | |||
ENC_MODE_BACKLIGHT, | |||
ENC_MODE_CUSTOM0, | |||
ENC_MODE_CUSTOM1, | |||
ENC_MODE_CUSTOM2, | |||
_NUM_ENCODER_MODES, | |||
ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES | |||
}; | |||
enum custom_encoder_behavior { | |||
ENC_CUSTOM_CW = 0, | |||
ENC_CUSTOM_CCW, | |||
ENC_CUSTOM_PRESS | |||
}; | |||
enum oled_modes { | |||
OLED_DEFAULT, | |||
OLED_TIME, | |||
OLED_OFF, | |||
_NUM_OLED_MODES | |||
}; | |||
// Keyboard Information | |||
extern volatile uint8_t led_numlock; | |||
extern volatile uint8_t led_capslock; | |||
extern volatile uint8_t led_scrolllock; | |||
extern uint8_t layer; | |||
// OLED Behavior | |||
extern uint8_t oled_mode; | |||
extern bool oled_repaint_requested; | |||
extern bool oled_wakeup_requested; | |||
extern uint32_t oled_sleep_timer; | |||
// Encoder Behavior | |||
extern uint8_t encoder_value; | |||
extern uint8_t encoder_mode; | |||
extern uint8_t enabled_encoder_modes; | |||
// RTC | |||
extern RTCDateTime last_timespec; | |||
extern uint16_t last_minute; | |||
// RTC Configuration | |||
extern bool clock_set_mode; | |||
extern uint8_t time_config_idx; | |||
extern int8_t hour_config; | |||
extern int16_t minute_config; | |||
extern int8_t year_config; | |||
extern int8_t month_config; | |||
extern int8_t day_config; | |||
extern uint8_t previous_encoder_mode; | |||
// Backlighting | |||
#ifdef BACKLIGHT_ENABLE | |||
extern backlight_config_t kb_backlight_config; | |||
extern bool kb_backlight_breathing; | |||
#endif | |||
void pre_encoder_mode_change(void); | |||
void post_encoder_mode_change(void); | |||
void change_encoder_mode(bool negative); | |||
uint16_t handle_encoder_clockwise(void); | |||
uint16_t handle_encoder_ccw(void); | |||
uint16_t handle_encoder_press(void); | |||
uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior); | |||
void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code); | |||
void update_time_config(int8_t increment); | |||
void oled_request_wakeup(void); | |||
void oled_request_repaint(void); | |||
bool oled_task_needs_to_repaint(void); | |||
void custom_config_load(void); |
@ -0,0 +1,10 @@ | |||
// Copyright 2023 Andrew Kannan | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
enum my_keycodes { | |||
ENC_PRESS = QK_KB_0, | |||
CLOCK_SET, | |||
OLED_TOGG | |||
}; |
@ -1,27 +1,28 @@ | |||
{ | |||
"keyboard_name": "Satisfaction75", | |||
"manufacturer": "CannonKeys", | |||
"url": "", | |||
"maintainer": "Cannon Keys", | |||
"usb": { | |||
"vid": "0xCA04", | |||
"pid": "0x57F5", | |||
"device_version": "0.0.1" | |||
}, | |||
"matrix_pins": { | |||
"cols": ["B1", "B2", "B10", "B11", "B12", "B13", "B14", "A8", "A9", "A10", "B0", "A7", "A5", "B5", "A15", "A1"], | |||
"rows": ["B3", "B4", "A0", "A2", "A4", "A3"] | |||
}, | |||
"diode_direction": "COL2ROW", | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "B9", "pin_b": "B8", "resolution": 2} | |||
] | |||
}, | |||
"keyboard_name": "Satisfaction75", | |||
"maintainer": "awkannan", | |||
"backlight": { | |||
"breathing": true, | |||
"breathing_period": 6, | |||
"levels": 24, | |||
"breathing": true | |||
"pin": "A6" | |||
}, | |||
"bootloader": "stm32-dfu", | |||
"features": { | |||
"backlight": true, | |||
"bootmagic": true, | |||
"command": false, | |||
"console": false, | |||
"encoder": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true, | |||
"oled": true | |||
}, | |||
"processor": "STM32F072", | |||
"bootloader": "stm32-dfu" | |||
} | |||
"url": "https://cannonkeys.com", | |||
"usb": { | |||
"vid": "0xCA04" | |||
} | |||
} |
@ -1 +0,0 @@ | |||
QWIIC_ENABLE = no |
@ -1,256 +0,0 @@ | |||
/* | |||
Copyright 2012 Jun Wako <wakojun@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/>. | |||
*/ | |||
#include <hal.h> | |||
#include "led_custom.h" | |||
#include "satisfaction75.h" | |||
#define BREATHING_PERIOD 6 | |||
static void breathing_callback(PWMDriver *pwmp); | |||
static PWMConfig pwmCFG = { | |||
0xFFFF, /* PWM clock frequency */ | |||
256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ | |||
NULL, /* No Callback */ | |||
{ | |||
{PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ | |||
{PWM_OUTPUT_DISABLED, NULL}, | |||
{PWM_OUTPUT_DISABLED, NULL}, | |||
{PWM_OUTPUT_DISABLED, NULL} | |||
}, | |||
0, /* HW dependent part.*/ | |||
0 | |||
}; | |||
static PWMConfig pwmCFG_breathing = { | |||
0xFFFF, /* 10kHz PWM clock frequency */ | |||
256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ | |||
breathing_callback, /* Breathing Callback */ | |||
{ | |||
{PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ | |||
{PWM_OUTPUT_DISABLED, NULL}, | |||
{PWM_OUTPUT_DISABLED, NULL}, | |||
{PWM_OUTPUT_DISABLED, NULL} | |||
}, | |||
0, /* HW dependent part.*/ | |||
0 | |||
}; | |||
// See http://jared.geek.nz/2013/feb/linear-led-pwm | |||
static uint16_t cie_lightness(uint16_t v) { | |||
if (v <= 5243) // if below 8% of max | |||
return v / 9; // same as dividing by 900% | |||
else { | |||
uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare | |||
// to get a useful result with integer division, we shift left in the expression above | |||
// and revert what we've done again after squaring. | |||
y = y * y * y >> 8; | |||
if (y > 0xFFFFUL) // prevent overflow | |||
return 0xFFFFU; | |||
else | |||
return (uint16_t) y; | |||
} | |||
} | |||
void backlight_init_ports(void) { | |||
palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); | |||
pwmStart(&PWMD3, &pwmCFG); | |||
if(kb_backlight_config.enable){ | |||
if(kb_backlight_config.breathing){ | |||
breathing_enable(); | |||
} else{ | |||
backlight_set(kb_backlight_config.level); | |||
} | |||
} else { | |||
backlight_set(0); | |||
} | |||
} | |||
void suspend_power_down_user(void) { | |||
backlight_set(0); | |||
} | |||
void suspend_wakeup_init_user(void) { | |||
if(kb_backlight_config.enable){ | |||
if(kb_backlight_config.breathing){ | |||
breathing_enable(); | |||
} else{ | |||
backlight_set(kb_backlight_config.level); | |||
} | |||
} else { | |||
backlight_set(0); | |||
} | |||
} | |||
void backlight_set(uint8_t level) { | |||
uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); | |||
if (level == 0) { | |||
// Turn backlight off | |||
pwmDisableChannel(&PWMD3, 0); | |||
} else { | |||
// Turn backlight on | |||
if(!is_breathing()){ | |||
pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); | |||
} | |||
} | |||
} | |||
uint8_t backlight_tick = 0; | |||
void backlight_task(void) { | |||
} | |||
#define BREATHING_NO_HALT 0 | |||
#define BREATHING_HALT_OFF 1 | |||
#define BREATHING_HALT_ON 2 | |||
#define BREATHING_STEPS 128 | |||
static uint8_t breathing_period = BREATHING_PERIOD; | |||
static uint8_t breathing_halt = BREATHING_NO_HALT; | |||
static uint16_t breathing_counter = 0; | |||
bool is_breathing(void) { | |||
return PWMD3.config == &pwmCFG_breathing; | |||
} | |||
#define breathing_min() do {breathing_counter = 0;} while (0) | |||
#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) | |||
void breathing_interrupt_enable(void){ | |||
pwmStop(&PWMD3); | |||
pwmStart(&PWMD3, &pwmCFG_breathing); | |||
chSysLockFromISR(); | |||
pwmEnablePeriodicNotification(&PWMD3); | |||
pwmEnableChannelI( | |||
&PWMD3, | |||
0, | |||
PWM_FRACTION_TO_WIDTH( | |||
&PWMD3, | |||
0xFFFF, | |||
0xFFFF | |||
) | |||
); | |||
chSysUnlockFromISR(); | |||
} | |||
void breathing_interrupt_disable(void){ | |||
pwmStop(&PWMD3); | |||
pwmStart(&PWMD3, &pwmCFG); | |||
} | |||
void breathing_enable(void) | |||
{ | |||
breathing_counter = 0; | |||
breathing_halt = BREATHING_NO_HALT; | |||
breathing_interrupt_enable(); | |||
} | |||
void breathing_pulse(void) | |||
{ | |||
if (kb_backlight_config.level == 0) | |||
breathing_min(); | |||
else | |||
breathing_max(); | |||
breathing_halt = BREATHING_HALT_ON; | |||
breathing_interrupt_enable(); | |||
} | |||
void breathing_disable(void) | |||
{ | |||
breathing_interrupt_disable(); | |||
// Restore backlight level | |||
backlight_set(kb_backlight_config.level); | |||
} | |||
void breathing_self_disable(void) | |||
{ | |||
if (kb_backlight_config.level == 0) | |||
breathing_halt = BREATHING_HALT_OFF; | |||
else | |||
breathing_halt = BREATHING_HALT_ON; | |||
} | |||
void breathing_toggle(void) { | |||
if (is_breathing()){ | |||
breathing_disable(); | |||
} else { | |||
breathing_enable(); | |||
} | |||
} | |||
void breathing_period_set(uint8_t value) | |||
{ | |||
if (!value) | |||
value = 1; | |||
breathing_period = value; | |||
} | |||
void breathing_period_default(void) { | |||
breathing_period_set(BREATHING_PERIOD); | |||
} | |||
void breathing_period_inc(void) | |||
{ | |||
breathing_period_set(breathing_period+1); | |||
} | |||
void breathing_period_dec(void) | |||
{ | |||
breathing_period_set(breathing_period-1); | |||
} | |||
/* To generate breathing curve in python: | |||
* from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] | |||
*/ | |||
static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; | |||
// Use this before the cie_lightness function. | |||
static inline uint16_t scale_backlight(uint16_t v) { | |||
return v / BACKLIGHT_LEVELS * kb_backlight_config.level; | |||
} | |||
static void breathing_callback(PWMDriver *pwmp) | |||
{ | |||
(void)pwmp; | |||
uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; | |||
// resetting after one period to prevent ugly reset at overflow. | |||
breathing_counter = (breathing_counter + 1) % (breathing_period * 256); | |||
uint8_t index = breathing_counter / interval % BREATHING_STEPS; | |||
if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || | |||
((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) | |||
{ | |||
breathing_interrupt_disable(); | |||
} | |||
uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); | |||
chSysLockFromISR(); | |||
pwmEnableChannelI( | |||
&PWMD3, | |||
0, | |||
PWM_FRACTION_TO_WIDTH( | |||
&PWMD3, | |||
0xFFFF, | |||
duty | |||
) | |||
); | |||
chSysUnlockFromISR(); | |||
} |
@ -1,7 +0,0 @@ | |||
#pragma once | |||
void backlight_task(void); | |||
void breathing_interrupt_disable(void); | |||
void breathing_interrupt_enable(void); | |||
void breathing_enable(void); | |||
void breathing_disable(void); |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,3 @@ | |||
#pragma once | |||
#define ENCODER_RESOLUTION 2 |
@ -0,0 +1,37 @@ | |||
/* | |||
Copyright 2019 Boy_314 | |||
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 keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_2x2( | |||
KC_ESC, 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_GRV, 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_NO, ENC_PRESS, | |||
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_HOME, | |||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_END, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_DEL, | |||
KC_LCTL, KC_LALT, KC_SPC, KC_LGUI, MO(1), KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_2x2( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
NK_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______, _______, QK_BOOT, CLOCK_SET, | |||
KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, | |||
_______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT | |||
) | |||
}; |
@ -0,0 +1,3 @@ | |||
# Boy_314's Satisfaction75 Layout | |||
This is Boy_314's Satisfaction75 Layout. It can be used on VIA. It features a QWERTY layout on the base, along with missing TKL keys on layer 1. Right side 3 keys from top down are: Home, End, Delete. The encoder resolution has been reduced from the default of 4 down to 2 so that it no longer needs to click twice, but now only once, before triggering an action. |
@ -0,0 +1,3 @@ | |||
# rules.mk overrides to enable VIA | |||
VIA_ENABLE = yes |
@ -0,0 +1,23 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, 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_GRV, 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_DEL, ENC_PRESS, | |||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENTER, KC_PGUP, | |||
KC_LSFT, KC_BSLS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1 @@ | |||
OLED_ENABLE = no |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -0,0 +1,193 @@ | |||
{ | |||
"diode_direction": "COL2ROW", | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "B9", "pin_b": "B8"} | |||
] | |||
}, | |||
"indicators": { | |||
"caps_lock": "B14", | |||
"on_state": 0 | |||
}, | |||
"matrix_pins": { | |||
"cols": ["A10", "A9", "A8", "B12", "B11", "B10", "B2", "B1", "B0", "A7", "A5", "A4", "A3", "A2", "B3"], | |||
"rows": ["A13", "A14", "A15", "B4", "B5", "C13"] | |||
}, | |||
"usb": { | |||
"device_version": "0.0.2", | |||
"pid": "0x001A" | |||
}, | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, | |||
{"label": "F1", "matrix": [0, 2], "x": 1.5, "y": 0}, | |||
{"label": "F2", "matrix": [0, 3], "x": 2.5, "y": 0}, | |||
{"label": "F3", "matrix": [0, 4], "x": 3.5, "y": 0}, | |||
{"label": "F4", "matrix": [0, 5], "x": 4.5, "y": 0}, | |||
{"label": "F5", "matrix": [0, 6], "x": 5.75, "y": 0}, | |||
{"label": "F6", "matrix": [0, 7], "x": 6.75, "y": 0}, | |||
{"label": "F7", "matrix": [0, 8], "x": 7.75, "y": 0}, | |||
{"label": "F8", "matrix": [0, 9], "x": 8.75, "y": 0}, | |||
{"label": "F9", "matrix": [0, 10], "x": 10, "y": 0}, | |||
{"label": "F10", "matrix": [0, 11], "x": 11, "y": 0}, | |||
{"label": "F11", "matrix": [0, 12], "x": 12, "y": 0}, | |||
{"label": "F12", "matrix": [0, 13], "x": 13, "y": 0}, | |||
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1.25}, | |||
{"label": "!", "matrix": [1, 1], "x": 1, "y": 1.25}, | |||
{"label": "@", "matrix": [1, 2], "x": 2, "y": 1.25}, | |||
{"label": "#", "matrix": [1, 3], "x": 3, "y": 1.25}, | |||
{"label": "$", "matrix": [1, 4], "x": 4, "y": 1.25}, | |||
{"label": "%", "matrix": [1, 5], "x": 5, "y": 1.25}, | |||
{"label": "^", "matrix": [1, 6], "x": 6, "y": 1.25}, | |||
{"label": "&", "matrix": [1, 7], "x": 7, "y": 1.25}, | |||
{"label": "*", "matrix": [1, 8], "x": 8, "y": 1.25}, | |||
{"label": "(", "matrix": [1, 9], "x": 9, "y": 1.25}, | |||
{"label": ")", "matrix": [1, 10], "x": 10, "y": 1.25}, | |||
{"label": "_", "matrix": [1, 11], "x": 11, "y": 1.25}, | |||
{"label": "+", "matrix": [1, 12], "x": 12, "y": 1.25}, | |||
{"label": "Bksp", "matrix": [1, 13], "x": 13, "y": 1.25}, | |||
{"label": "Del", "matrix": [0, 14], "x": 14, "y": 1.25}, | |||
{"label": "EncPress", "matrix": [1, 14], "x": 15.5, "y": 0.75}, | |||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, | |||
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.25}, | |||
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.25}, | |||
{"label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.25}, | |||
{"label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.25}, | |||
{"label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.25}, | |||
{"label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.25}, | |||
{"label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.25}, | |||
{"label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.25}, | |||
{"label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.25}, | |||
{"label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.25}, | |||
{"label": "{", "matrix": [2, 11], "x": 11.5, "y": 2.25}, | |||
{"label": "}", "matrix": [2, 12], "x": 12.5, "y": 2.25}, | |||
{"label": "|", "matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5}, | |||
{"label": "Del", "matrix": [2, 14], "x": 15.5, "y": 2.25}, | |||
{"label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, | |||
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.25}, | |||
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.25}, | |||
{"label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.25}, | |||
{"label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.25}, | |||
{"label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.25}, | |||
{"label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.25}, | |||
{"label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.25}, | |||
{"label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.25}, | |||
{"label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.25}, | |||
{"label": ":", "matrix": [3, 10], "x": 10.75, "y": 3.25}, | |||
{"label": "\"", "matrix": [3, 11], "x": 11.75, "y": 3.25}, | |||
{"label": "Enter", "matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25}, | |||
{"label": "PgUp", "matrix": [3, 14], "x": 15.5, "y": 3.25}, | |||
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, | |||
{"label": "|", "matrix": [4, 1], "x": 1.25, "y": 4.25}, | |||
{"label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.25}, | |||
{"label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.25}, | |||
{"label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.25}, | |||
{"label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.25}, | |||
{"label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.25}, | |||
{"label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.25}, | |||
{"label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.25}, | |||
{"label": "<", "matrix": [4, 9], "x": 9.25, "y": 4.25}, | |||
{"label": ">", "matrix": [4, 10], "x": 10.25, "y": 4.25}, | |||
{"label": "?", "matrix": [4, 11], "x": 11.25, "y": 4.25}, | |||
{"label": "Shift", "matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, | |||
{"label": "Up", "matrix": [4, 13], "x": 14.25, "y": 4.5}, | |||
{"label": "PgDn", "matrix": [4, 14], "x": 15.5, "y": 4.25}, | |||
{"label": "Ctrl", "matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, | |||
{"label": "Win", "matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, | |||
{"label": "Alt", "matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, | |||
{"label": "Alt", "matrix": [5, 9], "x": 10, "y": 5.25}, | |||
{"label": "Fn", "matrix": [5, 10], "x": 11, "y": 5.25}, | |||
{"label": "Ctrl", "matrix": [5, 11], "x": 12, "y": 5.25}, | |||
{"label": "Left", "matrix": [5, 12], "x": 13.25, "y": 5.5}, | |||
{"label": "Down", "matrix": [5, 13], "x": 14.25, "y": 5.5}, | |||
{"label": "Right", "matrix": [5, 14], "x": 15.25, "y": 5.5} | |||
] | |||
}, | |||
"LAYOUT_iso_split_bs_7u": { | |||
"layout": [ | |||
{"label": "Esc", "matrix": [0, 0], "x": 0, "y": 0}, | |||
{"label": "F1", "matrix": [0, 2], "x": 1.5, "y": 0}, | |||
{"label": "F2", "matrix": [0, 3], "x": 2.5, "y": 0}, | |||
{"label": "F3", "matrix": [0, 4], "x": 3.5, "y": 0}, | |||
{"label": "F4", "matrix": [0, 5], "x": 4.5, "y": 0}, | |||
{"label": "F5", "matrix": [0, 6], "x": 5.75, "y": 0}, | |||
{"label": "F6", "matrix": [0, 7], "x": 6.75, "y": 0}, | |||
{"label": "F7", "matrix": [0, 8], "x": 7.75, "y": 0}, | |||
{"label": "F8", "matrix": [0, 9], "x": 8.75, "y": 0}, | |||
{"label": "F9", "matrix": [0, 10], "x": 10, "y": 0}, | |||
{"label": "F10", "matrix": [0, 11], "x": 11, "y": 0}, | |||
{"label": "F11", "matrix": [0, 12], "x": 12, "y": 0}, | |||
{"label": "F12", "matrix": [0, 13], "x": 13, "y": 0}, | |||
{"label": "~", "matrix": [1, 0], "x": 0, "y": 1.25}, | |||
{"label": "!", "matrix": [1, 1], "x": 1, "y": 1.25}, | |||
{"label": "@", "matrix": [1, 2], "x": 2, "y": 1.25}, | |||
{"label": "#", "matrix": [1, 3], "x": 3, "y": 1.25}, | |||
{"label": "$", "matrix": [1, 4], "x": 4, "y": 1.25}, | |||
{"label": "%", "matrix": [1, 5], "x": 5, "y": 1.25}, | |||
{"label": "^", "matrix": [1, 6], "x": 6, "y": 1.25}, | |||
{"label": "&", "matrix": [1, 7], "x": 7, "y": 1.25}, | |||
{"label": "*", "matrix": [1, 8], "x": 8, "y": 1.25}, | |||
{"label": "(", "matrix": [1, 9], "x": 9, "y": 1.25}, | |||
{"label": ")", "matrix": [1, 10], "x": 10, "y": 1.25}, | |||
{"label": "_", "matrix": [1, 11], "x": 11, "y": 1.25}, | |||
{"label": "+", "matrix": [1, 12], "x": 12, "y": 1.25}, | |||
{"label": "Bksp", "matrix": [1, 13], "x": 13, "y": 1.25}, | |||
{"label": "Del", "matrix": [0, 14], "x": 14, "y": 1.25}, | |||
{"label": "Tab", "matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, | |||
{"label": "Q", "matrix": [2, 1], "x": 1.5, "y": 2.25}, | |||
{"label": "W", "matrix": [2, 2], "x": 2.5, "y": 2.25}, | |||
{"label": "E", "matrix": [2, 3], "x": 3.5, "y": 2.25}, | |||
{"label": "R", "matrix": [2, 4], "x": 4.5, "y": 2.25}, | |||
{"label": "T", "matrix": [2, 5], "x": 5.5, "y": 2.25}, | |||
{"label": "Y", "matrix": [2, 6], "x": 6.5, "y": 2.25}, | |||
{"label": "U", "matrix": [2, 7], "x": 7.5, "y": 2.25}, | |||
{"label": "I", "matrix": [2, 8], "x": 8.5, "y": 2.25}, | |||
{"label": "O", "matrix": [2, 9], "x": 9.5, "y": 2.25}, | |||
{"label": "P", "matrix": [2, 10], "x": 10.5, "y": 2.25}, | |||
{"label": "{", "matrix": [2, 11], "x": 11.5, "y": 2.25}, | |||
{"label": "}", "matrix": [2, 12], "x": 12.5, "y": 2.25}, | |||
{"matrix": [3, 13], "x": 13.75, "y": 2.25, "w": 1.25, "h": 2}, | |||
{"label": "Del", "matrix": [2, 14], "x": 15.5, "y": 2.25}, | |||
{"label": "Caps Lock", "matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, | |||
{"label": "A", "matrix": [3, 1], "x": 1.75, "y": 3.25}, | |||
{"label": "S", "matrix": [3, 2], "x": 2.75, "y": 3.25}, | |||
{"label": "D", "matrix": [3, 3], "x": 3.75, "y": 3.25}, | |||
{"label": "F", "matrix": [3, 4], "x": 4.75, "y": 3.25}, | |||
{"label": "G", "matrix": [3, 5], "x": 5.75, "y": 3.25}, | |||
{"label": "H", "matrix": [3, 6], "x": 6.75, "y": 3.25}, | |||
{"label": "J", "matrix": [3, 7], "x": 7.75, "y": 3.25}, | |||
{"label": "K", "matrix": [3, 8], "x": 8.75, "y": 3.25}, | |||
{"label": "L", "matrix": [3, 9], "x": 9.75, "y": 3.25}, | |||
{"label": ":", "matrix": [3, 10], "x": 10.75, "y": 3.25}, | |||
{"label": "\"", "matrix": [3, 11], "x": 11.75, "y": 3.25}, | |||
{"matrix": [2, 13], "x": 12.75, "y": 3.25}, | |||
{"label": "PgUp", "matrix": [3, 14], "x": 15.5, "y": 3.25}, | |||
{"label": "Shift", "matrix": [4, 0], "x": 0, "y": 4.25, "w": 1.25}, | |||
{"label": "|", "matrix": [4, 1], "x": 1.25, "y": 4.25}, | |||
{"label": "Z", "matrix": [4, 2], "x": 2.25, "y": 4.25}, | |||
{"label": "X", "matrix": [4, 3], "x": 3.25, "y": 4.25}, | |||
{"label": "C", "matrix": [4, 4], "x": 4.25, "y": 4.25}, | |||
{"label": "V", "matrix": [4, 5], "x": 5.25, "y": 4.25}, | |||
{"label": "B", "matrix": [4, 6], "x": 6.25, "y": 4.25}, | |||
{"label": "N", "matrix": [4, 7], "x": 7.25, "y": 4.25}, | |||
{"label": "M", "matrix": [4, 8], "x": 8.25, "y": 4.25}, | |||
{"label": "<", "matrix": [4, 9], "x": 9.25, "y": 4.25}, | |||
{"label": ">", "matrix": [4, 10], "x": 10.25, "y": 4.25}, | |||
{"label": "?", "matrix": [4, 11], "x": 11.25, "y": 4.25}, | |||
{"label": "Shift", "matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, | |||
{"label": "Up", "matrix": [4, 13], "x": 14.25, "y": 4.5}, | |||
{"label": "PgDn", "matrix": [4, 14], "x": 15.5, "y": 4.25}, | |||
{"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 1], "x": 1.5, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 6], "x": 3, "y": 5.25, "w": 7}, | |||
{"matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 11], "x": 11.5, "y": 5.25, "w": 1.5}, | |||
{"label": "Left", "matrix": [5, 12], "x": 13.25, "y": 5.5}, | |||
{"label": "Down", "matrix": [5, 13], "x": 14.25, "y": 5.5}, | |||
{"label": "Right", "matrix": [5, 14], "x": 15.25, "y": 5.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,26 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
#include "satisfaction_keycodes.h" | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, 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_GRV, 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_DEL, ENC_PRESS, | |||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGUP, | |||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1,25 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
#include "satisfaction_keycodes.h" | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, 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_GRV, 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_DEL, ENC_PRESS, | |||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGUP, | |||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,29 @@ | |||
# Satisfaction75 - Revision 2 | |||
A new revision of the Satisfaction75 PCB. | |||
Layout support has been streamlined. | |||
This PCB was released in late 2023/2024. If you have a Satisfaction75 PCB from before that time, please use the rev1 satisfaction75 PCB. | |||
The revision 2 of the PCB also has "Revision 2" printed on it. | |||
* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan) | |||
* Hardware Supported: STM32F072CBT6 | |||
Make example for this keyboard (after setting up your build environment): | |||
make cannonkeys/satisfaction75/rev2:default | |||
Flashing example for this keyboard: | |||
make cannonkeys/satisfaction75/rev2: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 |
@ -0,0 +1 @@ | |||
# This file intentionally left blank |
@ -1,21 +1,9 @@ | |||
# Wildcard to allow APM32 MCU | |||
DFU_SUFFIX_ARGS = -v FFFF -p FFFF | |||
SRC += led.c \ | |||
satisfaction_encoder.c \ | |||
satisfaction_oled.c | |||
VPATH += keyboards/cannonkeys/lib/satisfaction75 | |||
SRC += satisfaction_encoder.c \ | |||
satisfaction_oled.c \ | |||
satisfaction_core.c | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | |||
MOUSEKEY_ENABLE = yes # Mouse keys | |||
EXTRAKEY_ENABLE = yes # Audio control and System control | |||
CONSOLE_ENABLE = yes # Console for debug | |||
COMMAND_ENABLE = yes # Commands for debug and configuration | |||
NKRO_ENABLE = yes # Enable N-Key Rollover | |||
ENCODER_ENABLE = yes | |||
OLED_ENABLE = yes | |||
#BACKLIGHT_ENABLE = yes | |||
DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 | |||
DEFAULT_FOLDER = cannonkeys/satisfaction75/rev1 |
@ -1,117 +1,6 @@ | |||
#pragma once | |||
#include "quantum.h" | |||
#include "via.h" // only for EEPROM address | |||
#define EEPROM_ENABLED_ENCODER_MODES (VIA_EEPROM_CUSTOM_CONFIG_ADDR) | |||
#define EEPROM_CUSTOM_BACKLIGHT (VIA_EEPROM_CUSTOM_CONFIG_ADDR+1) | |||
#define EEPROM_DEFAULT_OLED (VIA_EEPROM_CUSTOM_CONFIG_ADDR+2) | |||
#define EEPROM_CUSTOM_ENCODER (VIA_EEPROM_CUSTOM_CONFIG_ADDR+3) | |||
typedef union { | |||
uint8_t raw; | |||
struct { | |||
bool enable :1; | |||
bool breathing : 1; | |||
uint8_t level :6; | |||
}; | |||
} backlight_config_t; | |||
// Start these at the USER code range in VIA | |||
enum my_keycodes { | |||
ENC_PRESS = QK_KB_0, | |||
CLOCK_SET, | |||
OLED_TOGG | |||
}; | |||
enum s75_custom_value_id { | |||
id_encoder_modes = 1, | |||
id_oled_default_mode, | |||
id_encoder_custom, | |||
id_oled_mode | |||
}; | |||
enum encoder_modes { | |||
ENC_MODE_VOLUME, | |||
ENC_MODE_MEDIA, | |||
ENC_MODE_SCROLL, | |||
ENC_MODE_BRIGHTNESS, | |||
ENC_MODE_BACKLIGHT, | |||
ENC_MODE_CUSTOM0, | |||
ENC_MODE_CUSTOM1, | |||
ENC_MODE_CUSTOM2, | |||
_NUM_ENCODER_MODES, | |||
ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES | |||
}; | |||
enum custom_encoder_behavior { | |||
ENC_CUSTOM_CW = 0, | |||
ENC_CUSTOM_CCW, | |||
ENC_CUSTOM_PRESS | |||
}; | |||
enum oled_modes { | |||
OLED_DEFAULT, | |||
OLED_TIME, | |||
OLED_OFF, | |||
_NUM_OLED_MODES | |||
}; | |||
// Copyright 2023 Andrew Kannan | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
// Keyboard Information | |||
extern volatile uint8_t led_numlock; | |||
extern volatile uint8_t led_capslock; | |||
extern volatile uint8_t led_scrolllock; | |||
extern uint8_t layer; | |||
// OLED Behavior | |||
extern uint8_t oled_mode; | |||
extern bool oled_repaint_requested; | |||
extern bool oled_wakeup_requested; | |||
extern uint32_t oled_sleep_timer; | |||
// Encoder Behavior | |||
extern uint8_t encoder_value; | |||
extern uint8_t encoder_mode; | |||
extern uint8_t enabled_encoder_modes; | |||
// RTC | |||
extern RTCDateTime last_timespec; | |||
extern uint16_t last_minute; | |||
// RTC Configuration | |||
extern bool clock_set_mode; | |||
extern uint8_t time_config_idx; | |||
extern int8_t hour_config; | |||
extern int16_t minute_config; | |||
extern int8_t year_config; | |||
extern int8_t month_config; | |||
extern int8_t day_config; | |||
extern uint8_t previous_encoder_mode; | |||
// Backlighting | |||
extern backlight_config_t kb_backlight_config; | |||
extern bool kb_backlight_breathing; | |||
void pre_encoder_mode_change(void); | |||
void post_encoder_mode_change(void); | |||
void change_encoder_mode(bool negative); | |||
uint16_t handle_encoder_clockwise(void); | |||
uint16_t handle_encoder_ccw(void); | |||
uint16_t handle_encoder_press(void); | |||
uint16_t retrieve_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior); | |||
void set_custom_encoder_config(uint8_t encoder_idx, uint8_t behavior, uint16_t new_code); | |||
void update_time_config(int8_t increment); | |||
void oled_request_wakeup(void); | |||
void oled_request_repaint(void); | |||
bool oled_task_needs_to_repaint(void); | |||
#pragma once | |||
void backlight_init_ports(void); | |||
void backlight_set(uint8_t level); | |||
bool is_breathing(void); | |||
void breathing_enable(void); | |||
void breathing_disable(void); | |||
void custom_config_load(void); | |||
void backlight_config_save(void); | |||
#include "satisfaction_keycodes.h" |
@ -0,0 +1,18 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
/* | |||
* This file was auto-generated by: | |||
* `qmk chibios-confmigrate -i keyboards/cannonkeys/satisfaction75/chconf.h -r platforms/chibios/common/configs/chconf.h` | |||
*/ | |||
#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> | |||
@ -0,0 +1,44 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
/* Ensure we jump to bootloader if the QK_BOOT keycode was pressed */ | |||
#define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE | |||
/* LSE clock */ | |||
#define STM32_LSECLK 32768 | |||
#define ENCODER_RESOLUTION 2 | |||
// I2C config | |||
#define I2C_DRIVER I2CD1 | |||
#define I2C1_SCL_PIN B6 | |||
#define I2C1_SDA_PIN B7 | |||
#define I2C1_SCL_PAL_MODE 1 | |||
#define I2C1_SDA_PAL_MODE 1 | |||
#define I2C1_TIMINGR_PRESC 0x00U | |||
#define I2C1_TIMINGR_SCLDEL 0x03U | |||
#define I2C1_TIMINGR_SDADEL 0x01U | |||
#define I2C1_TIMINGR_SCLH 0x03U | |||
#define I2C1_TIMINGR_SCLL 0x09U | |||
// configure oled driver for the 128x32 oled | |||
#define OLED_UPDATE_INTERVAL 66 // ~15fps | |||
// OLED_TIMEOUT is incompatible with the OLED_OFF mode | |||
#define OLED_TIMEOUT 0 | |||
// OLED timeout reimplemented in the keyboard-specific code | |||
#define CUSTOM_OLED_TIMEOUT 60000 | |||
// Custom config starts after VIA's EEPROM usage, | |||
// dynamic keymaps start after this. | |||
// Custom config Usage: | |||
// 1 for enabled encoder modes (1 byte) | |||
// 1 for OLED default mode (1 byte) | |||
// 6 for 3x custom encoder settings, left, right, and press (18 bytes) | |||
#define VIA_EEPROM_CUSTOM_CONFIG_SIZE 20 | |||
// VIA lighting is handled by the keyboard-level code | |||
#define VIA_CUSTOM_LIGHTING_ENABLE |
@ -0,0 +1,18 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
/* | |||
* This file was auto-generated by: | |||
* `qmk chibios-confmigrate -i keyboards/cannonkeys/satisfaction75/halconf.h -r platforms/chibios/common/configs/halconf.h` | |||
*/ | |||
#pragma once | |||
#define HAL_USE_I2C TRUE | |||
#define HAL_USE_RTC TRUE | |||
#define HAL_USE_SPI TRUE | |||
#include_next <halconf.h> | |||
@ -0,0 +1,207 @@ | |||
{ | |||
"manufacturer": "CannonKeys", | |||
"keyboard_name": "Satisfaction75 HS", | |||
"maintainer": "awkannan", | |||
"bootloader": "stm32-dfu", | |||
"diode_direction": "COL2ROW", | |||
"encoder": { | |||
"rotary": [ | |||
{"pin_a": "B9", "pin_b": "B8"} | |||
] | |||
}, | |||
"features": { | |||
"bootmagic": true, | |||
"command": false, | |||
"console": true, | |||
"encoder": true, | |||
"extrakey": true, | |||
"mousekey": true, | |||
"nkro": true, | |||
"oled": true | |||
}, | |||
"indicators": { | |||
"caps_lock": "B14", | |||
"on_state": 0 | |||
}, | |||
"matrix_pins": { | |||
"cols": ["A8", "C13", "B2", "B1", "B0", "B12", "B5", "B4", "B3", "A7", "A5", "A4", "A3", "A2", "A1"], | |||
"rows": ["A10", "A14", "A15", "A0", "B11", "B10"] | |||
}, | |||
"processor": "STM32F072", | |||
"usb": { | |||
"device_version": "0.0.1", | |||
"pid": "0x0011", | |||
"vid": "0xCA04" | |||
}, | |||
"layouts": { | |||
"LAYOUT_all": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 2], "x": 1.5, "y": 0}, | |||
{"matrix": [0, 3], "x": 2.5, "y": 0}, | |||
{"matrix": [0, 4], "x": 3.5, "y": 0}, | |||
{"matrix": [0, 5], "x": 4.5, "y": 0}, | |||
{"matrix": [0, 6], "x": 5.75, "y": 0}, | |||
{"matrix": [0, 7], "x": 6.75, "y": 0}, | |||
{"matrix": [0, 8], "x": 7.75, "y": 0}, | |||
{"matrix": [0, 9], "x": 8.75, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [1, 14], "x": 15.5, "y": 0.75}, | |||
{"matrix": [1, 0], "x": 0, "y": 1.25}, | |||
{"matrix": [1, 1], "x": 1, "y": 1.25}, | |||
{"matrix": [1, 2], "x": 2, "y": 1.25}, | |||
{"matrix": [1, 3], "x": 3, "y": 1.25}, | |||
{"matrix": [1, 4], "x": 4, "y": 1.25}, | |||
{"matrix": [1, 5], "x": 5, "y": 1.25}, | |||
{"matrix": [1, 6], "x": 6, "y": 1.25}, | |||
{"matrix": [1, 7], "x": 7, "y": 1.25}, | |||
{"matrix": [1, 8], "x": 8, "y": 1.25}, | |||
{"matrix": [1, 9], "x": 9, "y": 1.25}, | |||
{"matrix": [1, 10], "x": 10, "y": 1.25}, | |||
{"matrix": [1, 11], "x": 11, "y": 1.25}, | |||
{"matrix": [1, 12], "x": 12, "y": 1.25}, | |||
{"matrix": [1, 13], "x": 13, "y": 1.25}, | |||
{"matrix": [0, 14], "x": 14, "y": 1.25}, | |||
{"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, | |||
{"matrix": [2, 1], "x": 1.5, "y": 2.25}, | |||
{"matrix": [2, 2], "x": 2.5, "y": 2.25}, | |||
{"matrix": [2, 3], "x": 3.5, "y": 2.25}, | |||
{"matrix": [2, 4], "x": 4.5, "y": 2.25}, | |||
{"matrix": [2, 5], "x": 5.5, "y": 2.25}, | |||
{"matrix": [2, 6], "x": 6.5, "y": 2.25}, | |||
{"matrix": [2, 7], "x": 7.5, "y": 2.25}, | |||
{"matrix": [2, 8], "x": 8.5, "y": 2.25}, | |||
{"matrix": [2, 9], "x": 9.5, "y": 2.25}, | |||
{"matrix": [2, 10], "x": 10.5, "y": 2.25}, | |||
{"matrix": [2, 11], "x": 11.5, "y": 2.25}, | |||
{"matrix": [2, 12], "x": 12.5, "y": 2.25}, | |||
{"matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5}, | |||
{"matrix": [2, 14], "x": 15.5, "y": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, | |||
{"matrix": [3, 1], "x": 1.75, "y": 3.25}, | |||
{"matrix": [3, 2], "x": 2.75, "y": 3.25}, | |||
{"matrix": [3, 3], "x": 3.75, "y": 3.25}, | |||
{"matrix": [3, 4], "x": 4.75, "y": 3.25}, | |||
{"matrix": [3, 5], "x": 5.75, "y": 3.25}, | |||
{"matrix": [3, 6], "x": 6.75, "y": 3.25}, | |||
{"matrix": [3, 7], "x": 7.75, "y": 3.25}, | |||
{"matrix": [3, 8], "x": 8.75, "y": 3.25}, | |||
{"matrix": [3, 9], "x": 9.75, "y": 3.25}, | |||
{"matrix": [3, 10], "x": 10.75, "y": 3.25}, | |||
{"matrix": [3, 11], "x": 11.75, "y": 3.25}, | |||
{"matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25}, | |||
{"matrix": [3, 14], "x": 15.5, "y": 3.25}, | |||
{"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25}, | |||
{"matrix": [4, 2], "x": 2.25, "y": 4.25}, | |||
{"matrix": [4, 3], "x": 3.25, "y": 4.25}, | |||
{"matrix": [4, 4], "x": 4.25, "y": 4.25}, | |||
{"matrix": [4, 5], "x": 5.25, "y": 4.25}, | |||
{"matrix": [4, 6], "x": 6.25, "y": 4.25}, | |||
{"matrix": [4, 7], "x": 7.25, "y": 4.25}, | |||
{"matrix": [4, 8], "x": 8.25, "y": 4.25}, | |||
{"matrix": [4, 9], "x": 9.25, "y": 4.25}, | |||
{"matrix": [4, 10], "x": 10.25, "y": 4.25}, | |||
{"matrix": [4, 11], "x": 11.25, "y": 4.25}, | |||
{"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, | |||
{"matrix": [4, 13], "x": 14.25, "y": 4.5}, | |||
{"matrix": [4, 14], "x": 15.5, "y": 4.25}, | |||
{"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, | |||
{"matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 11], "x": 11.5, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 12], "x": 13.25, "y": 5.5}, | |||
{"matrix": [5, 13], "x": 14.25, "y": 5.5}, | |||
{"matrix": [5, 14], "x": 15.25, "y": 5.5} | |||
] | |||
}, | |||
"LAYOUT_full_bs": { | |||
"layout": [ | |||
{"matrix": [0, 0], "x": 0, "y": 0}, | |||
{"matrix": [0, 2], "x": 1.5, "y": 0}, | |||
{"matrix": [0, 3], "x": 2.5, "y": 0}, | |||
{"matrix": [0, 4], "x": 3.5, "y": 0}, | |||
{"matrix": [0, 5], "x": 4.5, "y": 0}, | |||
{"matrix": [0, 6], "x": 5.75, "y": 0}, | |||
{"matrix": [0, 7], "x": 6.75, "y": 0}, | |||
{"matrix": [0, 8], "x": 7.75, "y": 0}, | |||
{"matrix": [0, 9], "x": 8.75, "y": 0}, | |||
{"matrix": [0, 10], "x": 10, "y": 0}, | |||
{"matrix": [0, 11], "x": 11, "y": 0}, | |||
{"matrix": [0, 12], "x": 12, "y": 0}, | |||
{"matrix": [0, 13], "x": 13, "y": 0}, | |||
{"matrix": [1, 14], "x": 15.5, "y": 1}, | |||
{"matrix": [1, 0], "x": 0, "y": 1.25}, | |||
{"matrix": [1, 1], "x": 1, "y": 1.25}, | |||
{"matrix": [1, 2], "x": 2, "y": 1.25}, | |||
{"matrix": [1, 3], "x": 3, "y": 1.25}, | |||
{"matrix": [1, 4], "x": 4, "y": 1.25}, | |||
{"matrix": [1, 5], "x": 5, "y": 1.25}, | |||
{"matrix": [1, 6], "x": 6, "y": 1.25}, | |||
{"matrix": [1, 7], "x": 7, "y": 1.25}, | |||
{"matrix": [1, 8], "x": 8, "y": 1.25}, | |||
{"matrix": [1, 9], "x": 9, "y": 1.25}, | |||
{"matrix": [1, 10], "x": 10, "y": 1.25}, | |||
{"matrix": [1, 11], "x": 11, "y": 1.25}, | |||
{"matrix": [1, 12], "x": 12, "y": 1.25}, | |||
{"matrix": [1, 13], "x": 13, "y": 1.25, "w": 2}, | |||
{"matrix": [2, 0], "x": 0, "y": 2.25, "w": 1.5}, | |||
{"matrix": [2, 1], "x": 1.5, "y": 2.25}, | |||
{"matrix": [2, 2], "x": 2.5, "y": 2.25}, | |||
{"matrix": [2, 3], "x": 3.5, "y": 2.25}, | |||
{"matrix": [2, 4], "x": 4.5, "y": 2.25}, | |||
{"matrix": [2, 5], "x": 5.5, "y": 2.25}, | |||
{"matrix": [2, 6], "x": 6.5, "y": 2.25}, | |||
{"matrix": [2, 7], "x": 7.5, "y": 2.25}, | |||
{"matrix": [2, 8], "x": 8.5, "y": 2.25}, | |||
{"matrix": [2, 9], "x": 9.5, "y": 2.25}, | |||
{"matrix": [2, 10], "x": 10.5, "y": 2.25}, | |||
{"matrix": [2, 11], "x": 11.5, "y": 2.25}, | |||
{"matrix": [2, 12], "x": 12.5, "y": 2.25}, | |||
{"matrix": [2, 13], "x": 13.5, "y": 2.25, "w": 1.5}, | |||
{"matrix": [2, 14], "x": 15.5, "y": 2.25}, | |||
{"matrix": [3, 0], "x": 0, "y": 3.25, "w": 1.75}, | |||
{"matrix": [3, 1], "x": 1.75, "y": 3.25}, | |||
{"matrix": [3, 2], "x": 2.75, "y": 3.25}, | |||
{"matrix": [3, 3], "x": 3.75, "y": 3.25}, | |||
{"matrix": [3, 4], "x": 4.75, "y": 3.25}, | |||
{"matrix": [3, 5], "x": 5.75, "y": 3.25}, | |||
{"matrix": [3, 6], "x": 6.75, "y": 3.25}, | |||
{"matrix": [3, 7], "x": 7.75, "y": 3.25}, | |||
{"matrix": [3, 8], "x": 8.75, "y": 3.25}, | |||
{"matrix": [3, 9], "x": 9.75, "y": 3.25}, | |||
{"matrix": [3, 10], "x": 10.75, "y": 3.25}, | |||
{"matrix": [3, 11], "x": 11.75, "y": 3.25}, | |||
{"matrix": [3, 13], "x": 12.75, "y": 3.25, "w": 2.25}, | |||
{"matrix": [3, 14], "x": 15.5, "y": 3.25}, | |||
{"matrix": [4, 0], "x": 0, "y": 4.25, "w": 2.25}, | |||
{"matrix": [4, 2], "x": 2.25, "y": 4.25}, | |||
{"matrix": [4, 3], "x": 3.25, "y": 4.25}, | |||
{"matrix": [4, 4], "x": 4.25, "y": 4.25}, | |||
{"matrix": [4, 5], "x": 5.25, "y": 4.25}, | |||
{"matrix": [4, 6], "x": 6.25, "y": 4.25}, | |||
{"matrix": [4, 7], "x": 7.25, "y": 4.25}, | |||
{"matrix": [4, 8], "x": 8.25, "y": 4.25}, | |||
{"matrix": [4, 9], "x": 9.25, "y": 4.25}, | |||
{"matrix": [4, 10], "x": 10.25, "y": 4.25}, | |||
{"matrix": [4, 11], "x": 11.25, "y": 4.25}, | |||
{"matrix": [4, 12], "x": 12.25, "y": 4.25, "w": 1.75}, | |||
{"matrix": [4, 13], "x": 14.25, "y": 4.5}, | |||
{"matrix": [4, 14], "x": 15.5, "y": 4.25}, | |||
{"matrix": [5, 0], "x": 0, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 1], "x": 1.25, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 2], "x": 2.5, "y": 5.25, "w": 1.25}, | |||
{"matrix": [5, 6], "x": 3.75, "y": 5.25, "w": 6.25}, | |||
{"matrix": [5, 10], "x": 10, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 11], "x": 11.5, "y": 5.25, "w": 1.5}, | |||
{"matrix": [5, 12], "x": 13.25, "y": 5.5}, | |||
{"matrix": [5, 13], "x": 14.25, "y": 5.5}, | |||
{"matrix": [5, 14], "x": 15.25, "y": 5.5} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,23 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ENC_PRESS, | |||
KC_GRV, 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_DEL, | |||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGUP, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1,23 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#include QMK_KEYBOARD_H | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[0] = LAYOUT_all( | |||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ENC_PRESS, | |||
KC_GRV, 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_DEL, | |||
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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, KC_PGUP, | |||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, | |||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT | |||
), | |||
[1] = LAYOUT_all( | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, | |||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______ | |||
) | |||
}; |
@ -0,0 +1 @@ | |||
VIA_ENABLE = yes |
@ -0,0 +1,24 @@ | |||
// Copyright 2023 Andrew Kannan (@awkannan) | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
/* | |||
* This file was auto-generated by: | |||
* `qmk chibios-confmigrate -i keyboards/cannonkeys/satisfaction75/mcuconf.h -r platforms/chibios/GENERIC_STM32_F072XB/configs/mcuconf.h` | |||
*/ | |||
#pragma once | |||
#include_next <mcuconf.h> | |||
#undef STM32_LSE_ENABLED | |||
#define STM32_LSE_ENABLED TRUE | |||
#undef STM32_RTCSEL | |||
#define STM32_RTCSEL STM32_RTCSEL_LSE | |||
#undef STM32_I2C_USE_I2C1 | |||
#define STM32_I2C_USE_I2C1 TRUE | |||
#undef STM32_SPI_USE_SPI2 | |||
#define STM32_SPI_USE_SPI2 TRUE | |||
@ -0,0 +1,20 @@ | |||
# Satisfaction75 Hotswap | |||
Satisfaction75 Hotswap PCB for Satisfaction75 Keyboard | |||
* Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) | |||
* Hardware Supported: STM32F072CBT6 | |||
Make example for this keyboard (after setting up your build environment): | |||
make cannonkeys/satisfaction75_hs: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 "0" 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 |
@ -0,0 +1,7 @@ | |||
# Wildcard to allow APM32 MCU | |||
DFU_SUFFIX_ARGS = -v FFFF -p FFFF | |||
VPATH += keyboards/cannonkeys/lib/satisfaction75 | |||
SRC += satisfaction_encoder.c \ | |||
satisfaction_oled.c \ | |||
satisfaction_core.c |
@ -0,0 +1,6 @@ | |||
// Copyright 2023 Andrew Kannan | |||
// SPDX-License-Identifier: GPL-2.0-or-later | |||
#pragma once | |||
#include "satisfaction_keycodes.h" |