Browse Source

Add handwired/replicazeron

add missing license headers

add more missing headers

fix d-pad matrix wire mapping

refactor and remove duplicate code

move matrix definition to info.json

combine promicro & stm32 info.json

remove UNICODEMAP from rules.mk on keyboard level

fix layout macro order

move common code out of keymap

generalize status led code and move it to common/

remove unicodekeymap

cleanup keymap

remove redundand config.h

sync changes to via keymap

use common code with promicro

move conditional includes to keymap level

add image to readme.md

consolidate keymaps

add comments

add default oled_brightness
pull/20108/head
9R 1 year ago
parent
commit
b84306aa38
28 changed files with 1279 additions and 0 deletions
  1. +47
    -0
      keyboards/handwired/replicazeron/common/leds.c
  2. +21
    -0
      keyboards/handwired/replicazeron/common/leds.h
  3. +97
    -0
      keyboards/handwired/replicazeron/common/oled.c
  4. +44
    -0
      keyboards/handwired/replicazeron/common/oled.h
  5. +28
    -0
      keyboards/handwired/replicazeron/common/state.c
  6. +26
    -0
      keyboards/handwired/replicazeron/common/state.h
  7. +133
    -0
      keyboards/handwired/replicazeron/common/thumbstick.c
  8. +57
    -0
      keyboards/handwired/replicazeron/common/thumbstick.h
  9. +52
    -0
      keyboards/handwired/replicazeron/info.json
  10. +168
    -0
      keyboards/handwired/replicazeron/keymaps/default/keymap.c
  11. +2
    -0
      keyboards/handwired/replicazeron/keymaps/default/readme.md
  12. +15
    -0
      keyboards/handwired/replicazeron/keymaps/default/rules.mk
  13. +168
    -0
      keyboards/handwired/replicazeron/keymaps/via/keymap.c
  14. +2
    -0
      keyboards/handwired/replicazeron/keymaps/via/readme.md
  15. +16
    -0
      keyboards/handwired/replicazeron/keymaps/via/rules.mk
  16. +55
    -0
      keyboards/handwired/replicazeron/promicro/config.h
  17. +9
    -0
      keyboards/handwired/replicazeron/promicro/info.json
  18. +25
    -0
      keyboards/handwired/replicazeron/promicro/promicro.c
  19. +17
    -0
      keyboards/handwired/replicazeron/promicro/promicro.h
  20. +29
    -0
      keyboards/handwired/replicazeron/promicro/rules.mk
  21. +69
    -0
      keyboards/handwired/replicazeron/readme.md
  22. +57
    -0
      keyboards/handwired/replicazeron/stm32f103/config.h
  23. +27
    -0
      keyboards/handwired/replicazeron/stm32f103/halconf.h
  24. +9
    -0
      keyboards/handwired/replicazeron/stm32f103/info.json
  25. +31
    -0
      keyboards/handwired/replicazeron/stm32f103/mcuconf.h
  26. +33
    -0
      keyboards/handwired/replicazeron/stm32f103/rules.mk
  27. +25
    -0
      keyboards/handwired/replicazeron/stm32f103/stm32f103.c
  28. +17
    -0
      keyboards/handwired/replicazeron/stm32f103/stm32f103.h

+ 47
- 0
keyboards/handwired/replicazeron/common/leds.c View File

