Skip to content

Commit

Permalink
Merge branch 'chunky2023' of https://github.com/freznel10/qmk_firmware
Browse files Browse the repository at this point in the history
…into chunky2023
  • Loading branch information
freznel10 committed Jun 19, 2023
2 parents a68e9f0 + ce2c38e commit 8b245ff
Show file tree
Hide file tree
Showing 1,669 changed files with 888,715 additions and 4,150 deletions.
1 change: 1 addition & 0 deletions .vscode/.cortex-debug.peripherals.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
1 change: 1 addition & 0 deletions .vscode/.cortex-debug.registers.state.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[]
44 changes: 2 additions & 42 deletions builddefs/common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -134,49 +134,9 @@ ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/mousekey.c
endif

VALID_POINTING_DEVICE_DRIVER_TYPES := adns5050 adns9800 analog_joystick cirque_pinnacle_i2c cirque_pinnacle_spi paw3204 pmw3320 pmw3360 pmw3389 pimoroni_trackball custom
POINTING_DEVICE_ENABLE ?= no
ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
ifeq ($(filter $(POINTING_DEVICE_DRIVER),$(VALID_POINTING_DEVICE_DRIVER_TYPES)),)
$(call CATASTROPHIC_ERROR,Invalid POINTING_DEVICE_DRIVER,POINTING_DEVICE_DRIVER="$(POINTING_DEVICE_DRIVER)" is not a valid pointing device type)
else
OPT_DEFS += -DPOINTING_DEVICE_ENABLE
MOUSE_ENABLE := yes
VPATH += $(QUANTUM_DIR)/pointing_device
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_drivers.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_auto_mouse.c
ifneq ($(strip $(POINTING_DEVICE_DRIVER)), custom)
SRC += drivers/sensors/$(strip $(POINTING_DEVICE_DRIVER)).c
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(shell echo $(POINTING_DEVICE_DRIVER) | tr '[:lower:]' '[:upper:]'))
endif
OPT_DEFS += -DPOINTING_DEVICE_DRIVER_$(strip $(POINTING_DEVICE_DRIVER))
ifeq ($(strip $(POINTING_DEVICE_DRIVER)), adns9800)
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
QUANTUM_LIB_SRC += spi_master.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), analog_joystick)
OPT_DEFS += -DSTM32_ADC -DHAL_USE_ADC=TRUE
LIB_SRC += analog.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_i2c)
OPT_DEFS += -DSTM32_I2C -DHAL_USE_I2C=TRUE
SRC += drivers/sensors/cirque_pinnacle.c
SRC += drivers/sensors/cirque_pinnacle_gestures.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
QUANTUM_LIB_SRC += i2c_master.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), cirque_pinnacle_spi)
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
SRC += drivers/sensors/cirque_pinnacle.c
SRC += drivers/sensors/cirque_pinnacle_gestures.c
SRC += $(QUANTUM_DIR)/pointing_device/pointing_device_gestures.c
QUANTUM_LIB_SRC += spi_master.c
else ifeq ($(strip $(POINTING_DEVICE_DRIVER)), pimoroni_trackball)
OPT_DEFS += -DSTM32_SPI -DHAL_USE_I2C=TRUE
QUANTUM_LIB_SRC += i2c_master.c
else ifneq ($(filter $(strip $(POINTING_DEVICE_DRIVER)),pmw3360 pmw3389),)
OPT_DEFS += -DSTM32_SPI -DHAL_USE_SPI=TRUE
SRC += drivers/sensors/pmw33xx_common.c
QUANTUM_LIB_SRC += spi_master.c
endif
endif
include $(QUANTUM_DIR)/pointing_device/rules.mk
endif

