qmk_sweep_skeletyl/keyboards/mechwild/puckbuddy/puckbuddy.h
Kyle McCreery 7019d0bce8
[Keyboard] MechWild Puckbuddy (#17161)
* Initial commit

* testing modes

* working on puckbuddy firmware. This is all working for now but need to clean it up and personalize it.

* needs to be updated from vial build

* prepping for PR

* added rgb mode cycling to fn1 since it isn't on the encoder for these maps

* readme written in preparation for pr

* reverting driver print line

* Removed old reference to OBE in the readme from copypaste error

* applying changes based on review

* applying changes from review

* Update keyboards/mechwild/puckbuddy/puckbuddy.c

* trailing whitespaces removed

* added clear screen condition for switching back to name rendering

* Added uf2 keymap and fixed display glitch for the logo render art.

* Removed extra definition of FEE_PAGE_BASE_ADDRESS

* Removed the uf2 keymap and made it automatic when selecting bootloader instead

* Fixed the bad bootloader check

* moved the uf2 check from rules.mk to post_rules.mk to satisfy lint

* changing it back to stm32-dfu bootloader default

* Fixed RGBLIGHT enable oversight.

* Added persistent dynamic tapping configuration for the cirque touchpad tap term

* new lines at end of files for formatting and diff sanity

* changing default bootloader back to stm32-dfu

* Had to completely redefine the tap keycodes instead of using the DT_UP and DT_DOWN keycodes because I was not able to specify them easily in the via/vial configs and this allows me to keep the original functionality instead of tying it to eeprom like these are.

* Added tap toggling keycodes to quick enable and disable the tapping term

* working out an issue where the tap status keeps turning to off on power cycle

* correcting submodule garbo

* Fixed display issue and rewrote TAP config approach to make it a little easier to control

* removing backup puckbuddy.c code

* Added some comment, removed some commented out old code, removed trailing whitespace

* Changed to handle tinyuf2 by expecting emulated eeprom so that adding other forms of eeprom can be handled for the memory offset separately, and added user oled conditional inside the keyboard oled code block

* Updated default keymaps to have the tap and dpi keys on by default

* Apply suggestions from code review

* Apply suggestions from code review
2022-08-09 17:23:44 -07:00

56 lines
1.2 KiB
C

// Copyright 2022 Kyle McCreery (@kylemccreery)
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "quantum.h"
#define ___ KC_NO
/* This is a shortcut to help you visually see your layout.
*
* The first section contains all of the arguments representing the physical
* layout of the board and position of the keys.
*
* The second converts the arguments into a two-dimensional array which
* represents the switch matrix.
*/
#define LAYOUT( \
k00, k01, k02, k03, k05,\
k10, k15,\
k20, k25,\
k30, k35,\
k31, k32, k33, k34 \
) { \
{ k00, k01, k05, k31 }, \
{ k10, k02, k15, k32 }, \
{ k20, k03, k25, k33 }, \
{ k30, ___, k35, k34 } \
}
typedef union {
uint32_t raw;
struct {
uint8_t dpi_config;
int16_t dt_term_config;
};
} keyboard_config_t;
extern keyboard_config_t keyboard_config;
extern uint16_t dpi_array[];
enum keyboard_keycodes {
#ifdef VIA_ENABLE
DPI_UP = USER00,
#else
DPI_UP = SAFE_RANGE,
#endif
DPI_DN,
DPI_FINE,
TAP_UP,
TAP_DN,
TAP_ON,
TAP_OFF,
TAP_TOG,
NEW_SAFE_RANGE
};