@ -0,0 +1,47 @@
/* Copyright 2023 9R
*
* 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 "leds.h"
//////////// Status LEDs //////////////
void init_leds(void) {
setPinOutput(STATUS_LED_A_PIN) ;
setPinOutput(STATUS_LED_B_PIN) ;
writePinHigh(STATUS_LED_A_PIN) ; //Led0 off
writePinHigh(STATUS_LED_B_PIN) ; //Led1 off
}
void set_leds(int active_layer) {
//display active layer in binary
switch (active_layer) {
case 1:
writePinLow(STATUS_LED_A_PIN); //Led0 on
writePinHigh(STATUS_LED_B_PIN); //Led1 off
break;
case 2:
writePinHigh(STATUS_LED_A_PIN); //Led0 off
writePinLow(STATUS_LED_B_PIN); //Led1 on
break;
case 3:
writePinLow(STATUS_LED_A_PIN); //Led0 on
writePinLow(STATUS_LED_B_PIN); //Led1 on
break;
default:
writePinHigh(STATUS_LED_A_PIN); //Led0 off
writePinHigh(STATUS_LED_B_PIN); //Led1 off
break;
}
}

+ 21
- 0
keyboards/handwired/replicazeron/common/leds.h View File

@ -0,0 +1,21 @@
/* Copyright 2023 9R
*
* 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
void init_leds(void) ;
void set_leds(int active_layer) ;

+ 97
- 0
keyboards/handwired/replicazeron/common/oled.c View File

@ -0,0 +1,97 @@
/* Copyright 2023 9R
*
* 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 "oled.h"
uint8_t shiftbits =32 ;
//////////// OLED output helpers //////////////
void draw_mode(controller_state_t controller_state) {
//draw oled row showing thumbstick mode
oled_write_P(PSTR("Mode: "), false);
if (controller_state.wasdShiftMode) {
oled_write_ln_P(PSTR("WASD + Shift"), false);
} else if (controller_state.wasdMode) {
oled_write_ln_P(PSTR("WASD"), false);
} else {
oled_write_ln_P(PSTR("JoyStick"), false);
}
}
void draw_wasd_key(wasd_state_t wasd_state) {
//draw oled row showing active keypresses emulated from thumbstick
const char* keys = "wasd" ;
bool keystates [] = {wasd_state.w, wasd_state.a, wasd_state.s, wasd_state.d } ;
// iterate over keystates
for ( int i = 0 ; i < 4 ; i++ ){
if ( keystates[i]) {
char k = keys[i] ;
//bitshift char to upper case
if (wasd_state.shift) {
k &= ~shiftbits;
}
sprintf (stringbuffer , "%c", k);
oled_write(stringbuffer , false);
}
else {
oled_write_P(PSTR(" "), false);
}
}
}
void draw_thumb_debug(thumbstick_polar_position_t thumbstick_polar_position) {
//draw oled row showing thumbstick direction and distance from center
oled_write_P(PSTR("Dir: "), false);
sprintf (stringbuffer , "%d", thumbstick_polar_position.angle);
oled_write(stringbuffer , false);
oled_write_P(PSTR(" Dist: "), false);
sprintf (stringbuffer , "%d", thumbstick_polar_position.distance);
oled_write_ln(stringbuffer , false);
//print registered key codes
oled_write_P(PSTR("Keycodes: "), false);
draw_wasd_key( wasd_state );
}
//////////// draw OLED output //////////////
void draw_oled(controller_state_t controller_state) {
oled_write_P(PSTR("Layer: "), false);
switch (controller_state.activeLayer) {
case LAYER_SHOOTER:
oled_write_ln_P(PSTR("Shooter"), false);
draw_mode(controller_state);
oled_write_ln_P(PSTR(" "), false);
oled_write_ln_P(PSTR(" "), false);
break;
case LAYER_MISC:
oled_write_ln_P(PSTR("Misc"), false);
draw_mode(controller_state);
oled_write_ln_P(PSTR(" "), false);
oled_write_ln_P(PSTR(" "), false);
break;
case LAYER_SETTINGS:
oled_write_ln_P(PSTR("Settings"), false);
draw_mode(controller_state);
draw_thumb_debug(thumbstick_polar_position);
oled_write_ln_P(PSTR(" "), false);
break;
default:
oled_write_ln_P(PSTR("Default"), false);
draw_mode(controller_state);
oled_write_ln_P(PSTR(" "), false);
oled_write_ln_P(PSTR(" "), false);
}
}

+ 44
- 0
keyboards/handwired/replicazeron/common/oled.h View File

@ -0,0 +1,44 @@
/* Copyright 2023 9R
*
* 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 "print.h"
#include QMK_KEYBOARD_H
#include <stdio.h>
#include "state.h"
#include "thumbstick.h"
uint8_t shiftbits ;
char stringbuffer[8] ;
enum keymap_layers {
LAYER_BASE = 0,
LAYER_SHOOTER,
LAYER_MISC,
LAYER_SETTINGS,
};
void draw_oled(controller_state_t controller_state) ;
void draw_mode(controller_state_t controller_state) ;
void draw_thumb_debug(thumbstick_polar_position_t thumbstick_polar_position) ;
void draw_wasd_key(wasd_state_t wasd_state) ;
void draw_settings(void) ;

+ 28
- 0
keyboards/handwired/replicazeron/common/state.c View File

@ -0,0 +1,28 @@
/* Copyright 2023 9R
*
* 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 "state.h"
controller_state_t init_state (void) {
controller_state_t controller_state = {
.wasdMode = true ,
.wasdShiftMode = false ,
.autoRun = false ,
.activeLayer = 0,
} ;
return controller_state;
}

+ 26
- 0
keyboards/handwired/replicazeron/common/state.h View File

@ -0,0 +1,26 @@
/* Copyright 2023 9R
*
* 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"
typedef struct {
bool wasdMode;
bool wasdShiftMode;
bool autoRun;
int activeLayer;
}controller_state_t ;
controller_state_t init_state (void) ;

+ 133
- 0
keyboards/handwired/replicazeron/common/thumbstick.c View File

@ -0,0 +1,133 @@
/* Copyright 2023 9R
*
* 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 "thumbstick.h"
void init_wasd_state (void) {
wasd_state.w = wasd_state.a = wasd_state.s = wasd_state.d = false ;
last_wasd_state = wasd_state ;
wasd_state.shift = false ;
}
thumbstick_polar_position_t get_thumbstick_polar_position (int x, int y ) {
thumbstick_polar_position_t position ;
int x_centered = x - 512;
int y_centered = y - 512;
#ifdef THUMBSTICK_DEBUG
print("xN: ");
uprintf("%4d", x_centered);
print(" yN: ");
uprintf("%4d", y_centered);
#endif
//transform to carthesian coordinates to polar coordinates
//get distance from center as int in range [0-600]
position.distance = (double)sqrt( (double)x_centered * (double)x_centered + (double)y_centered * (double)y_centered );
//get direction as int in range [0 to 359]
position.angle = (double) atan2( y_centered, x_centered ) * (180 /M_PI)+180;
//apply thumbstick rotation const to modify forward direction
position.angle = ( position.angle + _THUMBSTICK_ROTATION )%360 ;
return position;
}
bool update_keystate( bool keystate, int angle_from, int angle_to, int angle ){
if (angle_from < angle && angle <= angle_to ) {
keystate = true ;
}
if (angle <= angle_from || angle_to < angle ) {
keystate = false ;
}
return keystate ;
}
void update_keycode(uint16_t keycode, bool keystate, bool last_keystate) {
if (keystate && keystate != last_keystate ) {
register_code(keycode);
}
else if (!keystate) {
unregister_code (keycode) ;
}
}
void thumbstick(controller_state_t controller_state) {
yPos = analogReadPin(B1);
xPos = analogReadPin(B0);
thumbstick_polar_position = get_thumbstick_polar_position (xPos, yPos);
#ifdef THUMBSTICK_DEBUG
print(" distance: ");
uprintf("%5d", thumbstick_polar_position.angle);
print(" angle: ");
uprintf("%5d", thumbstick_polar_position.distance);
print("\n");
#endif
// Update WASD state depending on thumbstick position
// if thumbstick out of of deadzone
if ( thumbstick_polar_position.distance >= _DEADZONE ) {
wasd_state.w = update_keystate (wasd_state.w, 0, 90, thumbstick_polar_position.angle);
if ( !wasd_state.w ) {
wasd_state.w = update_keystate (wasd_state.w, 315, 360, thumbstick_polar_position.angle);
}
// A angle: 45 - 180
wasd_state.a = update_keystate (wasd_state.a, 45, 181, thumbstick_polar_position.angle);
// S angle: 135 - 270
wasd_state.s = update_keystate (wasd_state.s, 135, 270, thumbstick_polar_position.angle);
// D angle: 225 - 359
wasd_state.d = update_keystate (wasd_state.d, 225, 359, thumbstick_polar_position.angle);
}
//reset WASD state when in _DEADZONE
else {
init_wasd_state () ;
}
#ifdef THUMBSTICK_DEBUG
print(" w: ");
uprintf("%2d", wasd_state.w);
print(" a: ");
uprintf("%2d", wasd_state.a);
print(" s: ");
uprintf("%2d", wasd_state.s);
print(" d: ");
uprintf("%2d", wasd_state.d);
print("\n");
#endif
update_keycode (KC_W, wasd_state.w, last_wasd_state.w) ;
update_keycode (KC_A, wasd_state.a, last_wasd_state.a) ;
update_keycode (KC_S, wasd_state.s, last_wasd_state.s) ;
update_keycode (KC_D, wasd_state.d, last_wasd_state.d) ;
last_wasd_state = wasd_state ;
// handle WASD-Shift mode
if (controller_state.wasdShiftMode) {
bool Shifted = thumbstick_polar_position.distance > _SHIFTZONE;
if (!wasd_state.shift && Shifted) {
register_code(KC_LSFT);
wasd_state.shift = true;
}
else if (wasd_state.shift && !Shifted) {
unregister_code(KC_LSFT);
wasd_state.shift = false;
}
}
}

+ 57
- 0
keyboards/handwired/replicazeron/common/thumbstick.h View File

@ -0,0 +1,57 @@
/* Copyright 2023 9R
*
* 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
#define _DEADZONE 100 // 0 to _SHIFTZONE-1
#define _SHIFTZONE 350 // _DEADZONE+1 to 600
#define _THUMBSTICK_ROTATION 100 //degrees, adjusts forward direction
#include QMK_KEYBOARD_H
#include "analog.h"
#include <math.h>
#include "state.h"
int xPos;
int yPos;
typedef struct {
int angle;
int distance;
} thumbstick_polar_position_t;
typedef struct {
bool w;
bool a;
bool s;
bool d;
bool shift;
} wasd_state_t;
thumbstick_polar_position_t thumbstick_polar_position ;
wasd_state_t wasd_state;
wasd_state_t last_wasd_state;
void init_wasd_state (void) ;
thumbstick_polar_position_t get_thumbstick_polar_position (int x, int y ) ;
bool update_keystate(bool keyheld , int angle_from, int angle_to, int angle ) ;
void update_keycode(uint16_t keycode, bool keystate, bool last_keystate) ;
void thumbstick(controller_state_t controller_state) ;

+ 52
- 0
keyboards/handwired/replicazeron/info.json View File

@ -0,0 +1,52 @@
{
"keyboard_name": "Replicazeron",
"manufacturer": "9R",
"url": "",
"maintainer": "9R",
"usb": {
"vid": "0x4142",
"pid": "0x2305",
"device_version": "0.0.1"
},
"layouts": {
"LAYOUT": {
"layout": [
{"label":"K04", "x":1.75, "y":1, "w":1.25, "matrix": [0,0]},
{"label":"K10", "x":3, "y":1, "w":1.25, "matrix": [0,1]},
{"label":"K16", "x":4.25, "y":1, "w":1.25, "matrix": [0,2]},
{"label":"K22", "x":5.5, "y":1, "w":1.25, "matrix": [0,3]},
{"label":"dwn", "x":9.5, "y":2.75, "w":1.25, "matrix": [0,4]},
{"label":"K03", "x":1.75, "y":1.7, "h":1.25, "w":1.25, "matrix": [1,0]},
{"label":"K09", "x":3, "y":1.7, "h":1.25, "w":1.25, "matrix": [1,1]},
{"label":"K15", "x":4.25, "y":1.7, "h":1.25, "w":1.25, "matrix": [1,2]},
{"label":"K21", "x":5.5, "y":1.7, "h":1.25, "w":1.25, "matrix": [1,3]},
{"label":"lft", "x":8.25, "y":1.75, "w":1.25, "matrix": [1,4]},
{"label":"K02", "x":1.75, "y":3.25, "h":1.25, "w":1.25, "matrix": [2,0]},
{"label":"K08", "x":3, "y":3.25, "h":1.25, "w":1.25, "matrix": [2,1]},
{"label":"K14", "x":4.25, "y":3.25, "h":1.25, "w":1.25, "matrix": [2,2]},
{"label":"K20", "x":5.5, "y":3.25, "h":1.25, "w":1.25, "matrix": [2,3]},
{"label":"ent", "x":9.5, "y":1.75, "w":1.25, "matrix": [2,4]},
{"label":"K01", "x":1.75, "y":4.5, "w":1.25, "matrix": [3,0]},
{"label":"K07", "x":3, "y":4.5, "w":1.25, "matrix": [3,1]},
{"label":"K13", "x":4.25, "y":4.5, "w":1.25, "matrix": [3,2]},
{"label":"K19", "x":5.5, "y":4.5, "w":1.25, "matrix": [3,3]},
{"label":"rgt", "x":10.75, "y":1.75, "w":1.25, "matrix": [3,4]},
{"label":"K00", "x":1.75, "y":5.5, "w":1.25, "matrix": [4,0]},
{"label":"K06", "x":3, "y":5.5, "w":1.25, "matrix": [4,1]},
{"label":"K12", "x":4.25, "y":5.5, "w":1.25, "matrix": [4,2]},
{"label":"K18", "x":5.5, "y":5.5, "w":1.25, "matrix": [4,3]},
{"label":"up ", "x":9.5, "y":0.75, "w":1.25, "matrix": [4,4]},
{"label":"K05", "x":0, "y":3.25, "w":1.75, "matrix": [5,0]},
{"label":"lyr", "x":7.5, "y":5, "w":1.5, "matrix": [5,1]},
{"label":"K17", "x":10.75, "y":4.75, "w":1.5, "matrix": [5,2]},
{"label":"K23", "x":6.75, "y":3.25, "w":1.5, "matrix": [5,3]},
{"label":"spc", "x":10.75, "y":3.75, "w":1.25, "matrix": [5,4]}
]
}
}
}

+ 168
- 0
keyboards/handwired/replicazeron/keymaps/default/keymap.c View File

@ -0,0 +1,168 @@
/* Copyright 2023 9R
*
* 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/>.
*/
#ifdef LEDS_ENABLE
# include "../common/leds.h"
#endif
#ifdef OLED_ENABLE
# include "../common/oled.h"
#endif
#ifdef THUMBSTICK_ENABLE
# include "../common/thumbstick.h"
#endif
#include "../common/state.h"
controller_state_t controller_state ;
#ifndef OLED_ENABLE
enum keymap_layers {
LAYER_BASE = 0,
LAYER_SHOOTER,
LAYER_MISC,
LAYER_SETTINGS,
};
#endif
enum custom_keycodes {
JOYMODE = SAFE_RANGE,
AUTORUN,
M_UP,
M_DWN,
M_L,
M_R,
M_SEL
};
//////////// Status LEDs //////////////
#ifdef LEDS_ENABLE
void keyboard_pre_init_user(void) {
init_leds() ;
}
#endif
//////////// WASD THUMBSTICK //////////////
#ifdef THUMBSTICK_ENABLE
void matrix_init_user(void) {
init_wasd_state() ;
controller_state = init_state();
}
void matrix_scan_user(void) {
if (controller_state.wasdMode) {
thumbstick (controller_state);
}
}
#endif
#ifdef JOYSTICK_ENABLE
//joystick config
joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
JOYSTICK_AXIS_IN(B0, 0, 512, 1023),
JOYSTICK_AXIS_IN(B1, 0, 512, 1023)
};
#endif
//////////// KEYMAPS //////////////
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_GRV, KC_ESC, KC_J, KC_M, KC_RIGHT, // up
KC_T, KC_3, KC_4, KC_R, KC_ENT, // forward
KC_X, KC_LCTL, KC_LCTL, KC_LALT, KC_DOWN, // down
KC_LSFT, KC_SPC, KC_C, KC_F, KC_LEFT, // back 2
KC_LSFT, KC_6, KC_Z, KC_V, KC_UP, // back 1
KC_TAB, TG(1), KC_I, KC_B, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_SHOOTER] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_NO, KC_NO, KC_NO, KC_NO, KC_RIGHT, // up
KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, // forward
KC_NO, KC_NO, KC_NO, KC_NO, KC_DOWN, // down
KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, // back 2
KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, // back 1
KC_NO, TG(2), KC_NO, KC_NO, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_MISC] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_NO, KC_NO, KC_NO, KC_NO, KC_RIGHT, // up
KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, // forward
KC_NO, KC_NO, KC_NO, KC_NO, KC_DOWN, // down
KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, // back 2
KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, // back 1
KC_NO, TG(3), KC_NO, KC_NO, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_SETTINGS] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
RGB_M_P, RGB_M_B, RGB_M_K, RGB_M_T, KC_RIGHT, // up
KC_NO, RGB_SAI, RGB_VAI, RGB_HUI, KC_ENT, // forward
RGB_TOG, KC_NO, KC_NO, KC_NO , KC_DOWN, // down
EE_CLR, RGB_SAD, RGB_VAD, RGB_HUD, KC_LEFT, // back 2
QK_BOOT, AUTORUN, JOYMODE, KC_V, KC_UP, // back 1
RGB_MOD, TO(0), KC_NO, RGB_RMOD, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
)
};
//////////// Change modes on keypress //////////////
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (keycode == JOYMODE && record->event.pressed) {
if (!controller_state.wasdMode) {
controller_state.wasdMode = true;
} else if (controller_state.wasdMode && !controller_state.wasdShiftMode) {
controller_state.wasdShiftMode = true;
} else {
controller_state.wasdMode = false;
controller_state.wasdShiftMode = false;
}
} else if (keycode == AUTORUN && record->event.pressed) {
if (!controller_state.autoRun) {
controller_state.autoRun = true;
register_code(KC_W);
} else {
controller_state.autoRun = false;
unregister_code(KC_W);
}
}
return true;
};
//////////// Draw OLED menu //////////////
#ifdef OLED_ENABLE
bool oled_task_user(void) {
draw_oled(controller_state);
return false;
}
#endif
//////////// Handle layer changes //////////////
layer_state_t layer_state_set_user(layer_state_t state) {
controller_state.activeLayer = get_highest_layer(state) ;
#ifdef LEDS_ENABLE
set_leds(controller_state.activeLayer) ;
#endif
return state ;
}