QUANTUM_PAINTER_ENABLE ?= no
Expand Down
3 changes: 1 addition & 2 deletions data/constants/keycodes/keycodes_0.0.1.hjson
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"0x52C0/0x001F": {
"define": "QK_LAYER_TAP_TOGGLE"
},
// 0x52E0/0x001F - UNUSED
// 0x5300/0x02FF - UNUSED
"0x5600/0x00FF": {
"define": "QK_SWAP_HANDS"
Expand Down Expand Up @@ -93,4 +92,4 @@
"key": "SAFE_RANGE"
}
}
}
}
3 changes: 0 additions & 3 deletions data/constants/keycodes/keycodes_0.0.2.hjson
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
{
"ranges": {
"0x7E00/0x00FF": "!delete!",
"0x7F00/0x00FF": "!delete!",

"0x7E00/0x003F": {
"define": "QK_KB"
},
Expand Down
13 changes: 13 additions & 0 deletions data/constants/keycodes/keycodes_0.0.3.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"ranges": {
"0x52E0/0x000F": {
"define": "QK_POINTING_MODE_MO"
},
"0x52F0/0x000F": {
"define": "QK_POINTING_MODE_TG"
},
"0x5300/0x0002": {
"define": "QK_POINTING_MODE_UTIL"
}
}
}
28 changes: 28 additions & 0 deletions data/constants/keycodes/keycodes_0.0.3_pointing_mode_util.hjson
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"keycodes": {
"0x5300": {
"group": "pointing_mode_util",
"key": "QK_PM_CYCLE_DEVICES",
"label": "Cycle pointing mode device",
"aliases": [
"PMR_CYD"
]
},
"0x5301": {
"group": "pointing_mode_util",
"key": "QK_PM_DEVICE_RIGHT",
"label": "Set pointing mode device to PM_RIGHT_SIDE",
"aliases": [
"PMR_RGHT"
]
},
"0x5302": {
"group": "pointing_mode_util",
"key": "QK_PM_DEVICE_LEFT",
"label": "Set pointing mode device to PM_LEFT_SIDE",
"aliases": [
"PMR_LEFT"
]
}
}
}
1 change: 0 additions & 1 deletion data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,6 @@
"stm32-dfu",
"stm32duino",
"tinyuf2",
"uf2boot",
"unknown",
"usbasploader",
"wb32-dfu"
Expand Down
2 changes: 2 additions & 0 deletions data/templates/config-overrides/common/lv_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@

// #undef LV_COLOR_16_SWAP
// #define LV_COLOR_16_SWAP 0


4 changes: 2 additions & 2 deletions docs/feature_joystick.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ When defining axes for your joystick, you must provide a definition array typica
For instance, the below example configures two axes. The X axis is read from the `A4` pin. With the default axis resolution of 8 bits, the range of values between 900 and 575 are scaled to -127 through 0, and values 575 to 285 are scaled to 0 through 127. The Y axis is configured as a virtual axis, and its value is not read from any pin. Instead, the user must update the axis value programmatically.
```c
joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
JOYSTICK_AXIS_IN(A4, 900, 575, 285),
JOYSTICK_AXIS_VIRTUAL
};
Expand All @@ -64,7 +64,7 @@ The `low` and `high` values can be swapped to effectively invert the axis.
The following example adjusts two virtual axes (X and Y) based on keypad presses, with `KC_P0` as a precision modifier:

```c
joystick_config_t joystick_axes[JOYSTICK_AXIS_COUNT] = {
joystick_config_t joystick_axes[JOYSTICK_AXES_COUNT] = {
JOYSTICK_AXIS_VIRTUAL, // x
JOYSTICK_AXIS_VIRTUAL // y
};
Expand Down
4 changes: 2 additions & 2 deletions docs/feature_layers.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ There are a number of functions (and variables) related to how you can use or ma

|Function |Description |
|----------------------------------------------|---------------------------------------------------------------------------------------------------------|
| `layer_state_set(layer_mask)` | Directly sets the layer state (avoid unless you know what you are doing). |
| `layer_state_set(layer_mask)` | Directly sets the layer state (recommended, do not use unless you know what you are doing). |
| `layer_clear()` | Clears all layers (turns them all off). |
| `layer_move(layer)` | Turns specified layer on, and all other layers off. |
| `layer_on(layer)` | Turns specified layer on, leaves all other layers in existing state. |
Expand All @@ -69,7 +69,7 @@ There are a number of functions (and variables) related to how you can use or ma
| `layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing layer state. |
| `layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing layer state. |
| `layer_debug(layer_mask)` | Prints out the current bit mask and highest active layer to debugger console. |
| `default_layer_set(layer_mask)` | Directly sets the default layer state (avoid unless you know what you are doing). |
| `default_layer_set(layer_mask)` | Directly sets the default layer state (recommended, do not use unless you know what you are doing). |
| `default_layer_or(layer_mask)` | Turns on layers based on matching bits between specifed layer and existing default layer state. |
| `default_layer_and(layer_mask)` | Turns on layers based on matching enabled bits between specifed layer and existing default layer state. |
| `default_layer_xor(layer_mask)` | Turns on layers based on non-matching bits between specifed layer and existing default layer state. |
Expand Down
Loading

0 comments on commit 8b245ff

Please sign in to comment.