summaryrefslogtreecommitdiff
path: root/keyboards/cannonkeys/satisfaction75
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/cannonkeys/satisfaction75')
-rw-r--r--keyboards/cannonkeys/satisfaction75/config.h20
-rw-r--r--keyboards/cannonkeys/satisfaction75/info.json13
-rw-r--r--keyboards/cannonkeys/satisfaction75/led.c2
-rw-r--r--keyboards/cannonkeys/satisfaction75/rules.mk7
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction75.c4
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction75.h2
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c10
-rw-r--r--keyboards/cannonkeys/satisfaction75/satisfaction_oled.c4
8 files changed, 24 insertions, 38 deletions
diff --git a/keyboards/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h
index a650a362c0..ac9548dd27 100644
--- a/keyboards/cannonkeys/satisfaction75/config.h
+++ b/keyboards/cannonkeys/satisfaction75/config.h
@@ -23,27 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* LSE clock */
#define STM32_LSECLK 32768
-/* key matrix size */
-#define MATRIX_ROWS 6
-#define MATRIX_COLS 16
-
#define MATRIX_COL_PINS { B1, B2, B10, B11, B12, B13, B14, A8, A9, A10, B0, A7, A5, B5, A15, A1 }
#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 }
#define DIODE_DIRECTION COL2ROW
-#define ENCODERS_PAD_A { B9 }
-#define ENCODERS_PAD_B { B8 }
-
-#define ENCODER_RESOLUTION 2
-
-//LEDS A6, RGB B15
-#define BACKLIGHT_LEVELS 24
-#define BACKLIGHT_BREATHING
-#define BREATHING_PERIOD 6
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
// I2C config
#define I2C_DRIVER I2CD1
#define I2C1_SCL_PIN B6
@@ -56,9 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define I2C1_TIMINGR_SCLH 0x03U
#define I2C1_TIMINGR_SCLL 0x09U
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCE 5
-
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE
/* Locking resynchronize hack */
diff --git a/keyboards/cannonkeys/satisfaction75/info.json b/keyboards/cannonkeys/satisfaction75/info.json
index 692715124d..9bf8459b1a 100644
--- a/keyboards/cannonkeys/satisfaction75/info.json
+++ b/keyboards/cannonkeys/satisfaction75/info.json
@@ -7,5 +7,16 @@
"vid": "0xCA04",
"pid": "0x57F5",
"device_version": "0.0.1"
- }
+ },
+ "encoder": {
+ "rotary": [
+ {"pin_a": "B9", "pin_b": "B8", "resolution": 2}
+ ]
+ },
+ "backlight": {
+ "levels": 24,
+ "breathing": true
+ },
+ "processor": "STM32F072",
+ "bootloader": "stm32-dfu"
}
diff --git a/keyboards/cannonkeys/satisfaction75/led.c b/keyboards/cannonkeys/satisfaction75/led.c
index 39ff4d784d..68bfc99d2e 100644
--- a/keyboards/cannonkeys/satisfaction75/led.c
+++ b/keyboards/cannonkeys/satisfaction75/led.c
@@ -19,6 +19,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "led_custom.h"
#include "satisfaction75.h"
+#define BREATHING_PERIOD 6
+
static void breathing_callback(PWMDriver *pwmp);
static PWMConfig pwmCFG = {
diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk
index 4cf5e4b157..9f6480ee0e 100644
--- a/keyboards/cannonkeys/satisfaction75/rules.mk
+++ b/keyboards/cannonkeys/satisfaction75/rules.mk
@@ -1,10 +1,3 @@
-# MCU name
-MCU = STM32F072
-BOARD = GENERIC_STM32_F072XB
-
-# Bootloader selection
-BOOTLOADER = stm32-dfu
-
# Wildcard to allow APM32 MCU
DFU_SUFFIX_ARGS = -v FFFF -p FFFF
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
index 13b44b85db..ce870c49af 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c
@@ -361,11 +361,11 @@ void custom_config_reset(void){
eeprom_update_byte((uint8_t*)EEPROM_ENABLED_ENCODER_MODES, 0x1F);
}
-void backlight_config_save(){
+void backlight_config_save(void){
eeprom_update_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT, kb_backlight_config.raw);
}
-void custom_config_load(){
+void custom_config_load(void){
kb_backlight_config.raw = eeprom_read_byte((uint8_t*)EEPROM_CUSTOM_BACKLIGHT);
#ifdef DYNAMIC_KEYMAP_ENABLE
oled_mode = eeprom_read_byte((uint8_t*)EEPROM_DEFAULT_OLED);
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h
index ec852eef6c..9e28bb32a1 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction75.h
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h
@@ -25,7 +25,7 @@ typedef union {
// Start these at the USER code range in VIA
enum my_keycodes {
- ENC_PRESS = USER00,
+ ENC_PRESS = QK_KB_0,
CLOCK_SET,
OLED_TOGG
};
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
index c40815a8d8..c8bb999df4 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c
@@ -1,7 +1,7 @@
#include "satisfaction75.h"
#include "eeprom.h"
-void pre_encoder_mode_change(){
+void pre_encoder_mode_change(void){
if(encoder_mode == ENC_MODE_CLOCK_SET){
RTCDateTime timespec;
timespec.year = year_config;
@@ -16,7 +16,7 @@ void pre_encoder_mode_change(){
}
}
-void post_encoder_mode_change(){
+void post_encoder_mode_change(void){
if(encoder_mode == ENC_MODE_CLOCK_SET){
hour_config = (last_minute / 60);
minute_config = last_minute % 60;
@@ -86,7 +86,7 @@ void update_time_config(int8_t increment){
}
}
-uint16_t handle_encoder_clockwise(){
+uint16_t handle_encoder_clockwise(void){
uint16_t mapped_code = 0;
switch(encoder_mode){
default:
@@ -130,7 +130,7 @@ uint16_t handle_encoder_clockwise(){
return mapped_code;
}
-uint16_t handle_encoder_ccw(){
+uint16_t handle_encoder_ccw(void){
uint16_t mapped_code = 0;
switch(encoder_mode){
default:
@@ -175,7 +175,7 @@ uint16_t handle_encoder_ccw(){
return mapped_code;
}
-uint16_t handle_encoder_press(){
+uint16_t handle_encoder_press(void){
uint16_t mapped_code = 0;
switch(encoder_mode){
case ENC_MODE_VOLUME:
diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
index 1e8465387c..0fd69ca59b 100644
--- a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
+++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c
@@ -168,7 +168,7 @@ static char* get_date(void) {
return date_str;
}
-void draw_default() {
+void draw_default(void) {
oled_write_P(PSTR("LAYER "), false);
oled_write_char(get_highest_layer(layer_state) + 0x30, true);
@@ -220,7 +220,7 @@ void draw_default() {
draw_line_v(71, 0, 8);
}
-void draw_clock() {
+void draw_clock(void) {
oled_set_cursor(0, 0);
oled_write(get_date(), false);
oled_set_cursor(0, 2);