+ 2
- 0
keyboards/handwired/replicazeron/keymaps/default/readme.md View File

@ -0,0 +1,2 @@
# Replicazeron Gamepad
Default layout with 2 axies thumbstick

+ 15
- 0
keyboards/handwired/replicazeron/keymaps/default/rules.mk View File

@ -0,0 +1,15 @@
ifeq ($(strip $(LEDS_ENABLE)), yes)
OPT_DEFS += -DLEDS_ENABLE
SRC += ../common/leds.c
endif
ifeq ($(strip $(OLED_ENABLE)), yes)
SRC += ../common/oled.c
endif
ifeq ($(strip $(THUMBSTICK_ENABLE)), yes)
# POINTING_DEVICE_ENABLE = yes
OPT_DEFS += -DTHUMBSTICK_ENABLE
SRC += analog.c
SRC += ../common/thumbstick.c
endif

+ 168
- 0
keyboards/handwired/replicazeron/keymaps/via/keymap.c View File

@ -0,0 +1,168 @@
/* Copyright 2023 9R
*
* 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/>.
*/
#ifdef LEDS_ENABLE
# include "../common/leds.h"
#endif
#ifdef OLED_ENABLE
# include "../common/oled.h"
#endif
#ifdef THUMBSTICK_ENABLE
# include "../common/thumbstick.h"
#endif
#include "../common/state.h"
controller_state_t controller_state ;
#ifndef OLED_ENABLE
enum keymap_layers {
LAYER_BASE = 0,
LAYER_SHOOTER,
LAYER_MISC,
LAYER_SETTINGS,
};
#endif
enum custom_keycodes {
JOYMODE = SAFE_RANGE,
AUTORUN,
M_UP,
M_DWN,
M_L,
M_R,
M_SEL
};
//////////// Status LEDs //////////////
#ifdef LEDS_ENABLE
void keyboard_pre_init_user(void) {
init_leds() ;
}
#endif
//////////// WASD THUMBSTICK //////////////
#ifdef THUMBSTICK_ENABLE
void matrix_init_user(void) {
init_wasd_state() ;
controller_state = init_state();
}
void matrix_scan_user(void) {
if (controller_state.wasdMode) {
thumbstick (controller_state);
}
}
#endif
#ifdef JOYSTICK_ENABLE
//joystick config
joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
JOYSTICK_AXIS_IN(B0, 0, 512, 1023),
JOYSTICK_AXIS_IN(B1, 0, 512, 1023)
};
#endif
//////////// KEYMAPS //////////////
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_GRV, KC_ESC, KC_J, KC_M, KC_RIGHT, // up
KC_T, KC_3, KC_4, KC_R, KC_ENT, // forward
KC_X, KC_LCTL, KC_LCTL, KC_LALT, KC_DOWN, // down
KC_LSFT, KC_SPC, KC_C, KC_F, KC_LEFT, // back 2
KC_LSFT, KC_6, KC_Z, KC_V, KC_UP, // back 1
KC_TAB, TG(1), KC_I, KC_B, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_SHOOTER] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_NO, KC_NO, KC_NO, KC_NO, KC_RIGHT, // up
KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, // forward
KC_NO, KC_NO, KC_NO, KC_NO, KC_DOWN, // down
KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, // back 2
KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, // back 1
KC_NO, TG(2), KC_NO, KC_NO, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_MISC] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
KC_NO, KC_NO, KC_NO, KC_NO, KC_RIGHT, // up
KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, // forward
KC_NO, KC_NO, KC_NO, KC_NO, KC_DOWN, // down
KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, // back 2
KC_NO, KC_NO, KC_NO, KC_NO, KC_UP, // back 1
KC_NO, TG(3), KC_NO, KC_NO, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
),
[LAYER_SETTINGS] = LAYOUT(
// | little | ring | middle | index | 5way-dpad | -finger
RGB_M_P, RGB_M_B, RGB_M_K, RGB_M_T, KC_RIGHT, // up
KC_NO, RGB_SAI, RGB_VAI, RGB_HUI, KC_ENT, // forward
RGB_TOG, KC_NO, KC_NO, KC_NO , KC_DOWN, // down
EE_CLR, RGB_SAD, RGB_VAD, RGB_HUD, KC_LEFT, // back 2
QK_BOOT, AUTORUN, JOYMODE, KC_V, KC_UP, // back 1
RGB_MOD, TO(0), KC_NO, RGB_RMOD, KC_P // special
// ^side_l | ^case | ^thumb | ^side_r | ^analog click <= special row mapping
)
};
//////////// Change modes on keypress //////////////
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (keycode == JOYMODE && record->event.pressed) {
if (!controller_state.wasdMode) {
controller_state.wasdMode = true;
} else if (controller_state.wasdMode && !controller_state.wasdShiftMode) {
controller_state.wasdShiftMode = true;
} else {
controller_state.wasdMode = false;
controller_state.wasdShiftMode = false;
}
} else if (keycode == AUTORUN && record->event.pressed) {
if (!controller_state.autoRun) {
controller_state.autoRun = true;
register_code(KC_W);
} else {
controller_state.autoRun = false;
unregister_code(KC_W);
}
}
return true;
};
//////////// Draw OLED menu //////////////
#ifdef OLED_ENABLE
bool oled_task_user(void) {
draw_oled(controller_state);
return false;
}
#endif
//////////// Handle layer changes //////////////
layer_state_t layer_state_set_user(layer_state_t state) {
controller_state.activeLayer = get_highest_layer(state) ;
#ifdef LEDS_ENABLE
set_leds(controller_state.activeLayer) ;
#endif
return state ;
}

