diff options
86 files changed, 202 insertions, 1008 deletions
diff --git a/builddefs/bootloader.mk b/builddefs/bootloader.mk index 9f55536423..31004cab98 100644 --- a/builddefs/bootloader.mk +++ b/builddefs/bootloader.mk @@ -116,13 +116,13 @@ ifeq ($(strip $(BOOTLOADER)), caterina) BOOTLOADER_SIZE = 4096 endif -ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID)) +ifeq ($(strip $(BOOTLOADER)), bootloadhid) OPT_DEFS += -DBOOTLOADER_BOOTLOADHID BOOTLOADER_TYPE = bootloadhid BOOTLOADER_SIZE = 4096 endif -ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp)) +ifeq ($(strip $(BOOTLOADER)), usbasploader) OPT_DEFS += -DBOOTLOADER_USBASP BOOTLOADER_TYPE = usbasploader diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json index 582b5149ea..d0f67f4e3a 100644 --- a/data/mappings/info_config.json +++ b/data/mappings/info_config.json @@ -40,7 +40,7 @@ "LED_COMPOSE_PIN": {"info_key": "indicators.compose"}, "LED_KANA_PIN": {"info_key": "indicators.kana"}, "LED_PIN_ON_STATE": {"info_key": "indicators.on_state", "value_type": "int"}, - "MANUFACTURER": {"info_key": "manufacturer"}, + "MANUFACTURER": {"info_key": "manufacturer", "value_type": "str"}, "MATRIX_HAS_GHOST": {"info_key": "matrix_pins.ghost", "value_type": "bool"}, "MATRIX_IO_DELAY": {"info_key": "matrix_pins.io_delay", "value_type": "int"}, "MOUSEKEY_DELAY": {"info_key": "mousekey.delay", "value_type": "int"}, @@ -78,7 +78,7 @@ "RGBLIGHT_SLEEP": {"info_key": "rgblight.sleep", "value_type": "bool"}, "RGBLIGHT_SPLIT": {"info_key": "rgblight.split", "value_type": "bool"}, "RGBW": {"info_key": "rgblight.rgbw", "value_type": "bool"}, - "PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false}, + "PRODUCT": {"info_key": "keyboard_name", "warn_duplicate": false, "value_type": "str"}, "PRODUCT_ID": {"info_key": "usb.pid", "value_type": "hex"}, "VENDOR_ID": {"info_key": "usb.vid", "value_type": "hex"}, "QMK_ESC_OUTPUT": {"info_key": "qmk_lufa_bootloader.esc_output"}, diff --git a/data/mappings/info_rules.json b/data/mappings/info_rules.json index 3f140277fe..87a4b795b6 100644 --- a/data/mappings/info_rules.json +++ b/data/mappings/info_rules.json @@ -12,7 +12,7 @@ # replace_with: use with a key marked deprecated or invalid to designate a replacement "BOARD": {"info_key": "board"}, "BOOTLOADER": {"info_key": "bootloader", "warn_duplicate": false}, - "BLUETOOTH": {"info_key": "bluetooth.driver"}, + "BLUETOOTH_DRIVER": {"info_key": "bluetooth.driver"}, "CAPS_WORD_ENABLE": {"info_key": "caps_word.enabled", "value_type": "bool"}, "ENCODER_ENABLE": {"info_key": "encoder.enabled", "value_type": "bool"}, "FIRMWARE_FORMAT": {"info_key": "build.firmware_format"}, diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 0308f45116..e425d13dd8 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -75,8 +75,7 @@ "driver": { "type": "string", "enum": ["BluefruitLE", "RN42"] - }, - "lto": {"type": "boolean"} + } } }, "board": { @@ -89,7 +88,6 @@ "enum": [ "atmel-dfu", "bootloadhid", - "bootloadHID", "caterina", "custom", "gd32v-dfu", @@ -106,7 +104,6 @@ "tinyuf2", "unknown", "usbasploader", - "USBasp", "wb32-dfu" ] }, diff --git a/docs/config_options.md b/docs/config_options.md index 3e011a5cc9..05e27a835c 100644 --- a/docs/config_options.md +++ b/docs/config_options.md @@ -39,11 +39,11 @@ This is a C header file that is one of the first things included, and will persi * defines your VID, and for most DIY projects, can be whatever you want * `#define PRODUCT_ID 0x5678` * defines your PID, and for most DIY projects, can be whatever you want -* `#define DEVICE_VER 0` +* `#define DEVICE_VER 0x0100` * defines the device version (often used for revisions) -* `#define MANUFACTURER Me` +* `#define MANUFACTURER "Me"` * generally who/whatever brand produced the board -* `#define PRODUCT Board` +* `#define PRODUCT "Board"` * the name of the keyboard * `#define MATRIX_ROWS 5` * the number of rows in your keyboard's matrix diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index fdde03ac23..f93ab9fd2d 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -88,6 +88,14 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { #endif ``` +Using encoder mapping pumps events through the normal QMK keycode processing pipeline, resulting in a _keydown/keyup_ combination pushed through `process_record_xxxxx()`. To configure the amount of time between the encoder "keyup" and "keydown", you can add the following to your `config.h`: + +```c +#define ENCODER_MAP_KEY_DELAY 10 +``` + +?> By default, the encoder map delay matches the value of `TAP_CODE_DELAY`. + ## Callbacks When not using `ENCODER_MAP_ENABLE = yes`, the callback functions can be inserted into your `<keyboard>.c`: @@ -119,7 +127,7 @@ bool encoder_update_user(uint8_t index, bool clockwise) { } ``` -!> If you return `true`, it will allow the keyboard level code to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard function is set up. +!> If you return `true`, it will allow the keyboard level code to run as well. Returning `false` will override the keyboard level code, depending on how the keyboard function is set up. Layer conditions can also be used with the callback function like the following: @@ -172,7 +180,7 @@ The A an B lines of the encoders should be wired directly to the MCU, and the C/ Multiple encoders may share pins so long as each encoder has a distinct pair of pins when the following conditions are met: - using detent encoders - pads must be high at the detent stability point which is called 'default position' in QMK -- no more than two encoders sharing a pin can be turned at the same time +- no more than two encoders sharing a pin can be turned at the same time For example you can support two encoders using only 3 pins like this ``` @@ -185,4 +193,4 @@ You could even support three encoders using only three pins (one per encoder) ho #define ENCODERS_PAD_A { B1, B1, B2 } #define ENCODERS_PAD_B { B2, B3, B3 } ``` -Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case +Here rotating Encoder 0 `B1 B2` and Encoder 1 `B1 B3` could be interpreted as rotating Encoder 2 `B2 B3` or `B3 B2` depending on the timing. This may still be a useful configuration depending on your use case diff --git a/docs/feature_pointing_device.md b/docs/feature_pointing_device.md index 999dd1272d..afc57ed493 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -487,3 +487,13 @@ report_mouse_t pointing_device_task_combined_user(report_mouse_t left_report, re return pointing_device_combine_reports(left_report, right_report); } ``` + +# Troubleshooting + +If you are having issues with pointing device drivers debug messages can be enabled that will give you insights in the inner workings. To enable these add to your keyboards `config.h` file: + +```c +#define POINTING_DEVICE_DEBUG +``` + +?> The messages will be printed out to the `CONSOLE` output. For additional information, refer to [Debugging/Troubleshooting QMK](faq_debug.md). diff --git a/drivers/sensors/cirque_pinnacle.c b/drivers/sensors/cirque_pinnacle.c index 8bd4eb736e..4aed5fe67a 100644 --- a/drivers/sensors/cirque_pinnacle.c +++ b/drivers/sensors/cirque_pinnacle.c @@ -4,8 +4,6 @@ // refer to documentation: Gen2 and Gen3 (Pinnacle ASIC) at https://www.cirque.com/documentation #include "cirque_pinnacle.h" -#include "print.h" -#include "debug.h" #include "wait.h" #include "timer.h" @@ -27,12 +25,6 @@ void cirque_pinnacle_enable_feed(bool feedEnable); void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count); void RAP_Write(uint8_t address, uint8_t data); -#ifdef CONSOLE_ENABLE -void print_byte(uint8_t byte) { - xprintf("%c%c%c%c%c%c%c%c|", (byte & 0x80 ? '1' : '0'), (byte & 0x40 ? '1' : '0'), (byte & 0x20 ? '1' : '0'), (byte & 0x10 ? '1' : '0'), (byte & 0x08 ? '1' : '0'), (byte & 0x04 ? '1' : '0'), (byte & 0x02 ? '1' : '0'), (byte & 0x01 ? '1' : '0')); -} -#endif - #if CIRQUE_PINNACLE_POSITION_MODE /* Logical Scaling Functions */ // Clips raw coordinates to "reachable" window of sensor diff --git a/drivers/sensors/cirque_pinnacle.h b/drivers/sensors/cirque_pinnacle.h index fa06e047f2..8717b32991 100644 --- a/drivers/sensors/cirque_pinnacle.h +++ b/drivers/sensors/cirque_pinnacle.h @@ -5,6 +5,7 @@ #include "cirque_pinnacle_regdefs.h" #include <stdint.h> #include <stdbool.h> +#include "pointing_device_internal.h" #ifndef CIRQUE_PINNACLE_TIMEOUT # define CIRQUE_PINNACLE_TIMEOUT 20 // I2C timeout in milliseconds diff --git a/drivers/sensors/cirque_pinnacle_i2c.c b/drivers/sensors/cirque_pinnacle_i2c.c index b328dd9a7a..3c11e5f079 100644 --- a/drivers/sensors/cirque_pinnacle_i2c.c +++ b/drivers/sensors/cirque_pinnacle_i2c.c @@ -1,8 +1,6 @@ // Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license #include "cirque_pinnacle.h" #include "i2c_master.h" -#include "print.h" -#include "debug.h" #include "stdio.h" // Masks for Cirque Register Access Protocol (RAP) @@ -18,9 +16,7 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { if (touchpad_init) { i2c_writeReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, NULL, 0, CIRQUE_PINNACLE_TIMEOUT); if (i2c_readReg(CIRQUE_PINNACLE_ADDR << 1, cmdByte, data, count, CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) { -#ifdef CONSOLE_ENABLE - dprintf("error cirque_pinnacle i2c_readReg\n"); -#endif + pd_dprintf("error cirque_pinnacle i2c_readReg\n"); touchpad_init = false; } i2c_stop(); @@ -33,9 +29,7 @@ void RAP_Write(uint8_t address, uint8_t data) { if (touchpad_init) { if (i2c_writeReg(CIRQUE_PINNACLE_ADDR << |