+ 2
- 0
keyboards/handwired/replicazeron/keymaps/via/readme.md View File

@ -0,0 +1,2 @@
# Replicazeron Gamepad - via layout
VIA layout with 2 axies thumbstick

+ 16
- 0
keyboards/handwired/replicazeron/keymaps/via/rules.mk View File

@ -0,0 +1,16 @@
VIA_ENABLE = yes
ifeq ($(strip $(LEDS_ENABLE)), yes)
OPT_DEFS += -DLEDS_ENABLE
SRC += ../common/leds.c
endif
ifeq ($(strip $(OLED_ENABLE)), yes)
SRC += ../common/oled.c
endif
ifeq ($(strip $(THUMBSTICK_ENABLE)), yes)
# POINTING_DEVICE_ENABLE = yes
OPT_DEFS += -DTHUMBSTICK_ENABLE
SRC += analog.c
SRC += ../common/thumbstick.c
endif

+ 55
- 0
keyboards/handwired/replicazeron/promicro/config.h View File

@ -0,0 +1,55 @@
/* Copyright 2023 9R
*
* 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
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 5
/* joystick configuration */
#define JOYSTICK_BUTTON_COUNT 0
#define JOYSTICK_AXIS_COUNT 2
#define JOYSTICK_AXIS_RESOLUTION 10
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
//////////////////////////////
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define STATUS_LED_A_PIN D2
#define STATUS_LED_B_PIN D3
#ifdef RGBLIGHT_ENABLE
#define RGB_DI_PIN B14
#define RGBLED_NUM 6
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_TWINKLE
#endif
#define THUMBSTICK_DEBUG

+ 9
- 0
keyboards/handwired/replicazeron/promicro/info.json View File

@ -0,0 +1,9 @@
{
"matrix_pins": {
"cols": [ "C6", "D4", "D7", "E6", "F7" ],
"rows": [ "B1", "B3", "B2", "B6", "B5", "B4" ]
},
"diode_direction": "COL2ROW",
"processor": "atmega32u4",
"bootloader": "qmk-dfu"
}

+ 25
- 0
keyboards/handwired/replicazeron/promicro/promicro.c View File

@ -0,0 +1,25 @@
/* Copyright 2023 9R
*
* 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 "promicro.h"
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}

+ 17
- 0
keyboards/handwired/replicazeron/promicro/promicro.h View File

@ -0,0 +1,17 @@
/* Copyright 2023 9R
*
* 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 "quantum.h"

+ 29
- 0
keyboards/handwired/replicazeron/promicro/rules.mk View File

@ -0,0 +1,29 @@
# Build Options
# change yes to no to disable
#
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
MOUSEKEY_ENABLE = no # Mouse keys
EXTRAKEY_ENABLE = no # Audio control and System control
CONSOLE_ENABLE = no # Console for debug
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
TAP_DANCE_ENABLE = no # Tap Dance
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
LTO_ENABLE = yes
##########
QMK_SETTINGS = yes
LEDS_ENABLE = yes
THUMBSTICK_ENABLE = yes
SRC += ../common/state.c

+ 69
- 0
keyboards/handwired/replicazeron/readme.md View File

@ -0,0 +1,69 @@
# Replicazeron
This is a config to run a 3dprinted keyboard controller with qmk based on this project:
https://sites.google.com/view/alvaro-rosati/azeron-keypad-diy-tutorial
Some additional and redesigned files (i.e. for the OLED-display) can be found here:
https://github.com/9R/replicazeron
![Replicazeron](https://github.com/9R/replicazeron/blob/main/images/replicazeron.JPG?raw=true)
## Features
* 23 keys
* analog stick with WASD emulation
* 5way dpad
* 2 status LEDS
* 6x WS2812 RGB-LED lighting
## Supported MCUs
Currently configs for STM32F103 and atmega32U4 are available, but STM32 is recommended, since the atmega may run out of flash with all features enabled.
With minor adjustments to Pinconfig it should be possible to use other MCUs that are supported by QMK
## Wirering
Full schematics can be found in this repo:
https://github.com/9R/replicazeron_schematics
### Rows
|row| promiro gpios | promicro pin | stm32F103 gpios | color |
----------------------------------------------------------------
| 0 | B1 | 15 | B15 | red |
| 1 | B3 | 14 | A8 | blue |
| 2 | B2 | 16 | A9 | yellow |
| 3 | B6 | 10 | A10 | brown |
| 4 | B5 | 9 | A15 | orange |
| 5 | B4 | 8 | B3 | green |
### Columns
|col| promiro gpios | promicro pin | stm32F103 gpios | color |
----------------------------------------------------------------
| 0 | C6 | 5 | A7 | white |
| 1 | D4 | 4 | A6 | grey |
| 2 | D7 | 6 | A5 | violet |
| 3 | E6 | 7 | A4 | grey |
| 4 | F7 | A0 | B4 | white |
### Analog
| promicro gpio | stm32F103 gpio | pin | color |
------------------------------------------------
| GND | GND | GND | white |
| VCC | VCC | VCC | red |
| F4 | B1 | VRx | brown |
| F5 | B0 | VRy | yellow|
| | | SW | blue |
### OLED
| promicro gpio | stm32F103 gpio | pin | color |
------------------------------------------------
| GND | GND | GND | white |
| VCC | VCC | VCC | red |
| D4 | B10 | SDA | green |
| C6 | B11 | SCL | yellow|

+ 57
- 0
keyboards/handwired/replicazeron/stm32f103/config.h View File

@ -0,0 +1,57 @@
/* Copyright 2023 9R
*
* 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
/* key matrix size */
#define MATRIX_ROWS 6
#define MATRIX_COLS 5
/* joystick configuration */
#define JOYSTICK_BUTTON_COUNT 0
#define JOYSTICK_AXIS_COUNT 2
#define JOYSTICK_AXIS_RESOLUTION 10
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* Use I2C2 */
#define I2C_DRIVER I2CD2
#define I2C1_SDA_PIN B11
#define I2C1_SCL_PIN B10
/* Locking resynchronize hack */
#define LOCKING_RESYNC_ENABLE
//////////////////////////////
#define DYNAMIC_KEYMAP_LAYER_COUNT 4
#define STATUS_LED_A_PIN B13
#define STATUS_LED_B_PIN B12
#define RGB_DI_PIN B14
#define RGBLED_NUM 6
#define RGBLIGHT_EFFECT_BREATHING
#define RGBLIGHT_EFFECT_KNIGHT
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
#define RGBLIGHT_EFFECT_RGB_TEST
#define RGBLIGHT_EFFECT_TWINKLE
#define THUMBSTICK_DEBUG

+ 27
- 0
keyboards/handwired/replicazeron/stm32f103/halconf.h View File

@ -0,0 +1,27 @@
/* Copyright 2023 9R
*
* 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
//enable i2c
#define HAL_USE_I2C TRUE
#define HAL_USE_PWM TRUE
//enable adc
#define HAL_USE_ADC TRUE
#include_next <halconf.h>

+ 9
- 0
keyboards/handwired/replicazeron/stm32f103/info.json View File

@ -0,0 +1,9 @@
{
"matrix_pins": {
"cols": ["A7", "A6", "A5", "A4", "B4"],
"rows": [ "B15", "A8", "A9", "A10", "A15", "B3" ]
},
"diode_direction": "COL2ROW",
"processor": "STM32F103",
"bootloader": "stm32duino"
}

+ 31
- 0
keyboards/handwired/replicazeron/stm32f103/mcuconf.h View File

@ -0,0 +1,31 @@
/* Copyright 2022 9R
*
* 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_next <mcuconf.h>
//enable i2c for OLED
#undef STM32_I2C_USE_I2C2
#define STM32_I2C_USE_I2C2 TRUE
#undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE
//enable ADC for thumbstick
#undef STM32_ADC_USE_ADC1
#define STM32_ADC_USE_ADC1 TRUE

+ 33
- 0
keyboards/handwired/replicazeron/stm32f103/rules.mk View File

@ -0,0 +1,33 @@
# 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 = no # Commands for debug and configuration
NKRO_ENABLE = yes # Enable N-Key Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
AUDIO_ENABLE = no # Audio output
TAP_DANCE_ENABLE = no # Tap Dance
JOYSTICK_ENABLE = yes
JOYSTICK_DRIVER = analog
OLED_ENABLE = yes
OLED_DRIVER = SSD1306
OLED_BRIGHTNESS = 32
LTO_ENABLE = yes
# Enter lower-power sleep mode when on the ChibiOS idle thread
OPT_DEFS += -DCORTEX_ENABLE_WFI_IDLE=TRUE
##########
QMK_SETTINGS = yes
LEDS_ENABLE = yes
THUMBSTICK_ENABLE = yes
SRC += ../common/state.c

+ 25
- 0
keyboards/handwired/replicazeron/stm32f103/stm32f103.c View File

@ -0,0 +1,25 @@
/* Copyright 2023 9R
*
* 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 "stm32f103.h"
void keyboard_post_init_user(void) {
// Customise these values to desired behaviour
debug_enable=true;
debug_matrix=true;
//debug_keyboard=true;
//debug_mouse=true;
}

+ 17
- 0
keyboards/handwired/replicazeron/stm32f103/stm32f103.h View File

@ -0,0 +1,17 @@
/* Copyright 2023 9R
*
* 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 "quantum.h"

Loading…
Cancel
Save