diff options
641 files changed, 1625 insertions, 3241 deletions
diff --git a/builddefs/build_keyboard.mk b/builddefs/build_keyboard.mk index fe95dcaf15..65bc0451f7 100644 --- a/builddefs/build_keyboard.mk +++ b/builddefs/build_keyboard.mk @@ -428,7 +428,6 @@ include $(BUILDDEFS_PATH)/common_features.mk include $(BUILDDEFS_PATH)/generic_features.mk include $(TMK_PATH)/protocol.mk include $(PLATFORM_PATH)/common.mk -include $(BUILDDEFS_PATH)/bootloader.mk SRC += $(patsubst %.c,%.clib,$(LIB_SRC)) SRC += $(patsubst %.c,%.clib,$(QUANTUM_LIB_SRC)) @@ -443,6 +442,7 @@ ifneq ($(REQUIRE_PLATFORM_KEY),) endif endif +-include $(PLATFORM_PATH)/$(PLATFORM_KEY)/bootloader.mk include $(PLATFORM_PATH)/$(PLATFORM_KEY)/platform.mk -include $(PLATFORM_PATH)/$(PLATFORM_KEY)/flash.mk diff --git a/builddefs/common_features.mk b/builddefs/common_features.mk index a23b5e82b9..3d34c673d3 100644 --- a/builddefs/common_features.mk +++ b/builddefs/common_features.mk @@ -773,8 +773,10 @@ endif ifeq ($(strip $(UNICODE_COMMON)), yes) OPT_DEFS += -DUNICODE_COMMON_ENABLE + COMMON_VPATH += $(QUANTUM_DIR)/unicode SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c \ - $(QUANTUM_DIR)/utf8.c + $(QUANTUM_DIR)/unicode/unicode.c \ + $(QUANTUM_DIR)/unicode/utf8.c endif MAGIC_ENABLE ?= yes @@ -805,31 +807,25 @@ ifeq ($(strip $(PS2_MOUSE_ENABLE)), yes) OPT_DEFS += -DMOUSE_ENABLE endif -ifeq ($(strip $(PS2_USE_BUSYWAIT)), yes) - PS2_ENABLE := yes - SRC += ps2_busywait.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_BUSYWAIT -endif +VALID_PS2_DRIVER_TYPES := busywait interrupt usart vendor -ifeq ($(strip $(PS2_USE_INT)), yes) - PS2_ENABLE := yes - SRC += ps2_interrupt.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_INT -endif +PS2_DRIVER ?= busywait +ifeq ($(strip $(PS2_ENABLE)), yes) + ifeq ($(filter $(PS2_DRIVER),$(VALID_PS2_DRIVER_TYPES)),) + $(call CATASTROPHIC_ERROR,Invalid PS2_DRIVER,PS2_DRIVER="$(PS2_DRIVER)" is not a valid PS/2 driver) + endif -ifeq ($(strip $(PS2_USE_USART)), yes) - PS2_ENABLE := yes - SRC += ps2_usart.c - SRC += ps2_io.c - OPT_DEFS += -DPS2_USE_USART -endif + OPT_DEFS += -DPS2_DRIVER_$(strip $(shell echo $(PS2_DRIVER) | tr '[:lower:]' '[:upper:]')) -ifeq ($(strip $(PS2_ENABLE)), yes) COMMON_VPATH += $(DRIVER_PATH)/ps2 COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/ps2 OPT_DEFS += -DPS2_ENABLE + + ifneq ($(strip $(PS2_DRIVER)), vendor) + SRC += ps2_io.c + endif + + SRC += ps2_$(strip $(PS2_DRIVER)).c endif JOYSTICK_ENABLE ?= no @@ -888,14 +884,14 @@ ifeq ($(strip $(BLUETOOTH_ENABLE)), yes) SRC += outputselect.c ifeq ($(strip $(BLUETOOTH_DRIVER)), BluefruitLE) - OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE - SRC += analog.c + OPT_DEFS += -DBLUETOOTH_BLUEFRUIT_LE -DHAL_USE_SPI=TRUE SRC += $(DRIVER_PATH)/bluetooth/bluefruit_le.cpp + QUANTUM_LIB_SRC += analog.c QUANTUM_LIB_SRC += spi_master.c endif ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42) - OPT_DEFS += -DBLUETOOTH_RN42 + OPT_DEFS += -DBLUETOOTH_RN42 -DHAL_USE_SERIAL=TRUE SRC += $(DRIVER_PATH)/bluetooth/rn42.c QUANTUM_LIB_SRC += uart.c endif diff --git a/builddefs/show_options.mk b/builddefs/show_options.mk index 98537e6da2..8d992c080c 100644 --- a/builddefs/show_options.mk +++ b/builddefs/show_options.mk @@ -66,7 +66,9 @@ OTHER_OPTION_NAMES = \ KEYLOGGER_ENABLE \ LCD_BACKLIGHT_ENABLE \ MACROS_ENABLED \ + PS2_ENABLE \ PS2_MOUSE_ENABLE \ + PS2_DRIVER \ RAW_ENABLE \ SWAP_HANDS_ENABLE \ RING_BUFFERED_6KRO_REPORT_ENABLE \ diff --git a/data/mappings/defaults.json b/data/mappings/defaults.json index c855e64d33..ea9f6972c5 100644 --- a/data/mappings/defaults.json +++ b/data/mappings/defaults.json @@ -10,6 +10,12 @@ "bootloader": "atmel-dfu", "pin_compatible": "promicro" }, + "elite_pi": { + "processor": "RP2040", + "bootloader": "rp2040", + "board": "QMK_PM2040", + "pin_compatible": "promicro" + }, "proton_c": { "processor": "STM32F303", "bootloader": "stm32-dfu", diff --git a/data/mappings/info_config.json b/data/mappings/info_config.json index 608fe4e9ad..af7ae0749c 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"}, @@ -52,6 +52,8 @@ "ONESHOT_TAP_TOGGLE": {"info_key": "oneshot.tap_toggle", "value_type": "int"}, "PERMISSIVE_HOLD": {"info_key": "tapping.permissive_hold", "value_type": "bool"}, "PERMISSIVE_HOLD_PER_KEY": {"info_key": "tapping.permissive_hold_per_key", "value_type": "bool"}, + "PS2_CLOCK_PIN": {"info_key": "ps2.clock_pin"}, + "PS2_DATA_PIN": {"info_key": "ps2.data_pin"}, "RETRO_TAPPING": {"info_key": "tapping.retro", "value_type": "bool"}, "RETRO_TAPPING_PER_KEY": {"info_key": "tapping.retro_per_key", "value_type": "bool"}, "RGB_DI_PIN": {"info_key": "rgblight.pin"}, @@ -78,7 +80,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 a4da10fd31..490a7c396a 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"}, @@ -32,6 +32,9 @@ "WAIT_FOR_USB": {"info_key": "usb.wait_for", "value_type": "bool"}, "STENO_ENABLE": {"info_key": "stenography.enabled", "value_type": "bool"}, "STENO_PROTOCOL": {"info_key": "stenography.protocol"}, + "PS2_ENABLE": {"info_key": "ps2.enabled", "value_type": "bool"}, + "PS2_MOUSE_ENABLE": {"info_key": "ps2.mouse_enabled", "value_type": "bool"}, + "PS2_DRIVER": {"info_key": "ps2.driver"}, # Items we want flagged in lint "CTPC": {"info_key": "_deprecated.ctpc", "deprecated": true, "replace_with": "CONVERT_TO=proton_c"}, diff --git a/data/schemas/definitions.jsonschema b/data/schemas/definitions.jsonschema index 8b68a58482..94a94157c0 100644 --- a/data/schemas/definitions.jsonschema +++ b/data/schemas/definitions.jsonschema @@ -68,20 +68,8 @@ "type": "number" }, "keyboard": { - "oneOf": [ - { - "type": "string", - "enum": [ - "converter/numeric_keypad_IIe", - "emptystring/NQG", - "maple_computing/christmas_tree/V2017" - ] - }, - { - "type": "string", - "pattern": "^[0-9a-z][0-9a-z_/]*$" - } - ] + "type": "string", + "pattern": "^[0-9a-z][0-9a-z_/]*$" }, "mcu_pin_array": { "type": "array", diff --git a/data/schemas/keyboard.jsonschema b/data/schemas/keyboard.jsonschema index 0308f45116..7e0400d7f7 100644 --- a/data/schemas/keyboard.jsonschema +++ b/data/schemas/keyboard.jsonschema @@ -34,7 +34,7 @@ }, "development_board": { "type": "string", - "enum": ["promicro", "elite_c", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"] + "enum": ["promicro", "elite_c", "elite_pi", "proton_c", "kb2040", "promicro_rp2040", "blok", "bit_c_pro", "stemcell", "bluepill", "blackpill_f401", "blackpill_f411", "bonsai_c4"] }, "pin_compatible": { "type": "string", @@ -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" ] }, @@ -393,6 +390,20 @@ } } }, + "ps2": { + "type": "object", + "additionalProperties": false, + "properties": { + "enabled": {"type": "boolean"}, + "mouse_enabled": {"type": "boolean"}, + "clock_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "data_pin": {"$ref": "qmk.definitions.v1#/mcu_pin"}, + "driver": { + "type": "string", + "enum": ["busywait", "interrupt", "usart", "vendor"] + } + } + }, "split": { "type": "object", "additionalProperties": false, 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_combo.md b/docs/feature_combo.md index 42d965509b..bb0b5d7aa0 100644 --- a/docs/feature_combo.md +++ b/docs/feature_combo.md @@ -255,7 +255,7 @@ bool combo_should_trigger(uint16_t combo_index, combo_t *combo, uint16_t keycode ``` ## Variable Length Combos -If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = sizeof(key_combos) / sizeof(key_combos[0]);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such: +If you leave `COMBO_COUNT` undefined in `config.h`, it allows you to programmatically declare the size of the Combo data structure and avoid updating `COMBO_COUNT`. Instead a variable called `COMBO_LEN` has to be set. It can be set with something similar to the following in `keymap.c`: `uint16_t COMBO_LEN = ARRAY_SIZE(key_combos);` or by adding `COMBO_LENGTH` as the *last* entry in the combo enum and then `uint16_t COMBO_LEN = COMBO_LENGTH;` as such: ```c enum myCombos { ..., diff --git a/docs/feature_converters.md b/docs/feature_converters.md index fe12254efe..1323bdb372 100644 --- a/docs/feature_converters.md +++ b/docs/feature_converters.md @@ -17,6 +17,7 @@ Currently the following converters are available: | `promicro` | `bit_c_pro` | | `promicro` | `stemcell` | | `promicro` | `bonsai_c4` | +| `promicro` | `elite_pi` | See below for more in depth information on each converter. @@ -60,6 +61,7 @@ If a board currently supported in QMK uses a [Pro Micro](https://www.sparkfun.co | [Bit-C PRO](https://nullbits.co/bit-c-pro) | `bit_c_pro` | | [STeMCell](https://github.com/megamind4089/STeMCell) | `stemcell` | | [customMK Bonsai C4](https://shop.custommk.com/products/bonsai-c4-microcontroller-board) | `bonsai_c4` | +| [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) | `elite_pi` | Converter summary: @@ -72,6 +74,7 @@ Converter summary: | `bit_c_pro` | `-e CONVERT_TO=bit_c_pro` | `CONVERT_TO=bit_c_pro` | `#ifdef CONVERT_TO_BIT_C_PRO` | | `stemcell` | `-e CONVERT_TO=stemcell` | `CONVERT_TO=stemcell` | `#ifdef CONVERT_TO_STEMCELL` | | `bonsai_c4` | `-e CONVERT_TO=bonsai_c4` | `CONVERT_TO=bonsai_c4` | `#ifdef CONVERT_TO_BONSAI_C4` | +| `elite_pi` | `-e CONVERT_TO=elite_pi` | `CONVERT_TO=elite_pi` | `#ifdef CONVERT_TO_ELITE_PI` | ### Proton C :id=proton_c @@ -102,7 +105,7 @@ The following defaults are based on what has been implemented for [RP2040](platf | USB Host (e.g. USB-USB converter) | Not supported (USB host code is AVR specific and is not currently supported on ARM) | | [Split keyboards](feature_split_keyboard.md) | Partial via `PIO` vendor driver - heavily dependent on enabled features | -### SparkFun Pro Micro - RP2040, Blok, and Bit-C PRO :id=promicro_rp2040 +### SparkFun Pro Micro - RP2040, Blok, Bit-C PRO, and Elite-Pi :id=promicro_rp2040 Currently identical to [Adafruit KB2040](#kb2040). @@ -135,4 +138,4 @@ The Bonsai C4 only has one on-board LED (B2), and by default, both the Pro Micro #define B0 PAL_LINE(GPIOA, 9) ``` -No peripherals are enabled by default at this time, but example code to enable SPI, I2C, PWM, and Serial communications can be found [here](/keyboards/custommk/bonsai_c4_template)
\ No newline at end of file +No peripherals are enabled by default at this time, but example code to enable SPI, I2C, PWM, and Serial communications can be found [here](/keyboards/custommk/bonsai_c4_template) diff --git a/docs/feature_encoders.md b/docs/feature_encoders.md index 2e4a4fe324..60b613d6a5 100644 --- a/docs/feature_encoders.md +++ b/docs/feature_encoders.md @@ -90,6 +90,14 @@ const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { ?> This should only be enabled at the keymap level. +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`: @@ -121,7 +129,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: @@ -174,7 +182,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 ``` @@ -187,4 +195,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..f2a8994fd2 100644 --- a/docs/feature_pointing_device.md +++ b/docs/feature_pointing_device.md @@ -93,20 +93,20 @@ This supports the Cirque Pinnacle 1CA027 Touch Controller, which is used in the #### Common settings -| Setting | Description | Default | -| -------------------------------- | ---------------------------------------------------------- | ------------------ | -| `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` | -| `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `ADC_ATTENUATE_4X` | -| `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ | -| `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ | +| Setting | Description | Default | +| -------------------------------- | ---------------------------------------------------------- | ------------------------------------------- | +| `CIRQUE_PINNACLE_DIAMETER_MM` | (Optional) Diameter of the trackpad sensor in millimeters. | `40` | +| `CIRQUE_PINNACLE_ATTENUATION` | (Optional) Sets the attenuation of the sensor data. | `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X` | +| `CIRQUE_PINNACLE_CURVED_OVERLAY` | (Optional) Applies settings tuned for curved overlay. | _not defined_ | +| `CIRQUE_PINNACLE_POSITION_MODE` | (Optional) Mode of operation. | _not defined_ | **`CIRQUE_PINNACLE_ATTENUATION`** is a measure of how much data is suppressed in regards to sensitivity. The higher the attenuation, the less sensitive the touchpad will be. Default attenuation is set to 4X, although if you are using a thicker overlay (such as the curved overlay) you will want a lower attenuation such as 2X. The possible values are: -* `ADC_ATTENUATE_4X`: Least sensitive -* `ADC_ATTENUATE_3X` -* `ADC_ATTENUATE_2X` -* `ADC_ATTENUATE_1X`: Most sensitive +* `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_4X`: Least sensitive +* `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_3X` +* `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_2X` +* `EXTREG__TRACK_ADCCONFIG__ADC_ATTENUATE_1X`: Most sensitive **`CIRQUE_PINNACLE_POSITION_MODE`** can be `CIRQUE_PINNACLE_ABSOLUTE_MODE` or `CIRQUE_PINNACLE_RELATIVE_MODE`. Modes differ in supported features/gestures. @@ -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/docs/feature_ps2_mouse.md b/docs/feature_ps2_mouse.md index c980705ae7..e714d9b867 100644 --- a/docs/feature_ps2_mouse.md +++ b/docs/feature_ps2_mouse.md @@ -32,13 +32,14 @@ In rules.mk: ```make PS2_MOUSE_ENABLE = yes -PS2_USE_BUSYWAIT = yes +PS2_ENABLE = yes +PS2_DRIVER = busywait ``` In your keyboard config.h: ```c -#ifdef PS2_USE_BUSYWAIT +#ifdef PS2_DRIVER_BUSYWAIT # define PS2_CLOCK_PIN D1 # define PS2_DATA_PIN D2 #endif @@ -52,13 +53,14 @@ In rules.mk: ```make PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt ``` In your keyboard config.h: ```c -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT #define PS2_CLOCK_PIN D2 #define PS2_DATA_PIN D5 @@ -84,7 +86,8 @@ In rules.mk: ``` PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt ``` In your keyboard config.h: @@ -108,13 +111,14 @@ In rules.mk: ```make PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart ``` In your keyboard config.h: ```c -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/docs/feature_unicode.md b/docs/feature_unicode.md index 2389cb735c..0b06cae6c2 100644 --- a/docs/feature_unicode.md +++ b/docs/feature_unicode.md @@ -119,8 +119,6 @@ The following input modes are available: !> Using the _Unicode Hex Input_ input source may disable some Option-based shortcuts, such as Option+Left and Option+Right. - !> `UC_OSX` is a deprecated alias of `UC_MAC` that will be removed in future versions of QMK. All new keymaps should use `UC_MAC`. - * **`UC_LNX`**: Linux built-in IBus Unicode input. Supports code points up to `0x10FFFF` (all possible code points). Enabled by default and works almost anywhere on IBus-enabled distros. Without IBus, this mode works under GTK apps, but rarely anywhere else. @@ -206,6 +204,17 @@ The functions for starting and finishing Unicode input on your platform can be o You can find the default implementations of these functions in [`process_unicode_common.c`](https://github.com/qmk/qmk_firmware/blob/master/quantum/process_keycode/process_unicode_common.c). +### Input Mode Callbacks + +There are callbacks functions available that are called whenever the unicode input mode changes. The new input mode is passed to the function. + +|Callback |Description | +|---------------------------------------------------|-----------------------------------------------------| +| `unicode_input_mode_set_kb(uint8_t input_mode)` | Callback for unicode input mode set, for keyboard. | +| `unicode_input_mode_set_user(uint8_t input_mode)` | Callback for unicode input mode set, for users. | + +This feature can be used, for instance, to implement LED indicators for the current unicode input mode. + ### Input Key Configuration You can customize the keys used to trigger Unicode input for macOS, Linux and WinCompose by adding corresponding defines to your `config.h`. The default values match the platforms' default settings, so you shouldn't need to change this unless Unicode input isn't working, or you want to use a different key (e.g. in order to free up left or right Alt). diff --git a/docs/ja/feature_ps2_mouse.md b/docs/ja/feature_ps2_mouse.md index 569934c187..2798f61283 100644 --- a/docs/ja/feature_ps2_mouse.md +++ b/docs/ja/feature_ps2_mouse.md @@ -36,13 +36,14 @@ rules.mk で: ```makefile PS2_MOUSE_ENABLE = yes -PS2_USE_BUSYWAIT = yes +PS2_ENABLE = yes +PS2_DRIVER = busywait ``` キーボードの config.h で: ```c -#ifdef PS2_USE_BUSYWAIT +#ifdef PS2_DRIVER_BUSYWAIT # define PS2_CLOCK_PIN D1 # define PS2_DATA_PIN D2 #endif @@ -56,13 +57,14 @@ rules.mk で: ```makefile PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt ``` キーボードの config.h で: ```c -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT #define PS2_CLOCK_PIN D2 #define PS2_DATA_PIN D5 @@ -88,14 +90,14 @@ rules.mk で: ```makefile PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart ``` キーボードの config.h で: ```c -#ifdef PS2_USE_USART -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/docs/squeezing_avr.md b/docs/squeezing_avr.md index bb8e460024..caf18002c0 100644 --- a/docs/squeezing_avr.md +++ b/docs/squeezing_avr.md @@ -192,6 +192,7 @@ That said, there are a number of Pro Micro replacements with ARM controllers: * [Adafruit KB2040](https://learn.adafruit.com/adafruit-kb2040) * [SparkFun Pro Micro - RP2040](https://www.sparkfun.com/products/18288) * [Blok](https://boardsource.xyz/store/628b95b494dfa308a6581622) +* [Elite-Pi](https://keeb.io/products/elite-pi-usb-c-pro-micro-replacement-rp2040) There are other, non-Pro Micro compatible boards out there. The most popular being: * [WeAct Blackpill F411](https://www.aliexpress.com/item/1005001456186625.html) (~$6 USD) diff --git a/drivers/bluetooth/bluefruit_le.cpp b/drivers/bluetooth/bluefruit_le.cpp index 19310767cf..50170b83fe 100644 --- a/drivers/bluetooth/bluefruit_le.cpp +++ b/drivers/bluetooth/bluefruit_le.cpp @@ -79,9 +79,7 @@ struct sdep_msg { enum queue_type { QTKeyReport, // 1-byte modifier + 6-byte key report QTConsumer, // 16-bit key code -#ifdef MOUSE_ENABLE QTMouseMove, // 4-byte mouse report -#endif }; struct queue_item { @@ -442,7 +440,7 @@ bool bluefruit_le_enable_keyboard(void) { // Disable command echo static const char kEcho[] PROGMEM = "ATE=0"; // Make the advertised name match the keyboard - static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" STR(PRODUCT); + static const char kGapDevName[] PROGMEM = "AT+GAPDEVNAME=" PRODUCT; // Turn on keyboard support static const char kHidEnOn[] PROGMEM = "AT+BLEHIDEN=1"; @@ -581,10 +579,12 @@ static bool process_queue_item(struct queue_item *item, uint16_t timeout) { snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->key.modifier, item->key.keys[0], item->key.keys[1], item->key.keys[2], item->key.keys[3], item->key.keys[4], item->key.keys[5]); return at_command(cmdbuf, NULL, 0, true, timeout); +#ifdef EXTRAKEY_ENABLE case QTConsumer: strcpy_P(fmtbuf, PSTR("AT+BLEHIDCONTROLKEY=0x%04x")); snprintf(cmdbuf, sizeof(cmdbuf), fmtbuf, item->consumer); return at_command(cmdbuf, NULL, 0, true, timeout); +#endif #ifdef MOUSE_ENABLE case QTMouseMove: @@ -658,7 +658,6 @@ void bluefruit_le_send_consumer_key(uint16_t usage) { } } -#ifdef MOUSE_ENABLE void bluefruit_le_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons) { struct queue_item item; @@ -673,7 +672,6 @@ void bluefruit_le_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, send_buf_send_one(); } } -#endif uint32_t bluefruit_le_read_battery_voltage(void) { return state.vbat; diff --git a/drivers/bluetooth/bluefruit_le.h b/drivers/bluetooth/bluefruit_le.h index de301c6167..731ba2e370 100644 --- a/drivers/bluetooth/bluefruit_le.h +++ b/drivers/bluetooth/bluefruit_le.h @@ -40,12 +40,10 @@ extern void bluefruit_le_send_keys(uint8_t hid_modifier_mask, uint8_t *keys, uin * (milliseconds) */ extern void bluefruit_le_send_consumer_key(uint16_t usage); -#ifdef MOUSE_ENABLE /* Send a mouse/wheel movement report. * The parameters are signed and indicate positive or negative direction * change. */ extern void bluefruit_le_send_mouse_move(int8_t x, int8_t y, int8_t scroll, int8_t pan, uint8_t buttons); -#endif /* Compute battery voltage by reading an analog pin. * Returns the integer number of millivolts */ diff --git a/drivers/bluetooth/rn42.c b/drivers/bluetooth/rn42.c index 5d497cda20..0eb1733723 100644 --- a/drivers/bluetooth/rn42.c +++ b/drivers/bluetooth/rn42.c @@ -14,6 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include "rn42.h" + #include "report.h" #include "uart.h" @@ -69,33 +71,35 @@ void rn42_send_keyboard(report_keyboard_t *report) { uart_write(0xFD); uart_write(0x09); uart_write(0x01); + uart_write(report->mods); uart_write(0x00); - for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { - uart_write(report->keys[i]); - } + uart_write(report->keys[0]); + uart_write(report->keys[1]); + uart_write(report->keys[2]); + uart_write(report->keys[3]); + uart_write(report->keys[4]); + uart_write(report->keys[5]); } void rn42_send_mouse(report_mouse_t *report) { uart_write(0xFD); - uart_write(0x00); - uart_write(0x03); + uart_write(0x05); + uart_write(0x02); + uart_write(report->buttons); uart_write(report->x); uart_write(report->y); - uart_write(report->v); // should try sending the wheel v here - uart_write(report->h); // should try sending the wheel h here - uart_write(0x00); + uart_write(report->v); } -void rn42_send_consumer(uint16_t data) { - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - uint16_t bitmap = rn42_consumer_usage_to_bitmap(data); +void rn42_send_consumer(uint16_t usage) { + uint16_t bitmap = rn42_consumer_usage_to_bitmap(usage); + uart_write(0xFD); uart_write(0x03); uart_write(0x03); + uart_write(bitmap & 0xFF); - uart_write((bitmap >> 8) & 0xFF); + uart_write(bitmap >> 8); } diff --git a/drivers/bluetooth/rn42.h b/drivers/bluetooth/rn42.h index 4747759111..89b716bfcd 100644 --- a/drivers/bluetooth/rn42.h +++ b/drivers/bluetooth/rn42.h @@ -14,6 +14,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <stdint.h> + #include "report.h" void rn42_init(void); @@ -22,4 +24,4 @@ void rn42_send_keyboard(report_keyboard_t *report); void rn42_send_mouse(report_mouse_t *report); -void rn42_send_consumer(uint16_t data); +void rn42_send_consumer(uint16_t usage); diff --git a/drivers/haptic/solenoid.c b/drivers/haptic/solenoid.c index 637a77da3d..4e43903255 100644 --- a/drivers/haptic/solenoid.c +++ b/drivers/haptic/solenoid.c @@ -20,11 +20,12 @@ #include "haptic.h" #include "gpio.h" #include "usb_device_state.h" +#include "util.h" #include <stdlib.h> uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; static pin_t solenoid_pads[] = SOLENOID_PINS; -#define NUMBER_OF_SOLENOIDS (sizeof(solenoid_pads) / sizeof(pin_t)) +#define NUMBER_OF_SOLENOIDS ARRAY_SIZE(solenoid_pads) bool solenoid_on[NUMBER_OF_SOLENOIDS] = {false}; bool solenoid_buzzing[NUMBER_OF_SOLENOIDS] = {false}; uint16_t solenoid_start[NUMBER_OF_SOLENOIDS] = {0}; @@ -147,7 +148,7 @@ void solenoid_check(void) { void solenoid_setup(void) { #ifdef SOLENOID_PINS_ACTIVE_STATE bool state_temp[] = SOLENOID_PINS_ACTIVE_STATE; - uint8_t bound_check = (sizeof(state_temp) / sizeof(bool)); + uint8_t bound_check = ARRAY_SIZE(state_temp); #endif for (uint8_t i = 0; i < NUMBER_OF_SOLENOIDS; i++) { 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 << 1, cmdByte, &data, sizeof(data), CIRQUE_PINNACLE_TIMEOUT) != I2C_STATUS_SUCCESS) { -#ifdef CONSOLE_ENABLE - dprintf("error cirque_pinnacle i2c_writeReg\n"); -#endif + pd_dprintf("error cirque_pinnacle i2c_writeReg\n"); touchpad_init = false; } i2c_stop(); diff --git a/drivers/sensors/cirque_pinnacle_spi.c b/drivers/sensors/cirque_pinnacle_spi.c index bd980fc863..5cb39aebb0 100644 --- a/drivers/sensors/cirque_pinnacle_spi.c +++ b/drivers/sensors/cirque_pinnacle_spi.c @@ -1,8 +1,6 @@ // Copyright (c) 2018 Cirque Corp. Restrictions apply. See: www.cirque.com/sw-license #include "cirque_pinnacle.h" #include "spi_master.h" -#include "print.h" -#include "debug.h" // Masks for Cirque Register Access Protocol (RAP) #define WRITE_MASK 0x80 @@ -24,9 +22,7 @@ void RAP_ReadBytes(uint8_t address, uint8_t* data, uint8_t count) { data[i] = spi_write(FILLER_BYTE); // write filler, receive data on the third filler send } } else { -#ifdef CONSOLE_ENABLE - dprintf("error cirque_pinnacle spi_start read\n"); -#endif + pd_dprintf("error cirque_pinnacle spi_start read\n"); touchpad_init = false; } spi_stop(); @@ -42,9 +38,7 @@ void RAP_Write(uint8_t address, uint8_t data) { spi_write(cmdByte); spi_write(data); } else { -#ifdef CONSOLE_ENABLE - dprintf("error cirque_pinnacle spi_start write\n"); -#endif + pd_dprintf("error cirque_pinnacle spi_start write\n"); touchpad_init = false; } spi_stop(); diff --git a/drivers/sensors/pimoroni_trackball.c b/drivers/sensors/pimoroni_trackball.c index 88a351316b..326e59744f 100644 --- a/drivers/sensors/pimoroni_trackball.c +++ b/drivers/sensors/pimoroni_trackball.c @@ -14,10 +14,10 @@ * 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 "pointing_device_internal.h" #include "pimoroni_trackball.h" #include "i2c_master.h" -#include "print.h" -#include "debug.h" #include "timer.h" // clang-format off @@ -58,20 +58,17 @@ void pimoroni_trackball_set_rgbw(uint8_t r, uint8_t g, uint8_t b, uint8_t w) { uint8_t data[4] = {r, g, b, w}; __attribute__((unused)) i2c_status_t status = i2c_writeReg(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LED_RED, data, sizeof(data), PIMORONI_TRACKBALL_TIMEOUT); -#ifdef CONSOLE_ENABLE - if (debug_mouse) dprintf("Trackball RGBW i2c_status_t: %d\n", status); -#endif + pd_dprintf("Trackball RGBW i2c_status_t: %d\n", status); } i2c_status_t read_pimoroni_trackball(pimoroni_data_t* data) { i2c_status_t status = i2c_readReg(PIMORONI_TRACKBALL_ADDRESS << 1, PIMORONI_TRACKBALL_REG_LEFT, (uint8_t*)data, sizeof(*data), PIMORONI_TRACKBALL_TIMEOUT); -#ifdef CONSOLE_ENABLE - if (debug_mouse) { - static uint16_t d_timer; - if (timer_elapsed(d_timer) > PIMORONI_TRACKBALL_DEBUG_INTERVAL) { - dprintf("Trackball READ i2c_status_t: %d L: %d R: %d Up: %d D: %d SW: %d\n", status, data->left, data->right, data->up, data->down, data->click); - d_timer = timer_read(); - } + +#ifdef POINTING_DEVICE_DEBUG + static uint16_t d_timer; + if (timer_elapsed(d_timer) > PIMORONI_TRACKBALL_DEBUG_INTERVAL) { + pd_dprintf("Trackball READ i2c_status_t: %d L: %d R: %d Up: %d D: %d SW: %d\n", status, data->left, data->right, data->up, data->down, data->click); + d_timer = timer_read(); } #endif diff --git a/drivers/sensors/pmw33xx_common.c b/drivers/sensors/pmw33xx_common.c index 13164cb150..b8d4e532ca 100644 --- a/drivers/sensors/pmw33xx_common.c +++ b/drivers/sensors/pmw33xx_common.c @@ -7,9 +7,8 @@ // Copyright 2020 Ploopy Corporation // SPDX-License-Identifier: GPL-2.0-or-later -#include "debug.h" +#include "pointing_device_internal.h" #include "pmw33xx_common.h" -#include "print.h" #include "string.h" #include "wait.h" #include "spi_master.h" @@ -18,10 +17,10 @@ extern const uint8_t pmw33xx_firmware_data[PMW33XX_FIRMWARE_LENGTH] PROGMEM; extern const uint8_t pmw33xx_firmware_signature[3] PROGMEM; -static const pin_t cs_pins[] = PMW33XX_CS_PINS; -static bool in_burst[sizeof(cs_pins) / sizeof(pin_t)] = {0}; +static const pin_t cs_pins[] = PMW33XX_CS_PINS; +static bool in_burst[ARRAY_SIZE(cs_pins)] = {0}; -const size_t pmw33xx_number_of_sensors = sizeof(cs_pins) / sizeof(pin_t); +const size_t pmw33xx_number_of_sensors = ARRAY_SIZE(cs_pins); bool __attribute__((cold)) pmw33xx_upload_firmware(uint8_t sensor); bool __attribute__((cold)) pmw33xx_check_signature(uint8_t sensor); @@ -154,7 +153,7 @@ bool pmw33xx_init(uint8_t sensor) { pmw33xx_read(sensor, REG_Delta_Y_H); if (!pmw33xx_upload_firmware(sensor)) { - dprintf("PMW33XX (%d): firmware upload failed!\n", sensor); + pd_dprintf("PMW33XX (%d): firmware upload failed!\n", sensor); return false; } @@ -170,7 +169,7 @@ bool pmw33xx_init(uint8_t sensor) { pmw33xx_write(sensor, REG_Lift_Config, PMW33XX_LIFTOFF_DISTANCE); if (!pmw33xx_check_signature(sensor)) { - dprintf("PMW33XX (%d): firmware signature verification failed!\n", sensor); + pd_dprintf("PMW33XX (%d): firmware signature verification failed!\n", sensor); return false; } @@ -185,7 +184,7 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) { } if (!in_burst[sensor]) { - dprintf("PMW33XX (%d): burst\n", sensor); + pd_dprintf("PMW33XX (%d): burst\n", sensor); if (!pmw33xx_write(sensor, REG_Motion_Burst, 0x00)) { return report; } @@ -208,9 +207,7 @@ pmw33xx_report_t pmw33xx_read_burst(uint8_t sensor) { spi_stop(); - if (debug_config.mouse) { - dprintf("PMW33XX (%d): motion: 0x%x dx: %i dy: %i\n", sensor, report.motion.w, report.delta_x, report.delta_y); - } + pd_dprintf("PMW33XX (%d): motion: 0x%x dx: %i dy: %i\n", sensor, report.motion.w, report.delta_x, report.delta_y); report.delta_x *= -1; report.delta_y *= -1; diff --git a/keyboards/25keys/zinc/keymaps/ginjake/keymap.c b/keyboards/25keys/zinc/keymaps/ginjake/keymap.c index 93dfc590e9..26190a2a91 100644 --- a/keyboards/25keys/zinc/keymaps/ginjake/keymap.c +++ b/keyboards/25keys/zinc/keymaps/ginjake/keymap.c @@ -333,7 +333,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { aqours_num++; aqours_next_color_timer_count = 0; target_col = 0; - if (aqours_num == sizeof(aqours_h) / sizeof(int)) { + if (aqours_num == ARRAY_SIZE(aqours_h)) { aqours_num = 0; } } diff --git a/keyboards/25keys/zinc/rev1/config.h b/keyboards/25keys/zinc/rev1/config.h index 1b2ae25cd8..947f5ccfb1 100644 --- a/keyboards/25keys/zinc/rev1/config.h +++ b/keyboards/25keys/zinc/rev1/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 100 /* Use I2C or Serial */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* Select hand configuration */ diff --git a/keyboards/25keys/zinc/reva/config.h b/keyboards/25keys/zinc/reva/config.h index f740f4d011..54a26cd5bc 100644 --- a/keyboards/25keys/zinc/reva/config.h +++ b/keyboards/25keys/zinc/reva/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 100 /* Use I2C or Serial */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* Select hand configuration */ diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 9027cdac5f..06ace32eb5 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -18,7 +18,6 @@ #include "config_common.h" -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index c886eb48da..4b2b97fcba 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -18,8 +18,6 @@ #include "config_common.h" -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index d507a2c445..502bbf38e3 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -18,8 +18,6 @@ #include "config_common.h" -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/40percentclub/gherkin/keymaps/mjt/config.h b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h index ce9d5ab2ae..5a295a06ca 100644 --- a/keyboards/40percentclub/gherkin/keymaps/mjt/config.h +++ b/keyboards/40percentclub/gherkin/keymaps/mjt/config.h @@ -1,5 +1,4 @@ #pragma once -/* USB Device descriptor parameter */ #undef MANUFACTURER -#define MANUFACTURER Some Guy +#define MANUFACTURER "Some Guy" diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h index f47788ce87..2851b909f1 100644 --- a/keyboards/40percentclub/half_n_half/config.h +++ b/keyboards/40percentclub/half_n_half/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -#define USE_SERIAL // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/40percentclub/mf68/keymaps/68keys/config.h b/keyboards/40percentclub/mf68/keymaps/68keys/config.h index 651c17069d..66e7bbed99 100644 --- a/keyboards/40percentclub/mf68/keymaps/68keys/config.h +++ b/keyboards/40percentclub/mf68/keymaps/68keys/config.h @@ -9,5 +9,5 @@ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0A0C #define DEVICE_VER 0x0068 -#define MANUFACTURER 68Keys.io -#define PRODUCT The 68Keys.io Keyboard +#define MANUFACTURER "68Keys.io" +#define PRODUCT "The 68Keys.io Keyboard" diff --git a/keyboards/40percentclub/mf68/keymaps/delivrance/config.h b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h index 7ae8805765..50c64b4b51 100644 --- a/keyboards/40percentclub/mf68/keymaps/delivrance/config.h +++ b/keyboards/40percentclub/mf68/keymaps/delivrance/config.h @@ -21,10 +21,10 @@ #pragma once #undef MANUFACTURER -#define MANUFACTURER Dan +#define MANUFACTURER "Dan" #undef PRODUCT -#define PRODUCT Magicforce 68 QMK +#define PRODUCT "Magicforce 68 QMK" #undef BACKLIGHT_LEVELS #define BACKLIGHT_LEVELS 20 diff --git a/keyboards/a_dux/config.h b/keyboards/a_dux/config.h index ffda0a301c..c7e3775028 100644 --- a/keyboards/a_dux/config.h +++ b/keyboards/a_dux/config.h @@ -59,9 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Serial settings */ -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D1 diff --git a/keyboards/acheron/shark/beta/keymaps/gondolindrim/keymap.c b/keyboards/acheron/shark/beta/keymaps/gondolindrim/keymap.c index cae98411d6..fd7f556b56 100755 --- a/keyboards/acheron/shark/beta/keymaps/gondolindrim/keymap.c +++ b/keyboards/acheron/shark/beta/keymaps/gondolindrim/keymap.c @@ -94,7 +94,7 @@ encoder_mode_t encoder_modes[] = { // Insert your custom encoder mode here }; -#define NUM_ENCODER_MODES (sizeof(encoder_modes)/sizeof(encoder_modes[0])) +#define NUM_ENCODER_MODES ARRAY_SIZE(encoder_modes) // This counter is used to track what encoder mode is being used at a certain time int encoder_mode_count = 0; diff --git a/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c b/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c index dc1289fdb1..1b05809640 100644 --- a/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c +++ b/keyboards/adafruit/macropad/lib/ssd1306_sh1106.c @@ -94,8 +94,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define OLED_ALL_BLOCKS_MASK (((((OLED_BLOCK_TYPE)1 << (OLED_BLOCK_COUNT - 1)) - 1) << 1) | 1) -#define ARRAY_SIZE(arr) sizeof(arr)/sizeof(arr[0]) - // spi defines #define OLED_STATUS_SUCCESS SPI_STATUS_SUCCESS diff --git a/keyboards/adkb96/keymaps/default/config.h b/keyboards/adkb96/keymaps/default/config.h index bef279a6d0..3f8d841423 100644 --- a/keyboards/adkb96/keymaps/default/config.h +++ b/keyboards/adkb96/keymaps/default/config.h @@ -20,9 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL //#define USE_I2C /* Select hand configuration */ diff --git a/keyboards/adpenrose/shisaku/info.json b/keyboards/adpenrose/shisaku/info.json index 6f765ba648..a93898c33b 100644 --- a/keyboards/adpenrose/shisaku/info.json +++ b/keyboards/adpenrose/shisaku/info.json @@ -1,5 +1,6 @@ { "keyboard_name": "shisaku", + "manufacturer": "ADPenrose", "url": "https://github.com/ADPenrose/shisaku_keeb", "maintainer": "ADPenrose", "usb": { diff --git a/keyboards/aleblazer/zodiark/config.h b/keyboards/aleblazer/zodiark/config.h index 90ecb7ce96..2958e8daed 100644 --- a/keyboards/aleblazer/zodiark/config.h +++ b/keyboards/aleblazer/zodiark/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" #define SOFT_SERIAL_PIN D3 -#define SERIAL_USE_MULTI_TRANSACTION #define SELECT_SOFT_SERIAL_SPEED 1 /* key matrix size */ diff --git a/keyboards/alt34/rev1/config.h b/keyboards/alt34/rev1/config.h index 7027d449ec..38b4e5b50a 100644 --- a/keyboards/alt34/rev1/config.h +++ b/keyboards/alt34/rev1/config.h @@ -38,9 +38,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Use I2C or Serial, not both */ #define USE_I2C -// #define USE_SERIAL /* Select hand configuration */ #define EE_HANDS diff --git a/keyboards/annepro2/annepro2_ble.c b/keyboards/annepro2/annepro2_ble.c index 0336d6a76c..c75de6720c 100644 --- a/keyboards/annepro2/annepro2_ble.c +++ b/keyboards/annepro2/annepro2_ble.c @@ -24,15 +24,14 @@ /* -------------------- Static Function Prototypes -------------------------- */ static uint8_t ap2_ble_leds(void); static void ap2_ble_mouse(report_mouse_t *report); -static void ap2_ble_system(uint16_t data); -static void ap2_ble_consumer(uint16_t data); +static void ap2_ble_extra(uint8_t report_id, uint16_t data); static void ap2_ble_keyboard(report_keyboard_t *report); static void ap2_ble_swtich_ble_driver(void); /* -------------------- Static Local Variables ------------------------------ */ static host_driver_t ap2_ble_driver = { - ap2_ble_leds, ap2_ble_keyboard, ap2_ble_mouse, ap2_ble_system, ap2_ble_consumer, + ap2_ble_leds, ap2_ble_keyboard, ap2_ble_mouse, ap2_ble_extra }; static uint8_t ble_mcu_wakeup[11] = {0x7b, 0x12, 0x53, 0x00, 0x03, 0x00, 0x01, 0x7d, 0x02, 0x01, 0x02}; @@ -131,8 +130,6 @@ static uint8_t ap2_ble_leds(void) { static void ap2_ble_mouse(report_mouse_t *report) {} -static void ap2_ble_system(uint16_t data) {} - static inline uint16_t CONSUMER2AP2(uint16_t usage) { switch (usage) { case AUDIO_VOL_DOWN: @@ -152,12 +149,14 @@ static inline uint16_t CONSUMER2AP2(uint16_t usage) { } } -static void ap2_ble_consumer(uint16_t data) { - sdPut(&SD1, 0x0); - sdWrite(&SD1, ble_mcu_send_consumer_report, sizeof(ble_mcu_send_consumer_report)); - sdPut(&SD1, CONSUMER2AP2(data)); - static const uint8_t dummy[3] = {0}; - sdWrite(&SD1, dummy, sizeof(dummy)); +static void ap2_ble_extra(uint8_t report_id, uint16_t data) { + if (report_id == REPORT_ID_CONSUMER) { + sdPut(&SD1, 0x0); + sdWrite(&SD1, ble_mcu_send_consumer_report, sizeof(ble_mcu_send_consumer_report)); + sdPut(&SD1, CONSUMER2AP2(data)); + static const uint8_t dummy[3] = {0}; + sdWrite(&SD1, dummy, sizeof(dummy)); + } } /*! diff --git a/keyboards/arabica37/rev1/config.h b/keyboards/arabica37/rev1/config.h index b3a9fd3f89..b68709f63b 100644 --- a/keyboards/arabica37/rev1/config.h +++ b/keyboards/arabica37/rev1/config.h @@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* key matrix size */ diff --git a/keyboards/atreus/keymaps/xk/keymap.c b/keyboards/atreus/keymaps/xk/keymap.c index 8264618004..e981d20ac2 100644 --- a/keyboards/atreus/keymaps/xk/keymap.c +++ b/keyboards/atreus/keymaps/xk/keymap.c @@ -302,7 +302,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return false; break; case OSX: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); return false; break; } diff --git a/keyboards/atreus62/keymaps/d4mation/keymap.c b/keyboards/atreus62/keymaps/d4mation/keymap.c index 1f0cae666d..becf036233 100644 --- a/keyboards/atreus62/keymaps/d4mation/keymap.c +++ b/keyboards/atreus62/keymaps/d4mation/keymap.c @@ -154,7 +154,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Runs just one time when the keyboard initializes. */ void eeconfig_init_keymap( void ) { - set_unicode_input_mode( UC_OSX ); + set_unicode_input_mode( UC_MAC ); }; bool process_record_keymap( uint16_t keycode, keyrecord_t *record ) { diff --git a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h index 39204a3667..f3e8f83b2a 100644 --- a/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h +++ b/keyboards/bastardkb/charybdis/3x5/keymaps/drashna/config.h @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #undef PRODUCT -#define PRODUCT Charybdis Nano (Blackpill) +#define PRODUCT "Charybdis Nano (Blackpill)" #undef MATRIX_ROW_PINS #define MATRIX_ROW_PINS \ diff --git a/keyboards/biacco42/ergo42/keymaps/biacco-biacco/config.h b/keyboards/biacco42/ergo42/keymaps/biacco-biacco/config.h index 360d6a5621..f12d6fb3d4 100644 --- a/keyboards/biacco42/ergo42/keymaps/biacco-biacco/config.h +++ b/keyboards/biacco42/ergo42/keymaps/biacco-biacco/config.h @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/biacco42/ergo42/keymaps/biacco-macOS/config.h b/keyboards/biacco42/ergo42/keymaps/biacco-macOS/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/biacco-macOS/config.h +++ b/keyboards/biacco42/ergo42/keymaps/biacco-macOS/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/biacco-underglow/config.h b/keyboards/biacco42/ergo42/keymaps/biacco-underglow/config.h index efadfa8143..ee8c84e1ee 100644 --- a/keyboards/biacco42/ergo42/keymaps/biacco-underglow/config.h +++ b/keyboards/biacco42/ergo42/keymaps/biacco-underglow/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/biacco-winjp/config.h b/keyboards/biacco42/ergo42/keymaps/biacco-winjp/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/biacco-winjp/config.h +++ b/keyboards/biacco42/ergo42/keymaps/biacco-winjp/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/biacco/config.h b/keyboards/biacco42/ergo42/keymaps/biacco/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/biacco/config.h +++ b/keyboards/biacco42/ergo42/keymaps/biacco/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h b/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h +++ b/keyboards/biacco42/ergo42/keymaps/default-illustrator/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h b/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h index efadfa8143..ee8c84e1ee 100644 --- a/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h +++ b/keyboards/biacco42/ergo42/keymaps/default-underglow/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/default/config.h b/keyboards/biacco42/ergo42/keymaps/default/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/default/config.h +++ b/keyboards/biacco42/ergo42/keymaps/default/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/hdbx/config.h b/keyboards/biacco42/ergo42/keymaps/hdbx/config.h index 4f0704ae1a..7a67860718 100644 --- a/keyboards/biacco42/ergo42/keymaps/hdbx/config.h +++ b/keyboards/biacco42/ergo42/keymaps/hdbx/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/ichi-t/config.h b/keyboards/biacco42/ergo42/keymaps/ichi-t/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/ichi-t/config.h +++ b/keyboards/biacco42/ergo42/keymaps/ichi-t/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/koba/config.h b/keyboards/biacco42/ergo42/keymaps/koba/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/koba/config.h +++ b/keyboards/biacco42/ergo42/keymaps/koba/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/shinze/config.h b/keyboards/biacco42/ergo42/keymaps/shinze/config.h index 360d6a5621..f0717a4632 100644 --- a/keyboards/biacco42/ergo42/keymaps/shinze/config.h +++ b/keyboards/biacco42/ergo42/keymaps/shinze/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/biacco42/ergo42/keymaps/yshrsmz/config.h b/keyboards/biacco42/ergo42/keymaps/yshrsmz/config.h index 1892ef6529..eb2dbd6dd0 100644 --- a/keyboards/biacco42/ergo42/keymaps/yshrsmz/config.h +++ b/keyboards/biacco42/ergo42/keymaps/yshrsmz/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/bioi/ble.c b/keyboards/bioi/ble.c index d941f7c43d..b050b2f6cb 100644 --- a/keyboards/bioi/ble.c +++ b/keyboards/bioi/ble.c @@ -96,15 +96,14 @@ static void bluefruit_serial_send(uint8_t data) static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); +static void send_extra(uint8_t report_id, uint16_t data); host_driver_t bluefruit_driver = { keyboard_leds, send_keyboard, send_mouse, - send_system, - send_consumer}; + send_extra +}; host_driver_t null_driver = {}; @@ -156,10 +155,6 @@ static void send_mouse(report_mouse_t *report) #endif } -static void send_system(uint16_t data) -{ -} - /* +-----------------+-------------------+-------+ | Consumer Key | Bit Map | Hex | @@ -182,30 +177,32 @@ static void send_system(uint16_t data) #define CONSUMER2BLUEFRUIT(usage) \ (usage == AUDIO_MUTE ? 0x00e2 : (usage == AUDIO_VOL_UP ? 0x00e9 : (usage == AUDIO_VOL_DOWN ? 0x00ea : (usage == TRANSPORT_NEXT_TRACK ? 0x00b5 : (usage == TRANSPORT_PREV_TRACK ? 0x00b6 : (usage == TRANSPORT_STOP ? 0x00b7 : (usage == TRANSPORT_STOP_EJECT ? 0x00b8 : (usage == TRANSPORT_PLAY_PAUSE ? 0x00b1 : (usage == AL_CC_CONFIG ? 0x0183 : (usage == AL_EMAIL ? 0x018c : (usage == AL_CALCULATOR ? 0x0192 : (usage == AL_LOCAL_BROWSER ? 0x0196 : (usage == AC_SEARCH ? 0x021f : (usage == AC_HOME ? 0x0223 : (usage == AC_BACK ? 0x0224 : (usage == AC_FORWARD ? 0x0225 : (usage == AC_STOP ? 0x0226 : (usage == AC_REFRESH ? 0x0227 : (usage == AC_BOOKMARKS ? 0x022a : 0))))))))))))))))))) -static void send_consumer(uint16_t data) +static void send_extra(uint8_t report_id, uint16_t data) { - static uint16_t last_data = 0; - if (data == last_data) - return; - last_data = data; + if (report_id == REPORT_ID_CONSUMER) { + static uint16_t last_data = 0; + if (data == last_data) + return; + last_data = data; - uint16_t bitmap = CONSUMER2BLUEFRUIT(data); + uint16_t bitmap = CONSUMER2BLUEFRUIT(data); #ifdef BLUEFRUIT_TRACE_SERIAL - dprintf("\nData: "); - debug_hex16(data); - dprintf("; bitmap: "); - debug_hex16(bitmap); - dprintf("\n"); - bluefruit_trace_header(); + dprintf("\nData: "); + debug_hex16(data); + dprintf("; bitmap: "); + debug_hex16(bitmap); + dprintf("\n"); + bluefruit_trace_header(); #endif - send_str(PSTR("AT+BLEHIDCONTROLKEY=0x")); - send_bytes((bitmap >> 8) & 0xFF); - send_bytes(bitmap & 0xFF); - send_str(PSTR("\r\n")); + send_str(PSTR("AT+BLEHIDCONTROLKEY=0x")); + send_bytes((bitmap >> 8) & 0xFF); + send_bytes(bitmap & 0xFF); + send_str(PSTR("\r\n")); #ifdef BLUEFRUIT_TRACE_SERIAL - bluefruit_trace_footer(); + bluefruit_trace_footer(); #endif + } } void usart_init(void) diff --git a/keyboards/bpiphany/pegasushoof/keymaps/citadel/config.h b/keyboards/bpiphany/pegasushoof/keymaps/citadel/config.h index 122627e88f..9ff01f7e84 100644 --- a/keyboards/bpiphany/pegasushoof/keymaps/citadel/config.h +++ b/keyboards/bpiphany/pegasushoof/keymaps/citadel/config.h @@ -3,4 +3,4 @@ /* overridden settings: */ #undef PRODUCT -#define PRODUCT Pegasus Hoof Citadel +#define PRODUCT "Pegasus Hoof Citadel" diff --git a/keyboards/buzzard/rev1/config.h b/keyboards/buzzard/rev1/config.h index 66c1a9a42e..67555ba92c 100644 --- a/keyboards/buzzard/rev1/config.h +++ b/keyboards/buzzard/rev1/config.h @@ -35,7 +35,7 @@ #define SPLIT_OLED_ENABLE #endif -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT #define PS2_CLOCK_PIN E6 #define PS2_DATA_PIN D7 diff --git a/keyboards/buzzard/rev1/rules.mk b/keyboards/buzzard/rev1/rules.mk index 9a479c64e6..13c63d5b17 100644 --- a/keyboards/buzzard/rev1/rules.mk +++ b/keyboards/buzzard/rev1/rules.mk @@ -1,3 +1,4 @@ OLED_DRIVER = SSD1306 -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt diff --git a/keyboards/clueboard/17/info.json b/keyboards/clueboard/17/info.json index 5ea4937e50..5d87806703 100644 --- a/keyboards/clueboard/17/info.json +++ b/keyboards/clueboard/17/info.json @@ -4,6 +4,7 @@ "maintainer": "skullydazed", "diode_direction": "COL2ROW", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "features": { "backlight": true, "bootmagic": false, diff --git a/keyboards/clueboard/66/rev1/info.json b/keyboards/clueboard/66/rev1/info.json index bc3e1e23b6..76aa685768 100644 --- a/keyboards/clueboard/66/rev1/info.json +++ b/keyboards/clueboard/66/rev1/info.json @@ -3,6 +3,7 @@ "keyboard_name": "Clueboard 66%", "maintainer": "skullydazed", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/clueboard/66/rev2/info.json b/keyboards/clueboard/66/rev2/info.json index 0cfb690388..7ee7a88df0 100644 --- a/keyboards/clueboard/66/rev2/info.json +++ b/keyboards/clueboard/66/rev2/info.json @@ -3,6 +3,7 @@ "keyboard_name": "Clueboard 66%", "maintainer": "skullydazed", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/clueboard/66/rev3/info.json b/keyboards/clueboard/66/rev3/info.json index 208bc22dd1..0dc0097a52 100644 --- a/keyboards/clueboard/66/rev3/info.json +++ b/keyboards/clueboard/66/rev3/info.json @@ -3,6 +3,7 @@ "keyboard_name": "Clueboard 66% rev3", "maintainer": "skullydazed", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/clueboard/66_hotswap/prototype/info.json b/keyboards/clueboard/66_hotswap/prototype/info.json index 4940af8439..21db54513f 100644 --- a/keyboards/clueboard/66_hotswap/prototype/info.json +++ b/keyboards/clueboard/66_hotswap/prototype/info.json @@ -5,6 +5,7 @@ "debounce": 5, "diode_direction": "COL2ROW", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "features": { "audio": true, "backlight": true, diff --git a/keyboards/clueboard/card/info.json b/keyboards/clueboard/card/info.json index aaeda61b94..739d253971 100644 --- a/keyboards/clueboard/card/info.json +++ b/keyboards/clueboard/card/info.json @@ -4,6 +4,7 @@ "maintainer": "skullydazed", "debounce": 20, "processor": "atmega32u4", + "bootloader": "atmel-dfu", "diode_direction": "ROW2COL", "features": { "audio": true, diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h index 9e7d140809..9b44bfa3ea 100644 --- a/keyboards/converter/ibm_terminal/config.h +++ b/keyboards/converter/ibm_terminal/config.h @@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* * PS/2 USART configuration for ATMega32U4 */ -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART /* XCK for clock line */ #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 @@ -77,7 +77,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* * PS/2 Interrupt configuration */ -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT /* uses INT1 for clock line(ATMega32U4) */ #define PS2_CLOCK_PIN D1 #define PS2_DATA_PIN D0 @@ -99,7 +99,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* * PS/2 Busywait configuration */ -#ifdef PS2_USE_BUSYWAIT +#ifdef PS2_DRIVER_BUSYWAIT #define PS2_CLOCK_PIN D1 #define PS2_DATA_PIN D0 #endif diff --git a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk index e3cb087a76..10f43dc416 100644 --- a/keyboards/converter/ibm_terminal/keymaps/default/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/default/rules.mk @@ -7,4 +7,5 @@ NKRO_ENABLE = yes BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c index 3d6da6eab8..a530a4b83a 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/keymap.c @@ -289,7 +289,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case OS_MAC: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); return false; break; diff --git a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk index 8c5f3d7034..b18dc2d4d8 100644 --- a/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk +++ b/keyboards/converter/ibm_terminal/keymaps/priyadi/rules.mk @@ -1,5 +1,5 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite @@ -14,8 +14,9 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -PS2_USE_USART = yes +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +PS2_ENABLE = yes +PS2_DRIVER = usart # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 277e828269..6304e20fb4 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -16,7 +16,8 @@ NKRO_ENABLE = yes # Enable N-Key Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart CUSTOM_MATRIX = yes SRC = matrix.c led.c diff --git a/keyboards/converter/numeric_keypad_IIe/config.h b/keyboards/converter/numeric_keypad_iie/config.h index f9fd26163d..f9fd26163d 100644 --- a/keyboards/converter/numeric_keypad_IIe/config.h +++ b/keyboards/converter/numeric_keypad_iie/config.h diff --git a/keyboards/converter/numeric_keypad_IIe/info.json b/keyboards/converter/numeric_keypad_iie/info.json index 77b3c38227..77b3c38227 100644 --- a/keyboards/converter/numeric_keypad_IIe/info.json +++ b/keyboards/converter/numeric_keypad_iie/info.json diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c b/keyboards/converter/numeric_keypad_iie/keymaps/default/keymap.c index a8b8f568ff..a8b8f568ff 100644 --- a/keyboards/converter/numeric_keypad_IIe/keymaps/default/keymap.c +++ b/keyboards/converter/numeric_keypad_iie/keymaps/default/keymap.c diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md b/keyboards/converter/numeric_keypad_iie/keymaps/default/readme.md index c58b09d156..c58b09d156 100644 --- a/keyboards/converter/numeric_keypad_IIe/keymaps/default/readme.md +++ b/keyboards/converter/numeric_keypad_iie/keymaps/default/readme.md diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/config.h index 667668959a..667668959a 100644 --- a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/config.h +++ b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/config.h diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/keymap.c index 0255798860..0255798860 100644 --- a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/keymap.c +++ b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/keymap.c diff --git a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/readme.md index 0bccfdb6cf..0bccfdb6cf 100644 --- a/keyboards/converter/numeric_keypad_IIe/keymaps/newbold/readme.md +++ b/keyboards/converter/numeric_keypad_iie/keymaps/newbold/readme.md diff --git a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c b/keyboards/converter/numeric_keypad_iie/numeric_keypad_iie.c index a2f8a5bd6e..341af05b31 100644 --- a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.c +++ b/keyboards/converter/numeric_keypad_iie/numeric_keypad_iie.c @@ -13,4 +13,4 @@ * 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 "numeric_keypad_IIe.h" +#include "numeric_keypad_iie.h" diff --git a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h b/keyboards/converter/numeric_keypad_iie/numeric_keypad_iie.h index 8892b5553b..8892b5553b 100644 --- a/keyboards/converter/numeric_keypad_IIe/numeric_keypad_IIe.h +++ b/keyboards/converter/numeric_keypad_iie/numeric_keypad_iie.h diff --git a/keyboards/converter/numeric_keypad_IIe/readme.md b/keyboards/converter/numeric_keypad_iie/readme.md index 9eba41610a..0de562d808 100644 --- a/keyboards/converter/numeric_keypad_IIe/readme.md +++ b/keyboards/converter/numeric_keypad_iie/readme.md @@ -11,6 +11,6 @@ Hardware Supported: Internal Numeric Keypad IIe PCB (Apple part 820.0081.c), ATm Make example for this keyboard (after setting up your build environment): - make converter/numeric_keypad_IIe:default + make converter/numeric_keypad_iie:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/converter/numeric_keypad_IIe/rules.mk b/keyboards/converter/numeric_keypad_iie/rules.mk index eae129b29b..eae129b29b 100644 --- a/keyboards/converter/numeric_keypad_IIe/rules.mk +++ b/keyboards/converter/numeric_keypad_iie/rules.mk diff --git a/keyboards/cradio/config.h b/keyboards/cradio/config.h index 90a5401590..8a1127b47c 100644 --- a/keyboards/cradio/config.h +++ b/keyboards/cradio/config.h @@ -43,8 +43,6 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* Serial settings */ -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h index 21f3aa0ab4..df17352d9c 100644 --- a/keyboards/crkbd/config.h +++ b/keyboards/crkbd/config.h @@ -61,5 +61,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT - -#define USE_SERIAL diff --git a/keyboards/crkbd/keymaps/armand1m/config.h b/keyboards/crkbd/keymaps/armand1m/config.h index 405d329640..27f01a445a 100644 --- a/keyboards/crkbd/keymaps/armand1m/config.h +++ b/keyboards/crkbd/keymaps/armand1m/config.h @@ -28,11 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - // #define TAPPING_FORCE_HOLD // #define PERMISSIVE_HOLD -#define TAPPING_TERM 300 +#define TAPPING_TERM 300 #define IGNORE_MOD_TAP_INTERRUPT #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/crkbd/keymaps/crkqwes/config.h b/keyboards/crkbd/keymaps/crkqwes/config.h index 1ff720909c..aacd9c04f4 100644 --- a/keyboards/crkbd/keymaps/crkqwes/config.h +++ b/keyboards/crkbd/keymaps/crkqwes/config.h @@ -32,8 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #undef USE_I2C #undef SSD1306OLED -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 // #define RETRO_TAPPING diff --git a/keyboards/crkbd/keymaps/curry/config.h b/keyboards/crkbd/keymaps/curry/config.h index ba9c69ed26..a82b4439cf 100644 --- a/keyboards/crkbd/keymaps/curry/config.h +++ b/keyboards/crkbd/keymaps/curry/config.h @@ -1,7 +1,6 @@ #pragma once #define EE_HANDS -#define USE_SERIAL_PD2 #define OLED_DISABLE_TIMEOUT #define TAPPING_TERM_PER_KEY diff --git a/keyboards/crkbd/keymaps/dsanchezseco/config.h b/keyboards/crkbd/keymaps/dsanchezseco/config.h index bece69ba67..4fd8fc94c4 100644 --- a/keyboards/crkbd/keymaps/dsanchezseco/config.h +++ b/keyboards/crkbd/keymaps/dsanchezseco/config.h @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_MATRIX_I2C -#define USE_SERIAL - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/crkbd/keymaps/gotham/config.h b/keyboards/crkbd/keymaps/gotham/config.h index 2a35f60dad..f7144fb008 100644 --- a/keyboards/crkbd/keymaps/gotham/config.h +++ b/keyboards/crkbd/keymaps/gotham/config.h @@ -3,8 +3,6 @@ #define EE_HANDS #define SPLIT_USB_DETECT -#define USE_SERIAL_PD2 - #define IGNORE_MOD_TAP_INTERRUPT #define PERMISSIVE_HOLD #define TAPPING_TERM 250 diff --git a/keyboards/crkbd/keymaps/gotham/oled.c b/keyboards/crkbd/keymaps/gotham/oled.c index c4ac5e736c..c285a37c5b 100644 --- a/keyboards/crkbd/keymaps/gotham/oled.c +++ b/keyboards/crkbd/keymaps/gotham/oled.c @@ -176,7 +176,7 @@ void add_keylog(uint16_t keycode) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } } diff --git a/keyboards/crkbd/keymaps/hvp/config.h b/keyboards/crkbd/keymaps/hvp/config.h index 106e7535e3..2a161236eb 100644 --- a/keyboards/crkbd/keymaps/hvp/config.h +++ b/keyboards/crkbd/keymaps/hvp/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - //#define TAPPING_FORCE_HOLD //#define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/jarred/config.h b/keyboards/crkbd/keymaps/jarred/config.h index e5c2029a52..a0b7c6ff30 100644 --- a/keyboards/crkbd/keymaps/jarred/config.h +++ b/keyboards/crkbd/keymaps/jarred/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - //#define TAPPING_FORCE_HOLD //#define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/joe_scotto/config.h b/keyboards/crkbd/keymaps/joe_scotto/config.h index e38d4a9183..c76937eae4 100644 --- a/keyboards/crkbd/keymaps/joe_scotto/config.h +++ b/keyboards/crkbd/keymaps/joe_scotto/config.h @@ -61,6 +61,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_TAPPING //#define NO_ACTION_ONESHOT -#define USE_SERIAL - -#define TAPPING_TERM 50
\ No newline at end of file +#define TAPPING_TERM 50 diff --git a/keyboards/crkbd/keymaps/julian_turner/config.h b/keyboards/crkbd/keymaps/julian_turner/config.h index cf3e80b23e..fbe5277c40 100644 --- a/keyboards/crkbd/keymaps/julian_turner/config.h +++ b/keyboards/crkbd/keymaps/julian_turner/config.h @@ -17,7 +17,7 @@ #pragma once #undef MANUFACTURER -#define MANUFACTURER Trner +#define MANUFACTURER "Trner" /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/crkbd/keymaps/kidbrazil/config.h b/keyboards/crkbd/keymaps/kidbrazil/config.h index 2801436709..ab67b42829 100644 --- a/keyboards/crkbd/keymaps/kidbrazil/config.h +++ b/keyboards/crkbd/keymaps/kidbrazil/config.h @@ -29,12 +29,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 #undef PRODUCT -#define PRODUCT CRKBD Loose Transistor Ed. +#define PRODUCT "CRKBD Loose Transistor Ed." #ifdef RGBLIGHT_ENABLE //#undef RGBLED_NUM diff --git a/keyboards/crkbd/keymaps/madhatter/config.h b/keyboards/crkbd/keymaps/madhatter/config.h index 6cbe5befb8..086dd40925 100644 --- a/keyboards/crkbd/keymaps/madhatter/config.h +++ b/keyboards/crkbd/keymaps/madhatter/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/ninjonas/config.h b/keyboards/crkbd/keymaps/ninjonas/config.h index 0c0819130f..174c678769 100644 --- a/keyboards/crkbd/keymaps/ninjonas/config.h +++ b/keyboards/crkbd/keymaps/ninjonas/config.h @@ -24,8 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MASTER_LEFT -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #ifdef RGB_MATRIX_ENABLE diff --git a/keyboards/crkbd/keymaps/oled_sample/config.h b/keyboards/crkbd/keymaps/oled_sample/config.h index 450653e46c..056eb32dd6 100644 --- a/keyboards/crkbd/keymaps/oled_sample/config.h +++ b/keyboards/crkbd/keymaps/oled_sample/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/rjhilgefort/config.h b/keyboards/crkbd/keymaps/rjhilgefort/config.h index cbc7eb03d8..727167b5e2 100644 --- a/keyboards/crkbd/keymaps/rjhilgefort/config.h +++ b/keyboards/crkbd/keymaps/rjhilgefort/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 // 200 is default diff --git a/keyboards/crkbd/keymaps/rpbaptist/config.h b/keyboards/crkbd/keymaps/rpbaptist/config.h index 994aef314e..95485797cc 100644 --- a/keyboards/crkbd/keymaps/rpbaptist/config.h +++ b/keyboards/crkbd/keymaps/rpbaptist/config.h @@ -29,8 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. # define OLED_TIMEOUT 600000 #endif -#define USE_SERIAL_PD2 - // #define FORCE_NKRO #define QMK_ESC_OUTPUT F4 // usually COL @@ -131,7 +129,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_ACTION_ONESHOT #undef PRODUCT -#define PRODUCT Corne Keyboard +#define PRODUCT "Corne Keyboard" #define LCPC_KEYS KC_LCTL, KC_LSFT, KC_9 #define RCPC_KEYS KC_RCTL, KC_RSFT, KC_0 diff --git a/keyboards/crkbd/keymaps/rs/config.h b/keyboards/crkbd/keymaps/rs/config.h index 60f33e7585..f40e008034 100644 --- a/keyboards/crkbd/keymaps/rs/config.h +++ b/keyboards/crkbd/keymaps/rs/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 300 diff --git a/keyboards/crkbd/keymaps/snowe/config.h b/keyboards/crkbd/keymaps/snowe/config.h index 575e39892d..7826ab72ec 100644 --- a/keyboards/crkbd/keymaps/snowe/config.h +++ b/keyboards/crkbd/keymaps/snowe/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 diff --git a/keyboards/crkbd/keymaps/soundmonster/config.h b/keyboards/crkbd/keymaps/soundmonster/config.h index 2d2b394369..12d62175ae 100644 --- a/keyboards/crkbd/keymaps/soundmonster/config.h +++ b/keyboards/crkbd/keymaps/soundmonster/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - // #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 #define RETRO_TAPPING diff --git a/keyboards/crkbd/keymaps/thumb_ctrl/config.h b/keyboards/crkbd/keymaps/thumb_ctrl/config.h index 10b89aede5..4916668244 100755 --- a/keyboards/crkbd/keymaps/thumb_ctrl/config.h +++ b/keyboards/crkbd/keymaps/thumb_ctrl/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 diff --git a/keyboards/crkbd/keymaps/thunderbird2086/oled.c b/keyboards/crkbd/keymaps/thunderbird2086/oled.c index bee9bc26de..108f3e0cdd 100644 --- a/keyboards/crkbd/keymaps/thunderbird2086/oled.c +++ b/keyboards/crkbd/keymaps/thunderbird2086/oled.c @@ -189,7 +189,7 @@ void add_keylog(uint16_t keycode) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } } diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h index 94494bafd8..b6f4420056 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_left/config.h @@ -5,8 +5,6 @@ #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h b/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h index 8cbd8e9078..1cd6ead191 100644 --- a/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h +++ b/keyboards/crkbd/keymaps/vlukash_trackpad_right/config.h @@ -12,8 +12,6 @@ /* Select hand configuration */ #define MASTER_RIGHT -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 300 diff --git a/keyboards/crkbd/keymaps/vxid/config.h b/keyboards/crkbd/keymaps/vxid/config.h index 7a4596f3b2..79e4eadabb 100644 --- a/keyboards/crkbd/keymaps/vxid/config.h +++ b/keyboards/crkbd/keymaps/vxid/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/crkbd/keymaps/xyverz/config.h b/keyboards/crkbd/keymaps/xyverz/config.h index 3390396807..fc5b2bd74c 100644 --- a/keyboards/crkbd/keymaps/xyverz/config.h +++ b/keyboards/crkbd/keymaps/xyverz/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 300 #define PERMISSIVE_HOLD @@ -53,4 +51,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DRIVER_LED_TOTAL RGBLED_NUM #endif -#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c"
\ No newline at end of file +#define OLED_FONT_H "keyboards/crkbd/lib/glcdfont.c" diff --git a/keyboards/crkbd/r2g/config.h b/keyboards/crkbd/r2g/config.h index e451612484..877a59fcc6 100644 --- a/keyboards/crkbd/r2g/config.h +++ b/keyboards/crkbd/r2g/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* ws2812 RGB LED */ diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 9f196a7166..d2a5a6b2c8 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -18,7 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* ws2812 RGB LED */ diff --git a/keyboards/deltasplit75/keymaps/default/config.h b/keyboards/deltasplit75/keymaps/default/config.h index 307531da66..7a05469173 100644 --- a/keyboards/deltasplit75/keymaps/default/config.h +++ b/keyboards/deltasplit75/keymaps/default/config.h @@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/config.h b/keyboards/deltasplit75/keymaps/itsaferbie/config.h index 24c3d5be23..f837c90ad4 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/config.h +++ b/keyboards/deltasplit75/keymaps/itsaferbie/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/deltasplit75/keymaps/mbsurfer/config.h b/keyboards/deltasplit75/keymaps/mbsurfer/config.h index f14678a223..2a2e4ece9f 100644 --- a/keyboards/deltasplit75/keymaps/mbsurfer/config.h +++ b/keyboards/deltasplit75/keymaps/mbsurfer/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/deltasplit75/keymaps/protosplit/config.h b/keyboards/deltasplit75/keymaps/protosplit/config.h index f14678a223..2a2e4ece9f 100644 --- a/keyboards/deltasplit75/keymaps/protosplit/config.h +++ b/keyboards/deltasplit75/keymaps/protosplit/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/dm9records/ergoinu/config.h b/keyboards/dm9records/ergoinu/config.h index 7e6743d677..2171f37241 100644 --- a/keyboards/dm9records/ergoinu/config.h +++ b/keyboards/dm9records/ergoinu/config.h @@ -21,8 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c index 819b76e739..0442c930fe 100644 --- a/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/brickbots/keymap.c @@ -242,7 +242,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { switch (led_mode) { case LEDMODE_MODS: - for (int i=0;i<sizeof(modifiers) / sizeof(modifiers[0]);i++) { + for (int i=0;i<ARRAY_SIZE(modifiers);i++) { if(keycode==modifiers[i]) { if (record->event.pressed) { writePinHigh(led); diff --git a/keyboards/dm9records/plaid/keymaps/default/keymap.c b/keyboards/dm9records/plaid/keymaps/default/keymap.c index d96c250609..aa0bd8b093 100644 --- a/keyboards/dm9records/plaid/keymaps/default/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/default/keymap.c @@ -245,7 +245,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { switch (led_mode) { case LEDMODE_MODS: - for (int i=0;i<sizeof(modifiers) / sizeof(modifiers[0]);i++) { + for (int i=0;i<ARRAY_SIZE(modifiers);i++) { if(keycode==modifiers[i]) { if (record->event.pressed) { writePinHigh(led); diff --git a/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c index 354599f340..9a0e89bd89 100644 --- a/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c +++ b/keyboards/dm9records/plaid/keymaps/stephen-huan/keymap.c @@ -184,7 +184,7 @@ layer_state_t layer_state_set_user(layer_state_t state) { void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) { switch (led_mode) { case LEDMODE_MODS: - for (int i=0;i<sizeof(modifiers) / sizeof(modifiers[0]);i++) { + for (int i=0;i<ARRAY_SIZE(modifiers);i++) { if(keycode==modifiers[i]) { if (record->event.pressed) { writePinHigh(led); diff --git a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c index 8c9af7202b..77534b9a75 100644 --- a/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c +++ b/keyboards/dmqdesign/spin/keymaps/spidey3_pad/keymap.c @@ -111,7 +111,7 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { }; // clang-format off -const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1; +const uint8_t PROGMEM _n_rgb_layers = ARRAY_SIZE(_rgb_layers) - 1; void clear_rgb_layers(void) { dprint("clear_rgb_layers()\n"); diff --git a/keyboards/draculad/config.h b/keyboards/draculad/config.h index c4a3f82117..3570fb41e9 100644 --- a/keyboards/draculad/config.h +++ b/keyboards/draculad/config.h @@ -29,8 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DEBOUNCE 5 - -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 #ifdef OLED_ENABLE diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index e5ead20c12..bb6c5c55e4 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -1,48 +1,5 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x2260 -#define DEVICE_VER 0x0001 -#define MANUFACTURER KBDFans -#define PRODUCT DZ60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3, F4 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* number of backlight levels */ -#define BACKLIGHT_PIN B6 -#define BACKLIGHT_LEVELS 5 - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 16 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 +#pragma once /* sets 'Auto Shift' timeouts */ #define AUTO_SHIFT_TIMEOUT 150 #define NO_AUTO_SHIFT_SPECIAL - -#endif diff --git a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h index f57ac64041..966bc5d064 100644 --- a/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h +++ b/keyboards/dztech/dz65rgb/keymaps/catrielmuller/config.h @@ -1,3 +1,3 @@ #define LEADER_TIMEOUT 300 #define FORCE_NKRO -#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC
\ No newline at end of file +#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WIN, UC_WINC
\ No newline at end of file diff --git a/keyboards/emptystring/NQG/NQG.c b/keyboards/emptystring/NQG/NQG.c deleted file mode 100644 index eedf25e881..0000000000 --- a/keyboards/emptystring/NQG/NQG.c +++ /dev/null @@ -1 +0,0 @@ -#include "NQG.h" diff --git a/keyboards/emptystring/NQG/.noci b/keyboards/emptystring/nqg/.noci index e69de29bb2..e69de29bb2 100644 --- a/keyboards/emptystring/NQG/.noci +++ b/keyboards/emptystring/nqg/.noci diff --git a/keyboards/emptystring/NQG/config.h b/keyboards/emptystring/nqg/config.h index 66abf55834..66abf55834 100644 --- a/keyboards/emptystring/NQG/config.h +++ b/keyboards/emptystring/nqg/config.h diff --git a/keyboards/emptystring/NQG/info.json b/keyboards/emptystring/nqg/info.json index 6ccbc01370..6ccbc01370 100644 --- a/keyboards/emptystring/NQG/info.json +++ b/keyboards/emptystring/nqg/info.json diff --git a/keyboards/emptystring/NQG/keymaps/default/keymap.c b/keyboards/emptystring/nqg/keymaps/default/keymap.c index aca045342c..aca045342c 100644 --- a/keyboards/emptystring/NQG/keymaps/default/keymap.c +++ b/keyboards/emptystring/nqg/keymaps/default/keymap.c diff --git a/keyboards/emptystring/NQG/keymaps/default/rules.mk b/keyboards/emptystring/nqg/keymaps/default/rules.mk index e5ddcae8d9..e5ddcae8d9 100644 --- a/keyboards/emptystring/NQG/keymaps/default/rules.mk +++ b/keyboards/emptystring/nqg/keymaps/default/rules.mk diff --git a/keyboards/emptystring/nqg/nqg.c b/keyboards/emptystring/nqg/nqg.c new file mode 100644 index 0000000000..85eb47e6d3 --- /dev/null +++ b/keyboards/emptystring/nqg/nqg.c @@ -0,0 +1 @@ +#include "nqg.h" diff --git a/keyboards/emptystring/NQG/NQG.h b/keyboards/emptystring/nqg/nqg.h index 943ea6ab16..943ea6ab16 100644 --- a/keyboards/emptystring/NQG/NQG.h +++ b/keyboards/emptystring/nqg/nqg.h diff --git a/keyboards/emptystring/NQG/readme.md b/keyboards/emptystring/nqg/readme.md index 5e78420e2b..b2ceeeb87d 100644 --- a/keyboards/emptystring/NQG/readme.md +++ b/keyboards/emptystring/nqg/readme.md @@ -10,6 +10,6 @@ Hardware Availability: Kits are available from [SA_EndlessGame](http://twitter.c Make example for this keyboard (after setting up your build environment): - make emptystring/NQG:default + make emptystring/nqg:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/emptystring/NQG/rules.mk b/keyboards/emptystring/nqg/rules.mk index e61c7dbfd0..e61c7dbfd0 100644 --- a/keyboards/emptystring/NQG/rules.mk +++ b/keyboards/emptystring/nqg/rules.mk diff --git a/keyboards/ergoslab/keymaps/default/config.h b/keyboards/ergoslab/keymaps/default/config.h index 2c47a7440d..e15fd605f4 100644 --- a/keyboards/ergoslab/keymaps/default/config.h +++ b/keyboards/ergoslab/keymaps/default/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/ergotravel/keymaps/default/config.h b/keyboards/ergotravel/keymaps/default/config.h index 7461cf321d..b827d9ef32 100644 --- a/keyboards/ergotravel/keymaps/default/config.h +++ b/keyboards/ergotravel/keymaps/default/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/ergotravel/keymaps/ian/config.h b/keyboards/ergotravel/keymaps/ian/config.h index dea5b121ea..501919e057 100644 --- a/keyboards/ergotravel/keymaps/ian/config.h +++ b/keyboards/ergotravel/keymaps/ian/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/ergotravel/keymaps/jarred/config.h b/keyboards/ergotravel/keymaps/jarred/config.h index d64187b598..c2948493ed 100644 --- a/keyboards/ergotravel/keymaps/jarred/config.h +++ b/keyboards/ergotravel/keymaps/jarred/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/ergotravel/keymaps/rs/config.h b/keyboards/ergotravel/keymaps/rs/config.h index eeca26ce1d..e50534e99d 100644 --- a/keyboards/ergotravel/keymaps/rs/config.h +++ b/keyboards/ergotravel/keymaps/rs/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/ergotravel/keymaps/via/config.h b/keyboards/ergotravel/keymaps/via/config.h index 9b26bf4c9d..6d9ccb8d6d 100644 --- a/keyboards/ergotravel/keymaps/via/config.h +++ b/keyboards/ergotravel/keymaps/via/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/ergotravel/keymaps/yanfali/config.h b/keyboards/ergotravel/keymaps/yanfali/config.h index 072554991f..52ab36f2db 100644 --- a/keyboards/ergotravel/keymaps/yanfali/config.h +++ b/keyboards/ergotravel/keymaps/yanfali/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/evolv/keymaps/gondolindrim/keymap.c b/keyboards/evolv/keymaps/gondolindrim/keymap.c index 3ab66bd056..bf0944fbd1 100755 --- a/keyboards/evolv/keymaps/gondolindrim/keymap.c +++ b/keyboards/evolv/keymaps/gondolindrim/keymap.c @@ -129,7 +129,7 @@ const encoder_mode_t encoder_modes[] = { // Insert your custom encoder mode here }; -#define NUM_ENCODER_MODES (sizeof(encoder_modes)/sizeof(encoder_modes[0])) // DO NOT CHANGE THIS. NUM_ENCODER_MODES calculates how many modes there are. +#define NUM_ENCODER_MODES ARRAY_SIZE(encoder_modes) // DO NOT CHANGE THIS. NUM_ENCODER_MODES calculates how many modes there are. // This counter is used to track what encoder mode is being used at a certain time int encoder_mode_count = 0; diff --git a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h index b77ac95d7d..5f6d855966 100644 --- a/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h +++ b/keyboards/evyd13/gh80_3700/keymaps/ps2/config.h @@ -16,7 +16,7 @@ #pragma once -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 @@ -51,7 +51,7 @@ #define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1))) #define PS2_USART_RX_VECT USART1_RX_vect #define PS2_MOUSE_ENABLE_SCROLLING -#define PS2_MOUSE_INIT_DELAY 1000 +#define PS2_MOUSE_INIT_DELAY 1000 #define PS2_MOUSE_BTN_LEFT 0 #define PS2_MOUSE_BTN_RIGHT 1 #define PS2_MOUSE_BTN_MIDDLE 2 diff --git a/keyboards/evyd13/gh80_3700/keymaps/ps2/rules.mk b/keyboards/evyd13/gh80_3700/keymaps/ps2/rules.mk index c58a93b73a..3218145955 100644 --- a/keyboards/evyd13/gh80_3700/keymaps/ps2/rules.mk +++ b/keyboards/evyd13/gh80_3700/keymaps/ps2/rules.mk @@ -2,4 +2,5 @@ # change yes to no to disable # PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/ferris/sweep/config.h b/keyboards/ferris/sweep/config.h index 1708ec6e2b..a1043b73b5 100644 --- a/keyboards/ferris/sweep/config.h +++ b/keyboards/ferris/sweep/config.h @@ -42,8 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* Serial settings */ -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/fortitude60/keymaps/default/config.h b/keyboards/fortitude60/keymaps/default/config.h index ac47978bab..7e9b510ff6 100644 --- a/keyboards/fortitude60/keymaps/default/config.h +++ b/keyboards/fortitude60/keymaps/default/config.h @@ -16,5 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -#define USE_SERIAL diff --git a/keyboards/fortitude60/keymaps/via/config.h b/keyboards/fortitude60/keymaps/via/config.h index ac47978bab..7e9b510ff6 100644 --- a/keyboards/fortitude60/keymaps/via/config.h +++ b/keyboards/fortitude60/keymaps/via/config.h @@ -16,5 +16,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -#define USE_SERIAL diff --git a/keyboards/fungo/rev1/config.h b/keyboards/fungo/rev1/config.h index 5026099f7d..ff0444c71c 100644 --- a/keyboards/fungo/rev1/config.h +++ b/keyboards/fungo/rev1/config.h @@ -20,8 +20,6 @@ #include "config_common.h" -/* Use I2C or Serial, not both */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D3 // RX8 /* select keyboard master board - I2C or Serial communication master */ @@ -38,7 +36,7 @@ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4, B5} #define MATRIX_COL_PINS_RIGHT {F7, F6, F5, F4, B5, B4, E6} -#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, D7, D3} // TX +#define MATRIX_ROW_PINS_RIGHT { D1, D0, D4, C6, D7, D3} // TX diff --git a/keyboards/gboards/butterstick/keymaps/default/keymap.c b/keyboards/gboards/butterstick/keymaps/default/keymap.c index 749e9ba071..d0c6af65df 100644 --- a/keyboards/gboards/butterstick/keymaps/default/keymap.c +++ b/keyboards/gboards/butterstick/keymaps/default/keymap.c @@ -180,4 +180,4 @@ uint32_t processQwerty(bool lookup) { } // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); diff --git a/keyboards/gboards/butterstick/sten.c b/keyboards/gboards/butterstick/sten.c index 197abaf92f..8820127848 100644 --- a/keyboards/gboards/butterstick/sten.c +++ b/keyboards/gboards/butterstick/sten.c @@ -21,7 +21,7 @@ uint32_t tChord = 0; // Protects state of cChord #ifndef STENOLAYERS uint32_t stenoLayers[] = { PWR }; -size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); +size_t stenoLayerCount = ARRAY_SIZE(stenoLayers); #endif // Mode state diff --git a/keyboards/gboards/engine/keymap_engine.h b/keyboards/gboards/engine/keymap_engine.h index c8a42a052b..599c1ca3e4 100644 --- a/keyboards/gboards/engine/keymap_engine.h +++ b/keyboards/gboards/engine/keymap_engine.h @@ -114,8 +114,8 @@ void testCollisions(void) { #include "dicts.def" // Get size data back into the engine -size_t funcsLen = sizeof(funDict) / sizeof(funDict[0]); -size_t stringLen = sizeof(strDict) / sizeof(strDict[0]); -size_t keyLen = sizeof(keyDict) / sizeof(keyDict[0]); -size_t comboLen = sizeof(cmbDict) / sizeof(cmbDict[0]); -size_t specialLen = sizeof(spcDict) / sizeof(spcDict[0]); +size_t funcsLen = ARRAY_SIZE(funDict); +size_t stringLen = ARRAY_SIZE(strDict); +size_t keyLen = ARRAY_SIZE(keyDict); +size_t comboLen = ARRAY_SIZE(cmbDict); +size_t specialLen = ARRAY_SIZE(spcDict); diff --git a/keyboards/gboards/g/keymap_engine.h b/keyboards/gboards/g/keymap_engine.h index 93a4423340..055b5941e4 100644 --- a/keyboards/gboards/g/keymap_engine.h +++ b/keyboards/gboards/g/keymap_engine.h @@ -115,8 +115,8 @@ void testCollisions(void) { #include "dicts.def" // Get size data back into the engine -size_t funcsLen = sizeof(funDict) / sizeof(funDict[0]); -size_t stringLen = sizeof(strDict) / sizeof(strDict[0]); -size_t keyLen = sizeof(keyDict) / sizeof(keyDict[0]); -size_t comboLen = sizeof(cmbDict) / sizeof(cmbDict[0]); -size_t specialLen = sizeof(spcDict) / sizeof(spcDict[0]); +size_t funcsLen = ARRAY_SIZE(funDict); +size_t stringLen = ARRAY_SIZE(strDict); +size_t keyLen = ARRAY_SIZE(keyDict); +size_t comboLen = ARRAY_SIZE(cmbDict); +size_t specialLen = ARRAY_SIZE(spcDict); diff --git a/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c b/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c index 29b35f6abd..af7edc2a9b 100644 --- a/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c +++ b/keyboards/gboards/georgi/keymaps/colemak-dh/keymap.c @@ -302,5 +302,5 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); -size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); +size_t stenoLayerCount = ARRAY_SIZE(stenoLayers); diff --git a/keyboards/gboards/georgi/keymaps/default-flipped/keymap.c b/keyboards/gboards/georgi/keymaps/default-flipped/keymap.c index 09243f2a24..a3324b11cd 100644 --- a/keyboards/gboards/georgi/keymaps/default-flipped/keymap.c +++ b/keyboards/gboards/georgi/keymaps/default-flipped/keymap.c @@ -234,4 +234,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); diff --git a/keyboards/gboards/georgi/keymaps/default/keymap.c b/keyboards/gboards/georgi/keymaps/default/keymap.c index 93c551af27..78964dc840 100644 --- a/keyboards/gboards/georgi/keymaps/default/keymap.c +++ b/keyboards/gboards/georgi/keymaps/default/keymap.c @@ -244,4 +244,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); diff --git a/keyboards/gboards/georgi/keymaps/minimal/keymap.c b/keyboards/gboards/georgi/keymaps/minimal/keymap.c index e9294c5cc8..c4e78033bd 100644 --- a/keyboards/gboards/georgi/keymaps/minimal/keymap.c +++ b/keyboards/gboards/georgi/keymaps/minimal/keymap.c @@ -219,4 +219,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); diff --git a/keyboards/gboards/georgi/keymaps/norman/keymap.c b/keyboards/gboards/georgi/keymaps/norman/keymap.c index 4591aab22f..870e460e2c 100644 --- a/keyboards/gboards/georgi/keymaps/norman/keymap.c +++ b/keyboards/gboards/georgi/keymaps/norman/keymap.c @@ -263,4 +263,4 @@ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) }; // Don't fuck with this, thanks. -size_t keymapsCount = sizeof(keymaps)/sizeof(keymaps[0]); +size_t keymapsCount = ARRAY_SIZE(keymaps); diff --git a/keyboards/gboards/georgi/sten.c b/keyboards/gboards/georgi/sten.c index c7469b6394..bd96dee758 100644 --- a/keyboards/gboards/georgi/sten.c +++ b/keyboards/gboards/georgi/sten.c @@ -21,7 +21,7 @@ uint32_t tChord = 0; // Protects state of cChord #ifndef STENOLAYERS uint32_t stenoLayers[] = { PWR }; -size_t stenoLayerCount = sizeof(stenoLayers)/sizeof(stenoLayers[0]); +size_t stenoLayerCount = ARRAY_SIZE(stenoLayers); #endif // Mode state diff --git a/keyboards/gh60/satan/keymaps/admiralStrokers/config.h b/keyboards/gh60/satan/keymaps/admiralStrokers/config.h index 5bb9bd59a8..60c6ad4a12 100644 --- a/keyboards/gh60/satan/keymaps/admiralStrokers/config.h +++ b/keyboards/gh60/satan/keymaps/admiralStrokers/config.h @@ -1,87 +1,3 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#ifndef CONFIG_H_ADMSTROK -#define CONFIG_H_ADMSTROK - -#include "config_common.h" -#include "../../config.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER SATAN -#define PRODUCT GH60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } - -#define BACKLIGHT_PIN B6 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -#define LOCKING_RESYNC_ENABLE - -/* Backlight configuration */ -#define BACKLIGHT_LEVELS 4 - -/* Underlight configuration */ -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#pragma once #define DISABLE_SPACE_CADET_ROLLOVER - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/gh60/satan/keymaps/ben_iso/config.h b/keyboards/gh60/satan/keymaps/ben_iso/config.h index e59015dcbd..34add12727 100644 --- a/keyboards/gh60/satan/keymaps/ben_iso/config.h +++ b/keyboards/gh60/satan/keymaps/ben_iso/config.h @@ -1,57 +1,8 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#ifndef CONFIG_H_BEN -#define CONFIG_H_BEN - -#include "config_common.h" -#include "../../config.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER SATAN -#define PRODUCT GH60 +#pragma once /*MOUSE CONFIG OPTIONS */ - #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 45 #define MOUSEKEY_MAX_SPEED 3 #define MOUSEKEY_WHEEL_DELAY 0 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/gh60/satan/keymaps/fakb/config.h b/keyboards/gh60/satan/keymaps/fakb/config.h index 720b359c1e..f7314a8671 100644 --- a/keyboards/gh60/satan/keymaps/fakb/config.h +++ b/keyboards/gh60/satan/keymaps/fakb/config.h @@ -1,76 +1,9 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER SATAN -#define PRODUCT GH60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B7, D4, B1, B0, B5, B4, D7, D6, B3 } - -#define BACKLIGHT_PIN B6 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 */ -//#define LOCKING_RESYNC_ENABLE - -/* Backlight configuration - */ +#undef BACKLIGHT_LEVELS #define BACKLIGHT_LEVELS 8 -/* Underlight configuration - */ - -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING #define NO_ACTION_ONESHOT -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION - -#endif - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H #define MOUSEKEY_DELAY 0 #define MOUSEKEY_INTERVAL 1 @@ -79,8 +12,5 @@ #define MOUSEKEY_WHEEL_MAX_SPEED 1 #define MOUSEKEY_WHEEL_TIME_TO_MAX 255 -// only change #undef RGB_DI_PIN #define RGB_DI_PIN B2 - -#endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c index 09f8aa147a..3aa3fd828e 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/cedrikl/keymap.c @@ -107,16 +107,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Capslock, Scroll lock and Numlock indicator on Left side lights. void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { - loop_colorset(LED_REGION_A, (sizeof(LED_REGION_A) / sizeof(LED_REGION_A[0])), hsv_cl_blue); - loop_colorset(LED_REGION_B, (sizeof(LED_REGION_B) / sizeof(LED_REGION_B[0])), hsv_cl_purple); - loop_colorset(LED_REGION_L_SIDE, (sizeof(LED_REGION_L_SIDE) / sizeof(LED_REGION_L_SIDE[0])), hsv_cl_purple); - loop_colorset(LED_REGION_R_SIDE, (sizeof(LED_REGION_R_SIDE) / sizeof(LED_REGION_R_SIDE[0])), hsv_cl_purple); + loop_colorset(LED_REGION_A, ARRAY_SIZE(LED_REGION_A), + hsv_cl_blue); + loop_colorset(LED_REGION_B, ARRAY_SIZE(LED_REGION_B), + hsv_cl_purple); + loop_colorset(LED_REGION_L_SIDE, ARRAY_SIZE(LED_REGION_L_SIDE), + hsv_cl_purple); + loop_colorset(LED_REGION_R_SIDE, ARRAY_SIZE(LED_REGION_R_SIDE), + hsv_cl_purple); switch(get_highest_layer(layer_state)){ // special handling per layer case 1: //layer 1 //rgb_matrix_set_color_all(RGB_AZURE); - loop_colorset(LED_REGION_NUMPAD, (sizeof(LED_REGION_NUMPAD) / sizeof(LED_REGION_NUMPAD[0])), hsv_cl_numpad); - loop_colorset(LED_REGION_OTHER, (sizeof(LED_REGION_OTHER) / sizeof(LED_REGION_OTHER[0])), hsv_cl_mods); + loop_colorset(LED_REGION_NUMPAD, + ARRAY_SIZE(LED_REGION_NUMPAD), hsv_cl_numpad); + loop_colorset(LED_REGION_OTHER, ARRAY_SIZE(LED_REGION_OTHER), + hsv_cl_mods); break; default: //layer 0 // @@ -148,7 +154,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_matrix_set_color(LED_L6, bad_rgb.r, bad_rgb.g, bad_rgb.b); rgb_matrix_set_color(LED_L7, bad_rgb.r, bad_rgb.g, bad_rgb.b); rgb_matrix_set_color(LED_L8, bad_rgb.r, bad_rgb.g, bad_rgb.b); - loop_colorset(LED_REGION_CAPS, (sizeof(LED_REGION_CAPS) / sizeof(LED_REGION_CAPS[0])), hsv_cl_bad); + loop_colorset(LED_REGION_CAPS, ARRAY_SIZE(LED_REGION_CAPS), + hsv_cl_bad); } } #endif diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c index ab98693649..9b20399e00 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/gourdo1/keymap.c @@ -538,7 +538,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (paddle_lives == 0) { // Game over - for (uint8_t i = 0; i < sizeof(LED_GAME_OVER) / sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } diff --git a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c index e59db7b984..164ff67e22 100644 --- a/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c +++ b/keyboards/gmmk/pro/rev1/ansi/keymaps/paddlegame/keymap.c @@ -201,15 +201,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { else { ++rgb_value.r; } } - for (uint8_t i=0; i<sizeof(LED_RGB)/sizeof(LED_RGB[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_RGB); i++) { rgb_matrix_set_color(LED_RGB[i], rgb_value.r, rgb_value.g, rgb_value.b); } - for (uint8_t i=0; i<sizeof(LED_WHITE)/sizeof(LED_WHITE[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_WHITE); i++) { rgb_matrix_set_color(LED_WHITE[i], RGB_WHITE); } - for (uint8_t i=0; i<sizeof(LED_GREEN)/sizeof(LED_GREEN[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_GREEN); i++) { rgb_matrix_set_color(LED_GREEN[i], RGB_GREEN); } @@ -274,7 +274,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } else if (paddle_lives == 0) { // Game over - for (uint8_t i=0; i<sizeof(LED_GAME_OVER)/sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } @@ -439,12 +439,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { rgb_matrix_set_color(LED_CAPS, RGB_WHITE); if (caps_flash_on) { - for (uint8_t i=0; i<sizeof(LED_SIDE_LEFT)/sizeof(LED_SIDE_LEFT[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) { rgb_matrix_set_color(LED_SIDE_LEFT[i], RGB_RED); rgb_matrix_set_color(LED_SIDE_RIGHT[i], RGB_RED); } } else { - for (uint8_t i=0; i<sizeof(LED_SIDE_LEFT)/sizeof(LED_SIDE_LEFT[0]); i++) { + for (uint8_t i=0; i<ARRAY_SIZE(LED_SIDE_LEFT); i++) { rgb_matrix_set_color(LED_SIDE_LEFT[i], 0, 0, 0); rgb_matrix_set_color(LED_SIDE_RIGHT[i], 0, 0, 0); } diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c index b28809fdf6..fd941883c5 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/chofstede/keymap.c @@ -84,7 +84,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } HSV tempHSV = {.h = 0, .s = 255, .v = current_value}; RGB tempRGB = hsv_to_rgb(tempHSV); - for (uint8_t i = 0; i < sizeof(left_side_leds) / sizeof(left_side_leds[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(left_side_leds); i++) { rgb_matrix_set_color(left_side_leds[i], tempRGB.r, tempRGB.g, tempRGB.b); rgb_matrix_set_color(right_side_leds[i], tempRGB.r, tempRGB.g, tempRGB.b); } @@ -95,7 +95,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { case 2: //layer one break; case 1: - for (uint8_t i = 0; i < sizeof(l2_functions) / sizeof(l2_functions[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(l2_functions); i++) { RGB_MATRIX_INDICATOR_SET_COLOR(l2_functions[i], 255, 0, 0); } break; diff --git a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c index 30e8fc5f44..004a8c2014 100644 --- a/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c +++ b/keyboards/gmmk/pro/rev1/iso/keymaps/gourdo1/keymap.c @@ -551,7 +551,7 @@ void rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) { } else if (paddle_lives == 0) { // Game over - for (uint8_t i = 0; i < sizeof(LED_GAME_OVER) / sizeof(LED_GAME_OVER[0]); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(LED_GAME_OVER); i++) { rgb_matrix_set_color(LED_GAME_OVER[i], RGB_RED); } diff --git a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h index ad7a3238ce..e5f5c91151 100644 --- a/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h +++ b/keyboards/gopolar/gg86/keymaps/horrortroll/keymap_stuff.h @@ -118,7 +118,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/gopolar/gg86/lib/wave.h b/keyboards/gopolar/gg86/lib/wave.h index 11a3198ab1..f4e5e5052c 100644 --- a/keyboards/gopolar/gg86/lib/wave.h +++ b/keyboards/gopolar/gg86/lib/wave.h @@ -69,7 +69,7 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { char log_char = pgm_read_byte(&code_to_name[keycode]); for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) { diff --git a/keyboards/gray_studio/space65/keymaps/madhatter/config.h b/keyboards/gray_studio/space65/keymaps/madhatter/config.h index e297ebedc5..b591b6d76f 100644 --- a/keyboards/gray_studio/space65/keymaps/madhatter/config.h +++ b/keyboards/gray_studio/space65/keymaps/madhatter/config.h @@ -1,4 +1,4 @@ #pragma once #undef PRODUCT -#define PRODUCT MadHatter\x27s Custom Spacc +#define PRODUCT "MadHatter's Custom Spacc" diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index 703cd93e64..fccdf6424c 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -5,7 +5,7 @@ #define MATRIX_ROWS 8 #define MATRIX_COLS 23 -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/handwired/108key_trackpoint/rules.mk b/keyboards/handwired/108key_trackpoint/rules.mk index ab84b088bc..24f1d9b652 100644 --- a/keyboards/handwired/108key_trackpoint/rules.mk +++ b/keyboards/handwired/108key_trackpoint/rules.mk @@ -17,4 +17,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/handwired/3dortho14u/rev1/info.json b/keyboards/handwired/3dortho14u/rev1/info.json index bd9220281c..2c8e229c02 100644 --- a/keyboards/handwired/3dortho14u/rev1/info.json +++ b/keyboards/handwired/3dortho14u/rev1/info.json @@ -4,6 +4,7 @@ "url": "", "maintainer": "xia0", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/handwired/3dortho14u/rev2/info.json b/keyboards/handwired/3dortho14u/rev2/info.json index 7f241f35ff..28986f295e 100644 --- a/keyboards/handwired/3dortho14u/rev2/info.json +++ b/keyboards/handwired/3dortho14u/rev2/info.json @@ -4,6 +4,7 @@ "url": "", "maintainer": "xia0", "processor": "atmega32u4", + "bootloader": "atmel-dfu", "debounce": 5, "diode_direction": "COL2ROW", "features": { diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h index 1f07965555..0bff14a28d 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h @@ -15,137 +15,25 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ +#undef VENDOR_ID +#undef PRODUCT_ID +#undef DEVICE_VER +#undef MANUFACTURER +#undef PRODUCT #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x4097 #define DEVICE_VER 0x0001 -#define MANUFACTURER Nobody -#define PRODUCT Arrow Pad 21 +#define MANUFACTURER "Nobody" +#define PRODUCT "Arrow Pad 21" -/* key matrix size */ +#undef MATRIX_ROWS +#undef MATRIX_COLS #define MATRIX_ROWS 2 #define MATRIX_COLS 11 -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ +#undef MATRIX_ROW_PINS +#undef MATRIX_COL_PINS #define MATRIX_ROW_PINS { D3, D5 } #define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D4 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk index 6fae940a50..d3e5864916 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/rules.mk @@ -10,5 +10,3 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -CONFIG_H = keymaps/$(KEYMAP)/config.h
\ No newline at end of file diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h index 4bc89f5ce7..3f9997b380 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h @@ -15,139 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#include "config_common.h" - -/* USB Device descriptor parameter */ +#undef VENDOR_ID +#undef PRODUCT_ID +#undef DEVICE_VER +#undef MANUFACTURER +#undef PRODUCT #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x4096 #define DEVICE_VER 0x0001 -#define MANUFACTURER Nobody -#define PRODUCT Arrow Pad 24 - -/* key matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 4 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ -#define MATRIX_ROW_PINS { F0, F1, F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B0, B1, B2, B3 } - -#define BACKLIGHT_PIN B7 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif +#define MANUFACTURER "Nobody" +#define PRODUCT "Arrow Pad 24" diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk index 1cf01b79e4..d7fdd82dfe 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/rules.mk @@ -10,5 +10,3 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. - -CONFIG_H = keymaps/$(KEYMAP)/config.h
\ No newline at end of file diff --git a/keyboards/handwired/brain/keymaps/klackygears/config.h b/keyboards/handwired/brain/keymaps/klackygears/config.h index 4dd99c8b3a..5115f01801 100644 --- a/keyboards/handwired/brain/keymaps/klackygears/config.h +++ b/keyboards/handwired/brain/keymaps/klackygears/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_SERIAL - #define PERMISSIVE_HOLD #define TAPPING_TERM 150 #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/handwired/chiron/keymaps/default/config.h b/keyboards/handwired/chiron/keymaps/default/config.h index 08134a720b..e67664253c 100644 --- a/keyboards/handwired/chiron/keymaps/default/config.h +++ b/keyboards/handwired/chiron/keymaps/default/config.h @@ -16,7 +16,6 @@ #pragma once -#define USE_SERIAL #define MASTER_RIGHT //#define MASTER_LEFT diff --git a/keyboards/handwired/dactyl_manuform/3x5_3/config.h b/keyboards/handwired/dactyl_manuform/3x5_3/config.h index 804db6c7e3..ccd9d0cdc4 100644 --- a/keyboards/handwired/dactyl_manuform/3x5_3/config.h +++ b/keyboards/handwired/dactyl_manuform/3x5_3/config.h @@ -18,10 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -// Communication -// #define USE_I2C -#define USE_SERIAL - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h index 18320c0952..335ac8cd3e 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/default/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -//#define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h index 6b0ddbfe8e..cbacb25ca4 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/dvorak/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h index 07a1323db2..a597d848e2 100644 --- a/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h +++ b/keyboards/handwired/dactyl_manuform/4x5/keymaps/ibnuda/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/handwired/dactyl_manuform/4x5_5/rules.mk b/keyboards/handwired/dactyl_manuform/4x5_5/rules.mk index fec29f5419..3da6aa269a 100644 --- a/keyboards/handwired/dactyl_manuform/4x5_5/rules.mk +++ b/keyboards/handwired/dactyl_manuform/4x5_5/rules.mk @@ -3,7 +3,7 @@ MCU = atmega32u4 # BOOTLOADER for Elite-C -# BOOTLOADER = atmel-dfu +BOOTLOADER = atmel-dfu # BOOTLOADER for Pro Micro # BOOTLOADER = caterina diff --git a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h index 18320c0952..335ac8cd3e 100644 --- a/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/4x6/keymaps/default/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -//#define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h index 87b5b66375..9ee1c3e3cb 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/333fred/config.h @@ -22,7 +22,6 @@ #pragma once -#define USE_SERIAL #define EE_HANDS #undef TAPPING_TERM diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h index 5a20f9473f..4d83c191f3 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/config.h index d046806eaa..68900af390 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/impstyle/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT //#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h index 98dc760031..bcfea1f14f 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/rishka/config.h @@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -// #define USE_SERIAL #define USE_I2C // #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h index e8899a3689..626fe3cbdc 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/squirrel/config.h @@ -18,9 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT //#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h index 29ab59ad66..b63c5788d1 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/swedish/config.h @@ -18,9 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT //#define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/thattolleyguy/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/thattolleyguy/config.h index 2caa5b5bd1..8625389eba 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/thattolleyguy/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/thattolleyguy/config.h @@ -18,10 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -#define USE_SERIAL -// #define USE_I2C - // #define MASTER_LEFT // #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/handwired/dactyl_manuform/5x6/keymaps/uqs/config.h b/keyboards/handwired/dactyl_manuform/5x6/keymaps/uqs/config.h index 4eca68c542..af5842e602 100644 --- a/keyboards/handwired/dactyl_manuform/5x6/keymaps/uqs/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6/keymaps/uqs/config.h @@ -2,8 +2,6 @@ // SPDX-License-Identifier: GPL-2.0-or-later #pragma once -#define USE_SERIAL - #define RGBLED_NUM 12 #define RGBLED_SPLIT {6,6} #define RGBLIGHT_LIMIT_VAL 127 diff --git a/keyboards/handwired/dactyl_manuform/5x6_2_5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_2_5/keymaps/default/config.h index c4fb3742d9..9c1430e431 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_2_5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_2_5/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define EE_HANDS #define KINETIC_SPEED diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h index eea543ae24..68ea3f1933 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/333fred/config.h @@ -22,7 +22,6 @@ #pragma once -#define USE_SERIAL #define EE_HANDS #undef TAPPING_TERM diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/config.h index 9ae7b44a69..5a94cd1760 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/cykedev/config.h @@ -25,7 +25,6 @@ #undef BOOTMAGIC_LITE_COLUMN_RIGHT -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 #define EE_HANDS // #define SPLIT_USB_DETECT diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h index c4fb3742d9..9c1430e431 100644 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define EE_HANDS #define KINETIC_SPEED diff --git a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/via/config.h index dc2d3ee111..f898b9cbd3 100755 --- a/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/via/config.h +++ b/keyboards/handwired/dactyl_manuform/5x6_5/keymaps/via/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define EE_HANDS -#define KINETIC_SPEED
\ No newline at end of file +#define KINETIC_SPEED diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h index 5a20f9473f..4d83c191f3 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h index 5a20f9473f..4d83c191f3 100644 --- a/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h +++ b/keyboards/handwired/dactyl_manuform/5x7/keymaps/via/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h index 5a20f9473f..4d83c191f3 100644 --- a/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/6x6/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json b/keyboards/handwired/dactyl_manuform/dmote/62key/info.json index 7860fe6c6a..7f15634131 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/info.json +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/info.json @@ -3,6 +3,8 @@ "manufacturer": "tshort", "url": "", "maintainer": "veikman", + "processor": "atmega32u4", + "bootloader": "atmel-dfu", "usb": { "vid": "0x444D", "pid": "0x3632", diff --git a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h index 2e1d4f8dc3..1809262044 100644 --- a/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_manuform/dmote/62key/keymaps/default/config.h @@ -1,5 +1,3 @@ #pragma once -#define USE_SERIAL - #define EE_HANDS diff --git a/keyboards/handwired/dactyl_promicro/keymaps/default/config.h b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h index ce8f3501ad..bbcd4fdcf6 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/default/config.h +++ b/keyboards/handwired/dactyl_promicro/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_RIGHT // #define MASTER_RIGHT //#define EE_HANDS diff --git a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h index ce8f3501ad..bbcd4fdcf6 100644 --- a/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h +++ b/keyboards/handwired/dactyl_promicro/keymaps/impstyle/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_RIGHT // #define MASTER_RIGHT //#define EE_HANDS diff --git a/keyboards/handwired/elrgo_s/keymaps/default/config.h b/keyboards/handwired/elrgo_s/keymaps/default/config.h index f3ef42b9b4..b5f8c85421 100644 --- a/keyboards/handwired/elrgo_s/keymaps/default/config.h +++ b/keyboards/handwired/elrgo_s/keymaps/default/config.h @@ -12,11 +12,9 @@ * * 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 USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/handwired/hillside/46/info.json b/keyboards/handwired/hillside/46/info.json index b21906818c..9c69b54d7b 100644 --- a/keyboards/handwired/hillside/46/info.json +++ b/keyboards/handwired/hillside/46/info.json @@ -8,6 +8,7 @@ "tags": ["split", "column stagger", "choc v1", "choc spaced" ], "processor": "atmega32u4", + "bootloader": "atmel-dfu", "matrix_pins": { "rows": ["C6", "D7", "E6", "B5"], diff --git a/keyboards/handwired/hillside/48/info.json b/keyboards/handwired/hillside/48/info.json index 2325c2d8d3..1b6d5a6828 100644 --- a/keyboards/handwired/hillside/48/info.json +++ b/keyboards/handwired/hillside/48/info.json @@ -8,6 +8,7 @@ "tags": ["split", "column stagger", "choc v1", "choc spaced" ], "processor": "atmega32u4", + "bootloader": "atmel-dfu", "matrix_pins": { "rows": ["D7", "E6", "B4", "B5"], diff --git a/keyboards/handwired/hillside/52/info.json b/keyboards/handwired/hillside/52/info.json index 2a78ccd9b6..107162024c 100644 --- a/keyboards/handwired/hillside/52/info.json +++ b/keyboards/handwired/hillside/52/info.json @@ -8,6 +8,7 @@ "tags": ["split", "column stagger", "choc v1", "choc spaced" ], "processor": "atmega32u4", + "bootloader": "atmel-dfu", "matrix_pins": { "rows": ["C6", "D7", "E6", "B4", "B5"], diff --git a/keyboards/handwired/ks63/config.h b/keyboards/handwired/ks63/config.h index 565c48ab9e..31ea4bbe32 100644 --- a/keyboards/handwired/ks63/config.h +++ b/keyboards/handwired/ks63/config.h @@ -68,5 +68,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT #define MASTER_LEFT -#define USE_SERIAL diff --git a/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c b/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c index c2eb4406d1..bc5b025b48 100644 --- a/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c +++ b/keyboards/handwired/lagrange/keymaps/dpapavas/keymap.c @@ -191,8 +191,8 @@ void keyboard_post_init_user(void) { const pin_t pins[] = {D0, D1, D2}; uint8_t i, j; - for (i = 0 ; i < sizeof(pins) / sizeof(pins[0]) + 2 ; i += 1) { - for (j = 0 ; j < sizeof(pins) / sizeof(pins[0]) ; j += 1) { + for (i = 0 ; i < ARRAY_SIZE(pins) + 2 ; i += 1) { + for (j = 0 ; j < ARRAY_SIZE(pins); j += 1) { setPinOutput(pins[j]); writePin(pins[j], (j == i || j == i - 1)); } diff --git a/keyboards/handwired/myskeeb/config.h b/keyboards/handwired/myskeeb/config.h index 0e64b01274..06e8782290 100644 --- a/keyboards/handwired/myskeeb/config.h +++ b/keyboards/handwired/myskeeb/config.h @@ -15,7 +15,6 @@ // Comunication and Split Detection -#define USE_SERIAL #define SOFT_SERIAL_PIN D3 #define SELECT_SOFT_SERIAL_SPEED 1 #define SPLIT_USB_DETECT diff --git a/keyboards/handwired/myskeeb/oled.c b/keyboards/handwired/myskeeb/oled.c index 081ca8395a..3f43590b8e 100644 --- a/keyboards/handwired/myskeeb/oled.c +++ b/keyboards/handwired/myskeeb/oled.c @@ -183,7 +183,7 @@ void add_keylog(uint16_t keycode) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } } diff --git a/keyboards/handwired/nicekey/keymaps/default/keymap.c b/keyboards/handwired/nicekey/keymaps/default/keymap.c index d7539a5c17..a4391eaa30 100644 --- a/keyboards/handwired/nicekey/keymaps/default/keymap.c +++ b/keyboards/handwired/nicekey/keymaps/default/keymap.c @@ -116,7 +116,7 @@ PGM_P const sentences[] PROGMEM = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { - int sentences_size = sizeof(sentences) / sizeof(sentences[0]); + int sentences_size = ARRAY_SIZE(sentences); int i = rand() % sentences_size; switch (keycode) { diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index e137931a1a..66615a3927 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -31,8 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, D4 } -#define USE_SERIAL - /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ diff --git a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c index ecf67d3b3c..65983c8dd8 100644 --- a/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c +++ b/keyboards/handwired/onekey/keymaps/chibios_waiting_test/keymap.c @@ -34,11 +34,11 @@ static const uint32_t waiting_values[] = {0, 1, 5, 10, 25, 50, 100, 150, 200, 50 void housekeeping_task_user(void) { static uint32_t last_bench = 0; if (timer_elapsed32(last_bench) > 500) { - for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) { + for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) { wait_us_polling_with_strobe(waiting_values[i]); wait_us(10); } - for (int i = 0; i < (sizeof(waiting_values) / sizeof(waiting_values[0])); i++) { + for (int i = 0; i < ARRAY_SIZE(waiting_values); i++) { wait_us_yield_with_strobe(waiting_values[i]); wait_us(10); } diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index a447a70abd..9ebcc0bf53 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -210,13 +210,13 @@ enum led_sequence { #endif /* PS/2 mouse */ -#ifdef PS2_USE_BUSYWAIT +#ifdef PS2_DRIVER_BUSYWAIT # define PS2_CLOCK_PIN D3 # define PS2_DATA_PIN D2 #endif /* PS/2 mouse interrupt version */ -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT /* uses INT1 for clock line(ATMega32U4) */ # define PS2_CLOCK_PIN D3 # define PS2_DATA_PIN D2 @@ -237,7 +237,7 @@ enum led_sequence { #endif /* PS/2 mouse USART version */ -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART /* XCK for clock line and RXD for data line */ #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/handwired/promethium/keymaps/default/keymap.c b/keyboards/handwired/promethium/keymaps/default/keymap.c index 77f83361e6..7a6f7f09f2 100644 --- a/keyboards/handwired/promethium/keymaps/default/keymap.c +++ b/keyboards/handwired/promethium/keymaps/default/keymap.c @@ -55,7 +55,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #include "outputselect.h" #include "led.h" -#define COUNT(x) (sizeof (x) / sizeof (*(x))) +#define COUNT(x) ARRAY_SIZE((x)) #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD @@ -606,7 +606,7 @@ void led_set_unicode_input_mode(void) { case UC_LNX: rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); break; - case UC_OSX: + case UC_MAC: rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); break; case UC_WIN: @@ -1213,7 +1213,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case OSX: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); #ifdef RGBSPS_ENABLE led_set_unicode_input_mode(); #endif diff --git a/keyboards/handwired/promethium/keymaps/default/rules.mk b/keyboards/handwired/promethium/keymaps/default/rules.mk index 0183f5fa91..598ade50b8 100644 --- a/keyboards/handwired/promethium/keymaps/default/rules.mk +++ b/keyboards/handwired/promethium/keymaps/default/rules.mk @@ -9,4 +9,5 @@ AUDIO_ENABLE = no # Audio output UNICODEMAP_ENABLE = yes RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 31ce811e53..17fd7a8419 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -57,7 +57,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "outputselect.h" #endif #include "led.h" -#define COUNT(x) (sizeof (x) / sizeof (*(x))) +#define COUNT(x) ARRAY_SIZE((x)) #define KC_WWWB KC_WWW_BACK #define KC_WWWF KC_WWW_FORWARD @@ -609,7 +609,7 @@ void led_set_unicode_input_mode(void) { case UC_LNX: rgbsps_set(LED_IND_LINUX, THEME_COLOR_LINUX); break; - case UC_OSX: + case UC_MAC: rgbsps_set(LED_IND_APPLE, THEME_COLOR_APPLE); break; case UC_WIN: @@ -1216,7 +1216,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return false; break; case OSX: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); #ifdef RGBSPS_ENABLE led_set_unicode_input_mode(); #endif diff --git a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk index 96db4fcbbc..9db01c0a68 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/rules.mk +++ b/keyboards/handwired/promethium/keymaps/priyadi/rules.mk @@ -17,7 +17,8 @@ UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 383800ee01..3960980dff 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -20,7 +20,8 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_MOUSE_ENABLE = yes -PS2_USE_INT = yes +PS2_ENABLE = yes +PS2_DRIVER = interrupt CUSTOM_MATRIX = yes BLUETOOTH_ENABLE = yes BLUETOOTH_DRIVER = BluefruitLE diff --git a/keyboards/handwired/pytest/basic/rules.mk b/keyboards/handwired/pytest/basic/rules.mk index 6b42774dbf..e69de29bb2 100644 --- a/keyboards/handwired/pytest/basic/rules.mk +++ b/keyboards/handwired/pytest/basic/rules.mk @@ -1 +0,0 @@ -MCU = atmega32u4 diff --git a/keyboards/handwired/pytest/has_community/rules.mk b/keyboards/handwired/pytest/has_community/rules.mk index 4161649cbc..051634b3a4 100644 --- a/keyboards/handwired/pytest/has_community/rules.mk +++ b/keyboards/handwired/pytest/has_community/rules.mk @@ -1,3 +1 @@ -MCU = atmega32u4 - LAYOUTS = ortho_1x1 diff --git a/keyboards/handwired/pytest/has_template/rules.mk b/keyboards/handwired/pytest/has_template/rules.mk index 6b42774dbf..e69de29bb2 100644 --- a/keyboards/handwired/pytest/has_template/rules.mk +++ b/keyboards/handwired/pytest/has_template/rules.mk @@ -1 +0,0 @@ -MCU = atmega32u4 diff --git a/keyboards/handwired/pytest/info.json b/keyboards/handwired/pytest/info.json index 331472762c..2ba7d34d52 100644 --- a/keyboards/handwired/pytest/info.json +++ b/keyboards/handwired/pytest/info.json @@ -6,5 +6,7 @@ "vid": "0xFEED", "pid": "0x6465", "device_version": "0.0.1" - } + }, + "processor": "atmega32u4", + "bootloader": "atmel-dfu" } diff --git a/keyboards/handwired/pytest/macro/rules.mk b/keyboards/handwired/pytest/macro/rules.mk index 6b42774dbf..e69de29bb2 100644 --- a/keyboards/handwired/pytest/macro/rules.mk +++ b/keyboards/handwired/pytest/macro/rules.mk @@ -1 +0,0 @@ -MCU = atmega32u4 diff --git a/keyboards/handwired/qc60/keymaps/wntrmln/config.h b/keyboards/handwired/qc60/keymaps/wntrmln/config.h index fabebda534..10887bdf18 100644 --- a/keyboards/handwired/qc60/keymaps/wntrmln/config.h +++ b/keyboards/handwired/qc60/keymaps/wntrmln/config.h @@ -1,5 +1,3 @@ #pragma once -#define USE_SERIAL - #define MASTER_LEFT diff --git a/keyboards/handwired/split89/config.h b/keyboards/handwired/split89/config.h index 8cb8f4e1ea..b6e8157d2c 100644 --- a/keyboards/handwired/split89/config.h +++ b/keyboards/handwired/split89/config.h @@ -54,7 +54,6 @@ COLS = number of cols per side which curently needs to be equal so there are bla * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -#define USE_SERIAL //#define LED_NUM_LOCK_PIN B0 //#define LED_CAPS_LOCK_PIN B1 diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h b/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h index 2a19e47502..4afee280a0 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/default/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h index 3b7ee90f92..d8a98f8d40 100644 --- a/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h +++ b/keyboards/handwired/stef9998/split_5x7/keymaps/stef9998/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -//#define USE_SERIAL #define USE_I2C /* Select hand configuration */ @@ -31,4 +29,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM_PER_KEY #define IGNORE_MOD_TAP_INTERRUPT -#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY
\ No newline at end of file +#define IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c index ba0018a70f..7e15761a98 100644 --- a/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c +++ b/keyboards/handwired/symmetric70_proto/matrix_debug/matrix.c @@ -159,7 +159,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) do { MATRIX_DEBUG_DELAY_START(); is_pressed = false; - for (uint8_t i = 0; i < sizeof(delay_ports) / sizeof(pin_t); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(delay_ports); i++) { # ifdef MATRIX_IO_DELAY_MULSEL writePin(MATRIX_MUL_SELECT, delay_sel[i]); waitInputPinDelay(); diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index a4b468faef..ed6b4f2180 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -5,7 +5,7 @@ #define MATRIX_ROWS 1 #define MATRIX_COLS 3 -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk index f471f00dfc..1a452149c9 100644 --- a/keyboards/handwired/trackpoint/rules.mk +++ b/keyboards/handwired/trackpoint/rules.mk @@ -17,4 +17,5 @@ BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output PS2_MOUSE_ENABLE = yes -PS2_USE_USART = yes +PS2_ENABLE = yes +PS2_DRIVER = usart diff --git a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h index 21bc8e616a..d7bc0f5bd5 100644 --- a/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h +++ b/keyboards/handwired/tractyl_manuform/4x6_right/keymaps/drashna/config.h @@ -18,7 +18,6 @@ // #define USE_I2C // #define SELECT_SOFT_SERIAL_SPEED 1 -// #define SERIAL_USE_MULTI_TRANSACTION #define SPLIT_MODS_ENABLE #define EE_HANDS diff --git a/keyboards/handwired/unk/keymaps/default/config.h b/keyboards/handwired/unk/keymaps/default/config.h index 3d2b4c7be7..3d8851ac43 100644 --- a/keyboards/handwired/unk/keymaps/default/config.h +++ b/keyboards/handwired/unk/keymaps/default/config.h @@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/handwired/unk/rev1/config.h b/keyboards/handwired/unk/rev1/config.h index 611b415d7a..a3e09f1aad 100644 --- a/keyboards/handwired/unk/rev1/config.h +++ b/keyboards/handwired/unk/rev1/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D0 /* define if matrix has ghost */ diff --git a/keyboards/handwired/wakizashi40/info.json b/keyboards/handwired/wakizashi40/info.json index b97d61171b..12a17643a8 100644 --- a/keyboards/handwired/wakizashi40/info.json +++ b/keyboards/handwired/wakizashi40/info.json @@ -4,6 +4,7 @@ "maintainer": "xia0", "debounce": 5, "processor": "atmega32u4", + "bootloader": "atmel-dfu", "diode_direction": "COL2ROW", "features": { "audio": false, diff --git a/keyboards/handwired/xealous/config.h b/keyboards/handwired/xealous/config.h index 2502b4d196..1d94be5a7e 100644 --- a/keyboards/handwired/xealous/config.h +++ b/keyboards/handwired/xealous/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #include "config_common.h" -/* Use I2C or Serial, not both */ #define USE_I2C #define SCL_CLOCK 800000UL diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index 461fbd426b..b96c9c51cf 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -22,10 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 -/* Use I2C or Serial */ -#define USE_SERIAL -//#define USE_MATRIX_I2C - /* Soft Serial defines */ #define SOFT_SERIAL_PIN D2 #define SERIAL_SLAVE_BUFFER_LENGTH ((MATRIX_ROWS)/2) diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index c7e9e35db5..dcf88cc09c 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -25,13 +25,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SPLIT_LAYER_STATE_ENABLE #define SPLIT_LED_STATE_ENABLE -/* Use I2C or Serial */ -#define USE_SERIAL -//#define USE_MATRIX_I2C - /* Soft Serial defines */ #define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/helix/rev2/serial_config_simpleapi.h b/keyboards/helix/rev2/serial_config_simpleapi.h index 0e1dd9e4ac..b51e6f281b 100644 --- a/keyboards/helix/rev2/serial_config_simpleapi.h +++ b/keyboards/helix/rev2/serial_config_simpleapi.h @@ -1,5 +1,4 @@ #pragma once -#undef SERIAL_USE_MULTI_TRANSACTION #define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 #define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 diff --git a/keyboards/hhkb/ansi/keymaps/cinaeco/config.h b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h index 1c714deca4..ed660722c2 100644 --- a/keyboards/hhkb/ansi/keymaps/cinaeco/config.h +++ b/keyboards/hhkb/ansi/keymaps/cinaeco/config.h @@ -1,18 +1,10 @@ -#ifndef CONFIG_CINAECO_H -#define CONFIG_CINAECO_H - -#include "../../config.h" +#pragma once #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER QMK -#define PRODUCT HHKB QMK cinaeco +#define MANUFACTURER "QMK" +#define PRODUCT "HHKB QMK cinaeco" // Increase "Tap" detection window. Avoid missing 'q' or 'z' when typing slowly. #undef TAPPING_TERM #define TAPPING_TERM 230 - -// Uncomment to enable NKRO by default. May cause issues with KVM switches. -//#define FORCE_NKRO - -#endif diff --git a/keyboards/hhkb/ansi/keymaps/mjt/config.h b/keyboards/hhkb/ansi/keymaps/mjt/config.h index b98ec52311..41d1557c6f 100644 --- a/keyboards/hhkb/ansi/keymaps/mjt/config.h +++ b/keyboards/hhkb/ansi/keymaps/mjt/config.h @@ -1,71 +1,3 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCAFE -#define DEVICE_VER 0x0104 -#define MANUFACTURER q.m.k -#define PRODUCT HHKB mod - -/* key matrix size */ -#ifdef HHKB_JP -# define MATRIX_ROWS 16 -#else -# define MATRIX_ROWS 8 -#endif -#define MATRIX_COLS 8 - -#define TAPPING_TERM 200 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +#pragma once #define USB_MAX_POWER_CONSUMPTION 50 - -/* 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 */ -//#define LOCKING_RESYNC_ENABLE - -/* - * Feature disable options - * These options are also useful to firmware size reduction. -*/ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/hhkb/ansi/keymaps/shela/config.h b/keyboards/hhkb/ansi/keymaps/shela/config.h index 25794900c3..db66659165 100644 --- a/keyboards/hhkb/ansi/keymaps/shela/config.h +++ b/keyboards/hhkb/ansi/keymaps/shela/config.h @@ -16,8 +16,6 @@ #pragma once -#include "../../config.h" - /* USB Device descriptor parameter */ #undef VENDOR_ID #define VENDOR_ID 0x0853 @@ -26,9 +24,9 @@ #undef DEVICE_VER #define DEVICE_VER 0x0102 #undef MANUFACTURER -#define MANUFACTURER Topre Corporation +#define MANUFACTURER "Topre Corporation" #undef PRODUCT -#define PRODUCT HHKB Professional +#define PRODUCT "HHKB Professional" #undef TAPPING_TERM #define TAPPING_TERM 210 diff --git a/keyboards/hhkb/rn42/rn42.c b/keyboards/hhkb/rn42/rn42.c index 06665425ce..b35b319352 100644 --- a/keyboards/hhkb/rn42/rn42.c +++ b/keyboards/hhkb/rn42/rn42.c @@ -12,15 +12,13 @@ static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); +static void send_extra(uint8_t report_id, uint16_t data); host_driver_t rn42_driver = { keyboard_leds, send_keyboard, send_mouse, - send_system, - send_consumer + send_extra }; @@ -198,12 +196,6 @@ static void send_mouse(report_mouse_t *report) serial_send(report->v); } -static void send_system(uint16_t data) -{ - // Table 5-6 of RN-BT-DATA-UB - // 81,82,83 scan codes can be used? -} - static uint16_t usage2bits(uint16_t usage) { @@ -228,14 +220,17 @@ static uint16_t usage2bits(uint16_t usage) return 0; } -static void send_consumer(uint16_t data) + +static void send_extra(uint8_t report_id, uint16_t data) { - uint16_t bits = usage2bits(data); - serial_send(0xFD); // Raw report mode - serial_send(3); // length - serial_send(3); // descriptor type - serial_send(bits&0xFF); - serial_send((bits>>8)&0xFF); + if (report_id == REPORT_ID_CONSUMER) { + uint16_t bits = usage2bits(data); + serial_send(0xFD); // Raw report mode + serial_send(3); // length + serial_send(3); // descriptor type + serial_send(bits&0xFF); + serial_send((bits>>8)&0xFF); + } } @@ -243,19 +238,16 @@ static void send_consumer(uint16_t data) static uint8_t config_keyboard_leds(void); static void config_send_keyboard(report_keyboard_t *report); static void config_send_mouse(report_mouse_t *report); -static void config_send_system(uint16_t data); -static void config_send_consumer(uint16_t data); +static void config_send_extra(uint8_t report_id, uint16_t data); host_driver_t rn42_config_driver = { config_keyboard_leds, config_send_keyboard, config_send_mouse, - config_send_system, - config_send_consumer + config_send_extra }; static uint8_t config_keyboard_leds(void) { return leds; } static void config_send_keyboard(report_keyboard_t *report) {} static void config_send_mouse(report_mouse_t *report) {} -static void config_send_system(uint16_t data) {} -static void config_send_consumer(uint16_t data) {} +static void config_send_extra(uint8_t report_id, uint16_t data) {} diff --git a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h index a97b46e5e4..8c4f9d0d4b 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/default/keymap_stuff.h @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h index a97b46e5e4..8c4f9d0d4b 100644 --- a/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h +++ b/keyboards/horrortroll/handwired_k552/keymaps/via/keymap_stuff.h @@ -110,7 +110,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/horrortroll/handwired_k552/lib/wave.c b/keyboards/horrortroll/handwired_k552/lib/wave.c index 79b4e0ced7..700f73aee5 100644 --- a/keyboards/horrortroll/handwired_k552/lib/wave.c +++ b/keyboards/horrortroll/handwired_k552/lib/wave.c @@ -68,7 +68,7 @@ void add_keylog(uint16_t keycode) { keycode = 0; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { char log_char = pgm_read_byte(&code_to_name[keycode]); for (uint8_t j = 0; j < OLED_FONT_WIDTH; j++) { diff --git a/keyboards/ibnuda/squiggle/config.h b/keyboards/ibnuda/squiggle/config.h index 9e4c4f71bc..c12bc97dd8 100644 --- a/keyboards/ibnuda/squiggle/config.h +++ b/keyboards/ibnuda/squiggle/config.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define USE_SERIAL - /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ diff --git a/keyboards/jian/rev1/config.h b/keyboards/jian/rev1/config.h index 988b6d5176..9ac9ad9551 100644 --- a/keyboards/jian/rev1/config.h +++ b/keyboards/jian/rev1/config.h @@ -29,8 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D3, D2, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } -/* Use I2C or Serial, not both */ -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/jian/rev2/config.h b/keyboards/jian/rev2/config.h index 52c8b6ad0e..d44a2b099a 100644 --- a/keyboards/jian/rev2/config.h +++ b/keyboards/jian/rev2/config.h @@ -29,8 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, F5, B1, B3 } #define MATRIX_COL_PINS { D3, D2, B4, F6, F7, B2 } -//#define USE_I2C -#define USE_SERIAL #define SOFT_SERIAL_PIN D1 //#define EE_HANDS diff --git a/keyboards/kagizaraya/scythe/config.h b/keyboards/kagizaraya/scythe/config.h index 1df0fb6593..8baa3816f5 100644 --- a/keyboards/kagizaraya/scythe/config.h +++ b/keyboards/kagizaraya/scythe/config.h @@ -48,7 +48,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN F0 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 9 +#define RGBLED_NUM 9 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 @@ -114,7 +114,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BOOTMAGIC_LITE_COLUMN 0 /* Serial settings */ -#define USE_SERIAL //#define EE_HANDS #define I2C_MASTER_LEFT //#define I2C_MASTER_RIGHT diff --git a/keyboards/kakunpc/suihankey/alpha/config.h b/keyboards/kakunpc/suihankey/alpha/config.h index 2d20aa16e9..a0d75d4407 100644 --- a/keyboards/kakunpc/suihankey/alpha/config.h +++ b/keyboards/kakunpc/suihankey/alpha/config.h @@ -35,8 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } -// #define USE_I2C -// #undef USE_SERIAL /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/suihankey/rev1/config.h b/keyboards/kakunpc/suihankey/rev1/config.h index a1e7183124..3757b6cad7 100644 --- a/keyboards/kakunpc/suihankey/rev1/config.h +++ b/keyboards/kakunpc/suihankey/rev1/config.h @@ -35,8 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } -//#define USE_I2C -//#undef USE_SERIAL /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/suihankey/split/alpha/config.h b/keyboards/kakunpc/suihankey/split/alpha/config.h index b58b370e66..109eeee7eb 100644 --- a/keyboards/kakunpc/suihankey/split/alpha/config.h +++ b/keyboards/kakunpc/suihankey/split/alpha/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, F5, F6, F7 } #define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } #define USE_I2C -#undef USE_SERIAL /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kakunpc/suihankey/split/rev1/config.h b/keyboards/kakunpc/suihankey/split/rev1/config.h index 14b5b2ad9d..2667ed6bb6 100644 --- a/keyboards/kakunpc/suihankey/split/rev1/config.h +++ b/keyboards/kakunpc/suihankey/split/rev1/config.h @@ -36,7 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } #define MATRIX_COL_PINS { F4, F5, F6, F7 } #define USE_I2C -#undef USE_SERIAL /* COL2ROW, ROW2COL*/ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/kapcave/paladin64/config.h b/keyboards/kapcave/paladin64/config.h index 4ab6863c4f..7d913d8f15 100755 --- a/keyboards/kapcave/paladin64/config.h +++ b/keyboards/kapcave/paladin64/config.h @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BOOTMAGIC_LITE_COLUMN 6 /* Only required if you add in a trackpoint hardware to the pcb */ -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 @@ -63,7 +63,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PS2_USART_RX_VECT USART1_RX_vect #endif -#ifdef PS2_USE_INT +#ifdef PS2_DRIVER_INTERRUPT #define PS2_CLOCK_PIN D2 #define PS2_DATA_PIN D5 diff --git a/keyboards/kapl/rev1/config.h b/keyboards/kapl/rev1/config.h index ef6e5449f6..ae88c86572 100644 --- a/keyboards/kapl/rev1/config.h +++ b/keyboards/kapl/rev1/config.h @@ -18,9 +18,6 @@ #define DEBOUNCE 5 -/* Serial settings */ -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/karlb/kbic65/info.json b/keyboards/karlb/kbic65/info.json index d572a92fc2..2d9d7ab037 100644 --- a/keyboards/karlb/kbic65/info.json +++ b/keyboards/karlb/kbic65/info.json @@ -1,5 +1,6 @@ { "keyboard_name": "KBIC65", + "manufacturer": "b-karl", "url": "https://karlb.eu/kbic65/", "maintainer": "b-karl", "diode_direction": "ROW2COL", diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/madhatter/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/madhatter/config.h index bf28016ea4..798dd7b297 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/madhatter/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/madhatter/config.h @@ -17,4 +17,4 @@ #pragma once #undef PRODUCT -#define PRODUCT MadHatter\x27s Hotswap Kbd67 rev1 +#define PRODUCT "MadHatter's Hotswap Kbd67 rev1" diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c index dc27913cca..d18b9928cb 100644 --- a/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c @@ -161,7 +161,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } void eeconfig_init_user(void) { - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); } void matrix_init_user(void) { diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/droxx/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/droxx/config.h index 911051c31a..f6aa35176a 100644 --- a/keyboards/kbdfans/kbd67/rev2/keymaps/droxx/config.h +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/droxx/config.h @@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #undef PRODUCT #define VENDOR_ID 0xAF88 -#define MANUFACTURER Droxx-FurFuzz -#define PRODUCT Carbon v2 4rk +#define MANUFACTURER "Droxx-FurFuzz" +#define PRODUCT "Carbon v2 4rk" /* force N key rollover even on startup regardless of EEPROM setting */ #define FORCE_NKRO diff --git a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h index e387c84b2f..234a44ae70 100644 --- a/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h +++ b/keyboards/kbdfans/kbd67/rev2/keymaps/tucznak/config.h @@ -3,8 +3,8 @@ #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER Potato Inc. -#define PRODUCT Qt3.14 +#define MANUFACTURER "Potato Inc." +#define PRODUCT "Qt3.14" /* send tap key if no layer key was used even after tap delay */ #define TAPPING_TERM 50 diff --git a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h index 73bb22aea4..0b28746081 100644 --- a/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h +++ b/keyboards/kbdfans/kbd75/keymaps/noroadsleft/config.h @@ -16,11 +16,6 @@ #pragma once -#undef MANUFACTURER -#undef PRODUCT -#define MANUFACTURER KBDfans -#define PRODUCT KBD75 rev1 - #define BACKLIGHT_BREATHING #define ANSI_NUBS_ROW 4 diff --git a/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h b/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h index a5578b235f..dd05076444 100644 --- a/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h +++ b/keyboards/kbdfans/kbd75/keymaps/tucznak/config.h @@ -3,8 +3,8 @@ #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER Potato Inc. -#define PRODUCT Qt3.14 +#define MANUFACTURER "Potato Inc." +#define PRODUCT "Qt3.14" /* send tap key if no layer key was used even after tap delay */ #define TAPPING_TERM 250 diff --git a/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h b/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h index 429955b3a0..cfcda1bf7d 100644 --- a/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h +++ b/keyboards/kbdfans/niu_mini/keymaps/tucznak/config.h @@ -3,8 +3,8 @@ #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER Potato Inc. -#define PRODUCT Qt3.14 +#define MANUFACTURER "Potato Inc." +#define PRODUCT "Qt3.14" /* turn off RGB when computer sleeps */ #ifdef RGB_DI_PIN diff --git a/keyboards/keebio/bamfk4/info.json b/keyboards/keebio/bamfk4/info.json index 1d04f4348b..0704d0e1d2 100644 --- a/keyboards/keebio/bamfk4/info.json +++ b/keyboards/keebio/bamfk4/info.json @@ -1,5 +1,6 @@ { "keyboard_name": "BAMFK-4", + "manufacturer": "Keebio", "url": "https://keeb.io", "maintainer": "nooges", "usb": { diff --git a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h index 67c64fd8e8..c44c64603d 100644 --- a/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h +++ b/keyboards/keebio/bfo9000/keymaps/abstractkb/config.h @@ -25,11 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h index be57e385ef..786e107f9c 100644 --- a/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h +++ b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h index 344634063c..2e2f45ea1f 100644 --- a/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/bfo9000/keymaps/insertsnideremarks/config.h @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ @@ -39,4 +36,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGBLED_NUM 12 // #define RGBLIGHT_HUE_STEP 8 // #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8
\ No newline at end of file +// #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h index 344634063c..2e2f45ea1f 100644 --- a/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h +++ b/keyboards/keebio/bfo9000/keymaps/tuesdayjohn/config.h @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ @@ -39,4 +36,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define RGBLED_NUM 12 // #define RGBLIGHT_HUE_STEP 8 // #define RGBLIGHT_SAT_STEP 8 -// #define RGBLIGHT_VAL_STEP 8
\ No newline at end of file +// #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/keebio/fourier/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/default/config.h index 8cea392181..fa952ef4c3 100644 --- a/keyboards/keebio/fourier/keymaps/default/config.h +++ b/keyboards/keebio/fourier/keymaps/default/config.h @@ -20,5 +20,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ // #define USE_I2C diff --git a/keyboards/keebio/fourier/keymaps/maxim/config.h b/keyboards/keebio/fourier/keymaps/maxim/config.h index fb13b56cdc..446b011153 100644 --- a/keyboards/keebio/fourier/keymaps/maxim/config.h +++ b/keyboards/keebio/fourier/keymaps/maxim/config.h @@ -22,8 +22,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - diff --git a/keyboards/keebio/iris/keymaps/333fred/config.h b/keyboards/keebio/iris/keymaps/333fred/config.h index 3c8ba4cb25..0c0250291c 100644 --- a/keyboards/keebio/iris/keymaps/333fred/config.h +++ b/keyboards/keebio/iris/keymaps/333fred/config.h @@ -22,7 +22,6 @@ #pragma once -#define USE_SERIAL #define EE_HANDS #define NO_ACTION_MACRO diff --git a/keyboards/keebio/iris/keymaps/antonlindstrom/config.h b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h index 0997e72512..36b3e42d7e 100644 --- a/keyboards/keebio/iris/keymaps/antonlindstrom/config.h +++ b/keyboards/keebio/iris/keymaps/antonlindstrom/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/ave-63/config.h b/keyboards/keebio/iris/keymaps/ave-63/config.h index 381a494b75..0d0c4764bb 100644 --- a/keyboards/keebio/iris/keymaps/ave-63/config.h +++ b/keyboards/keebio/iris/keymaps/ave-63/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - #define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 150 diff --git a/keyboards/keebio/iris/keymaps/bmoorey/config.h b/keyboards/keebio/iris/keymaps/bmoorey/config.h index 9f8a9afab8..8f173a128b 100644 --- a/keyboards/keebio/iris/keymaps/bmoorey/config.h +++ b/keyboards/keebio/iris/keymaps/bmoorey/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_RIGHT @@ -35,4 +30,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define NO_ACTION_TAPPING -#define NO_ACTION_ONESHOT
\ No newline at end of file +#define NO_ACTION_ONESHOT diff --git a/keyboards/keebio/iris/keymaps/boo/config.h b/keyboards/keebio/iris/keymaps/boo/config.h index 6af7d40852..101fd6e8ce 100644 --- a/keyboards/keebio/iris/keymaps/boo/config.h +++ b/keyboards/keebio/iris/keymaps/boo/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h index 0c4bf8c8f4..bfa48ce0ce 100644 --- a/keyboards/keebio/iris/keymaps/davidrambo/config.h +++ b/keyboards/keebio/iris/keymaps/davidrambo/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define PERMISSIVE_HOLD #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index cf67aa6984..0569f30744 100644 --- a/keyboards/keebio/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h @@ -51,11 +51,11 @@ #undef PRODUCT #if defined(KEYBOARD_keebio_iris_rev2) -# define PRODUCT Drashna Hacked Iris Rev 2 +# define PRODUCT "Drashna Hacked Iris Rev 2" #elif defined(KEYBOARD_keebio_iris_rev3) -# define PRODUCT Drashna Hacked Iris Rev 3 +# define PRODUCT "Drashna Hacked Iris Rev 3" #elif defined(KEYBOARD_keebio_iris_rev4) -# define PRODUCT Drashna Hacked Iris Rev 4 +# define PRODUCT "Drashna Hacked Iris Rev 4" #endif #define SHFT_LED1 6 diff --git a/keyboards/keebio/iris/keymaps/dvorak/config.h b/keyboards/keebio/iris/keymaps/dvorak/config.h index d37d3c3123..4576a6d639 100644 --- a/keyboards/keebio/iris/keymaps/dvorak/config.h +++ b/keyboards/keebio/iris/keymaps/dvorak/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/edvorakjp/config.h b/keyboards/keebio/iris/keymaps/edvorakjp/config.h index f296e29769..864cedae98 100644 --- a/keyboards/keebio/iris/keymaps/edvorakjp/config.h +++ b/keyboards/keebio/iris/keymaps/edvorakjp/config.h @@ -1,9 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/emp/config.h b/keyboards/keebio/iris/keymaps/emp/config.h index a08db4d170..9f1982935a 100644 --- a/keyboards/keebio/iris/keymaps/emp/config.h +++ b/keyboards/keebio/iris/keymaps/emp/config.h @@ -17,9 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ #undef USE_I2C -#define USE_SERIAL /* Select hand configuration */ #undef MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/gary/config.h b/keyboards/keebio/iris/keymaps/gary/config.h index 186aee502c..e337f4403f 100644 --- a/keyboards/keebio/iris/keymaps/gary/config.h +++ b/keyboards/keebio/iris/keymaps/gary/config.h @@ -1,10 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/gsigler/config.h b/keyboards/keebio/iris/keymaps/gsigler/config.h index e1793fb1b8..f568452d0a 100644 --- a/keyboards/keebio/iris/keymaps/gsigler/config.h +++ b/keyboards/keebio/iris/keymaps/gsigler/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/hbbisenieks/config.h b/keyboards/keebio/iris/keymaps/hbbisenieks/config.h index bb3fe25085..20384f4582 100644 --- a/keyboards/keebio/iris/keymaps/hbbisenieks/config.h +++ b/keyboards/keebio/iris/keymaps/hbbisenieks/config.h @@ -19,12 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/impstyle/config.h b/keyboards/keebio/iris/keymaps/impstyle/config.h index 6fc14133f8..68b45c217d 100644 --- a/keyboards/keebio/iris/keymaps/impstyle/config.h +++ b/keyboards/keebio/iris/keymaps/impstyle/config.h @@ -20,9 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -//#define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/iris/keymaps/isolike/config.h b/keyboards/keebio/iris/keymaps/isolike/config.h index 7986b50416..6d3194157e 100644 --- a/keyboards/keebio/iris/keymaps/isolike/config.h +++ b/keyboards/keebio/iris/keymaps/isolike/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h index 8799e01c18..e6fa61d3dd 100644 --- a/keyboards/keebio/iris/keymaps/jasondunsmore/config.h +++ b/keyboards/keebio/iris/keymaps/jasondunsmore/config.h @@ -17,7 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL #define EE_HANDS #define TAPPING_TERM 150 #define TAPPING_TOGGLE 2 diff --git a/keyboards/keebio/iris/keymaps/khord/config.h b/keyboards/keebio/iris/keymaps/khord/config.h index 9b44bca792..22e11c8798 100644 --- a/keyboards/keebio/iris/keymaps/khord/config.h +++ b/keyboards/keebio/iris/keymaps/khord/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/krusli/config.h b/keyboards/keebio/iris/keymaps/krusli/config.h index 72e35c4728..ec8bdffe88 100644 --- a/keyboards/keebio/iris/keymaps/krusli/config.h +++ b/keyboards/keebio/iris/keymaps/krusli/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/mojitas/config.h b/keyboards/keebio/iris/keymaps/mojitas/config.h index 24aecb9f84..d1c8bda27c 100644 --- a/keyboards/keebio/iris/keymaps/mojitas/config.h +++ b/keyboards/keebio/iris/keymaps/mojitas/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/moonfall/config.h b/keyboards/keebio/iris/keymaps/moonfall/config.h index 7986b50416..6d3194157e 100644 --- a/keyboards/keebio/iris/keymaps/moonfall/config.h +++ b/keyboards/keebio/iris/keymaps/moonfall/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h index 16c4302373..b78c52a460 100644 --- a/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -//#define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/iris/keymaps/olligranlund_nordic_v2/config.h b/keyboards/keebio/iris/keymaps/olligranlund_nordic_v2/config.h index c1acce7c38..5e06cb3ac3 100644 --- a/keyboards/keebio/iris/keymaps/olligranlund_nordic_v2/config.h +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic_v2/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -//#define USE_SERIAL #define USE_I2C /* Select hand configuration */ @@ -28,4 +25,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT #define EE_HANDS -#undef RGBLED_NUM
\ No newline at end of file +#undef RGBLED_NUM diff --git a/keyboards/keebio/iris/keymaps/omgvee/config.h b/keyboards/keebio/iris/keymaps/omgvee/config.h index c5899f45f0..c47ec74287 100644 --- a/keyboards/keebio/iris/keymaps/omgvee/config.h +++ b/keyboards/keebio/iris/keymaps/omgvee/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/pvinis/config.h b/keyboards/keebio/iris/keymaps/pvinis/config.h index c2870eba0b..861c474e54 100644 --- a/keyboards/keebio/iris/keymaps/pvinis/config.h +++ b/keyboards/keebio/iris/keymaps/pvinis/config.h @@ -2,13 +2,9 @@ #ifdef PRODUCT # undef PRODUCT -# define PRODUCT Iris Keyboard - pvinis +# define PRODUCT "Iris Keyboard - pvinis" #endif -// Use I2C or Serial, not both. -#define USE_SERIAL -// #define USE_I2C - // Select hand configuration. // #define MASTER_LEFT #define MASTER_RIGHT diff --git a/keyboards/keebio/iris/keymaps/rs/config.h b/keyboards/keebio/iris/keymaps/rs/config.h index 412862c872..8aed71e202 100644 --- a/keyboards/keebio/iris/keymaps/rs/config.h +++ b/keyboards/keebio/iris/keymaps/rs/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/sethBarberee/config.h b/keyboards/keebio/iris/keymaps/sethBarberee/config.h index bd2ec41210..61aa24ff01 100644 --- a/keyboards/keebio/iris/keymaps/sethBarberee/config.h +++ b/keyboards/keebio/iris/keymaps/sethBarberee/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -//#define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/keyboards/keebio/iris/keymaps/vyolle/config.h b/keyboards/keebio/iris/keymaps/vyolle/config.h index 1adbd65b5a..49ad181d9b 100644 --- a/keyboards/keebio/iris/keymaps/vyolle/config.h +++ b/keyboards/keebio/iris/keymaps/vyolle/config.h @@ -17,11 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - #define USE_I2C -// #define USE_SERIAL - #define FORCE_NKRO //Cause it's suprisingly handy. diff --git a/keyboards/keebio/iris/keymaps/wanleg/config.h b/keyboards/keebio/iris/keymaps/wanleg/config.h index 9b90007688..6e774d9de7 100644 --- a/keyboards/keebio/iris/keymaps/wanleg/config.h +++ b/keyboards/keebio/iris/keymaps/wanleg/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL #undef USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/iris/keymaps/xyverz/config.h b/keyboards/keebio/iris/keymaps/xyverz/config.h index d3fc22ca76..f6eb967943 100644 --- a/keyboards/keebio/iris/keymaps/xyverz/config.h +++ b/keyboards/keebio/iris/keymaps/xyverz/config.h @@ -1,33 +1,12 @@ -/* -Copyright 2017 Danny Nguyen <danny@hexwire.com> +#pragma once -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/>. -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "config_common.h" - -#define USE_SERIAL #define EE_HANDS #undef PRODUCT -#define PRODUCT Iris Keyboard +#define PRODUCT "Iris Keyboard" #undef MANUFACTURER -#define MANUFACTURER Ian Sterling +#define MANUFACTURER "Ian Sterling" #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS @@ -35,5 +14,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/keebio/levinson/keymaps/drogglbecher/config.h b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h index ef96ff00b1..1beb80a649 100644 --- a/keyboards/keebio/levinson/keymaps/drogglbecher/config.h +++ b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h @@ -3,11 +3,6 @@ #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -/* #define USE_I2C */ - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/levinson/keymaps/issmirnov/config.h b/keyboards/keebio/levinson/keymaps/issmirnov/config.h index 2f0fbaf33c..6f6f362a8f 100644 --- a/keyboards/keebio/levinson/keymaps/issmirnov/config.h +++ b/keyboards/keebio/levinson/keymaps/issmirnov/config.h @@ -1,10 +1,5 @@ #pragma once -// Use serial comms for split keyboard -// DO NOT enable USE_IDC - board will not respond. -#define USE_SERIAL -//#define USE_I2C - #ifdef RGBLIGHT_ENABLE // Enable animations. +5500 bytes #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/keebio/levinson/keymaps/losinggeneration/config.h b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h index 13023939eb..41bfb4651f 100644 --- a/keyboards/keebio/levinson/keymaps/losinggeneration/config.h +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h @@ -18,11 +18,6 @@ long with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -/* #define USE_I2C */ - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/levinson/keymaps/mmacdougall/config.h b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h index 63dd5bc88f..e3012bbe06 100644 --- a/keyboards/keebio/levinson/keymaps/mmacdougall/config.h +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h @@ -1,10 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/levinson/keymaps/steno/config.h b/keyboards/keebio/levinson/keymaps/steno/config.h index 9cbc148e42..630cc6238f 100644 --- a/keyboards/keebio/levinson/keymaps/steno/config.h +++ b/keyboards/keebio/levinson/keymaps/steno/config.h @@ -17,11 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - #define USE_I2C -// #define USE_SERIAL - #define FORCE_NKRO //For Steno. diff --git a/keyboards/keebio/levinson/keymaps/treadwell/config.h b/keyboards/keebio/levinson/keymaps/treadwell/config.h index 69783937b2..47f85f6dc3 100644 --- a/keyboards/keebio/levinson/keymaps/treadwell/config.h +++ b/keyboards/keebio/levinson/keymaps/treadwell/config.h @@ -3,11 +3,6 @@ #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h index aaf1b7f049..53847db93a 100644 --- a/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h @@ -1,7 +1,5 @@ #pragma once -#define USE_SERIAL - // #define MUSIC_MASK (keycode != KC_NO) /* diff --git a/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h index 776834111d..43696b046c 100644 --- a/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h @@ -18,8 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 150 //reduce time required to register a held key -#define USE_SERIAL - // #define MASTER_LEFT // #define MASTER_RIGHT #define EE_HANDS diff --git a/keyboards/keebio/nyquist/keymaps/bramver/config.h b/keyboards/keebio/nyquist/keymaps/bramver/config.h index c908386e28..468e59af07 100644 --- a/keyboards/keebio/nyquist/keymaps/bramver/config.h +++ b/keyboards/keebio/nyquist/keymaps/bramver/config.h @@ -16,7 +16,6 @@ #pragma once -#define USE_SERIAL #define MASTER_LEFT #define TAPPING_TERM 200 diff --git a/keyboards/keebio/nyquist/keymaps/danielhklein/config.h b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h index 398b285b89..74499ede71 100644 --- a/keyboards/keebio/nyquist/keymaps/danielhklein/config.h +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h @@ -16,8 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once -#define TAPPING_TERM 150 -#define USE_SERIAL +#define TAPPING_TERM 150 #define EE_HANDS #ifdef SUBPROJECT_rev1 diff --git a/keyboards/keebio/nyquist/keymaps/jojiichan/config.h b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h index 39a3df26bf..544b7b7371 100644 --- a/keyboards/keebio/nyquist/keymaps/jojiichan/config.h +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/nyquist/keymaps/kim-kim/config.h b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h index a6246262e5..f3d8ae0a40 100644 --- a/keyboards/keebio/nyquist/keymaps/kim-kim/config.h +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT @@ -38,4 +33,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 -#endif
\ No newline at end of file +#endif diff --git a/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h index 56cacd843e..38d1939580 100644 --- a/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h @@ -18,11 +18,6 @@ long with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -/* #define USE_I2C */ - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/nyquist/keymaps/pitty/config.h b/keyboards/keebio/nyquist/keymaps/pitty/config.h index efc75b22c7..b393e6a5f6 100644 --- a/keyboards/keebio/nyquist/keymaps/pitty/config.h +++ b/keyboards/keebio/nyquist/keymaps/pitty/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h index d0adbfe0c8..72e0e422d6 100644 --- a/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h +++ b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/keebio/nyquist/keymaps/skug/config.h b/keyboards/keebio/nyquist/keymaps/skug/config.h index c366863294..532cdafa97 100644 --- a/keyboards/keebio/nyquist/keymaps/skug/config.h +++ b/keyboards/keebio/nyquist/keymaps/skug/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h index 5cbe3b7010..aafb73fa05 100644 --- a/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* auto shift config */ #define AUTO_SHIFT_TIMEOUT 140 diff --git a/keyboards/keebio/quefrency/keymaps/bcat/config.h b/keyboards/keebio/quefrency/keymaps/bcat/config.h index 69771d36ba..32510e9031 100644 --- a/keyboards/keebio/quefrency/keymaps/bcat/config.h +++ b/keyboards/keebio/quefrency/keymaps/bcat/config.h @@ -16,13 +16,6 @@ #pragma once -/* Quefrency lacks I2C resistors on the right PCB, so the right half doesn't - * work independently. (Presumably the floating I2C lines cause a problem.) - * Using serial seems sufficiently fast in practice and allows both halves to be - * used independently. - */ -#define USE_SERIAL - /* Use an extra LED on the right side since it's wider on the 65% PCB. */ #undef RGBLED_NUM #define RGBLED_NUM 17 diff --git a/keyboards/keebio/quefrency/keymaps/bfiedler/config.h b/keyboards/keebio/quefrency/keymaps/bfiedler/config.h index e7d5ba9ca8..8a35b6f197 100644 --- a/keyboards/keebio/quefrency/keymaps/bfiedler/config.h +++ b/keyboards/keebio/quefrency/keymaps/bfiedler/config.h @@ -22,11 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - // https://docs.qmk.fm/#/tap_hold?id=tap-hold-configuration-options #define TAPPING_TERM 120 //#define PERMISSIVE_HOLD diff --git a/keyboards/keebio/quefrency/keymaps/bjohnson/config.h b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h index 37c6d6672d..82ace2ef68 100644 --- a/keyboards/keebio/quefrency/keymaps/bjohnson/config.h +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h @@ -21,11 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - #define TAPPING_TERM 500 #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/keebio/quefrency/keymaps/bramver/config.h b/keyboards/keebio/quefrency/keymaps/bramver/config.h index c908386e28..468e59af07 100644 --- a/keyboards/keebio/quefrency/keymaps/bramver/config.h +++ b/keyboards/keebio/quefrency/keymaps/bramver/config.h @@ -16,7 +16,6 @@ #pragma once -#define USE_SERIAL #define MASTER_LEFT #define TAPPING_TERM 200 diff --git a/keyboards/keebio/quefrency/keymaps/default60/config.h b/keyboards/keebio/quefrency/keymaps/default60/config.h index f9efe78c5b..497e05b540 100644 --- a/keyboards/keebio/quefrency/keymaps/default60/config.h +++ b/keyboards/keebio/quefrency/keymaps/default60/config.h @@ -20,8 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/default65/config.h b/keyboards/keebio/quefrency/keymaps/default65/config.h index f9efe78c5b..9aae0fdfc2 100644 --- a/keyboards/keebio/quefrency/keymaps/default65/config.h +++ b/keyboards/keebio/quefrency/keymaps/default65/config.h @@ -21,7 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/joestrong/config.h b/keyboards/keebio/quefrency/keymaps/joestrong/config.h index f9efe78c5b..497e05b540 100644 --- a/keyboards/keebio/quefrency/keymaps/joestrong/config.h +++ b/keyboards/keebio/quefrency/keymaps/joestrong/config.h @@ -20,8 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/jonavin/config.h b/keyboards/keebio/quefrency/keymaps/jonavin/config.h index b7883424bc..495638123a 100644 --- a/keyboards/keebio/quefrency/keymaps/jonavin/config.h +++ b/keyboards/keebio/quefrency/keymaps/jonavin/config.h @@ -22,11 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - #define TAPPING_TOGGLE 2 // TT set to two taps diff --git a/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h index bf632842e9..f636c95454 100644 --- a/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h +++ b/keyboards/keebio/quefrency/keymaps/kingwangwong/config.h @@ -21,10 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -//#define USE_I2C #define USB_MAX_POWER_CONSUMPTION 50 diff --git a/keyboards/keebio/quefrency/keymaps/rogthefrog/config.h b/keyboards/keebio/quefrency/keymaps/rogthefrog/config.h index 2332c4f523..0eefd14dfe 100644 --- a/keyboards/keebio/quefrency/keymaps/rogthefrog/config.h +++ b/keyboards/keebio/quefrency/keymaps/rogthefrog/config.h @@ -21,8 +21,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h index f9efe78c5b..497e05b540 100644 --- a/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h +++ b/keyboards/keebio/quefrency/keymaps/unausgeschlafen/config.h @@ -20,8 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/yoryer/config.h b/keyboards/keebio/quefrency/keymaps/yoryer/config.h index f9efe78c5b..497e05b540 100644 --- a/keyboards/keebio/quefrency/keymaps/yoryer/config.h +++ b/keyboards/keebio/quefrency/keymaps/yoryer/config.h @@ -20,8 +20,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C diff --git a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h index ed948a4b3b..0915bbba18 100644 --- a/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h @@ -1,8 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h index 2048232c9c..3b95b3c4d7 100644 --- a/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h +++ b/keyboards/keebio/rorschach/keymaps/tuesdayjohn/config.h @@ -1,8 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/keebio/sinc/keymaps/sethBarberee/config.h b/keyboards/keebio/sinc/keymaps/sethBarberee/config.h index 2d66aefc3e..343567273d 100644 --- a/keyboards/keebio/sinc/keymaps/sethBarberee/config.h +++ b/keyboards/keebio/sinc/keymaps/sethBarberee/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -// -//#define USE_SERIAL -//#define USE_I2C - //#ifdef RGBLIGHT_ENABLE //# ifdef NORMAL_MODE //# undef NORMAL_MODE diff --git a/keyboards/keebio/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 2decb3b3e9..cd640ec8d5 100644 --- a/keyboards/keebio/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -31,7 +31,7 @@ #endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad +#define PRODUCT "Drashnas Viterbi Macro Pad" #ifdef AUDIO_ENABLE # define AUDIO_PIN C6 diff --git a/keyboards/kegen/gboy/info.json b/keyboards/kegen/gboy/info.json index 059dafd89b..ad274c1957 100644 --- a/keyboards/kegen/gboy/info.json +++ b/keyboards/kegen/gboy/info.json @@ -1,5 +1,6 @@ { - "keyboard_name": "Kegen G-Boy", + "keyboard_name": "G-Boy", + "manufacturer": "Kegen", "url": "", "maintainer": "@mattchan", "usb": { diff --git a/keyboards/keyhive/ut472/keymaps/tucznak/config.h b/keyboards/keyhive/ut472/keymaps/tucznak/config.h index b3d402337a..bc3587f542 100644 --- a/keyboards/keyhive/ut472/keymaps/tucznak/config.h +++ b/keyboards/keyhive/ut472/keymaps/tucznak/config.h @@ -3,8 +3,8 @@ #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER Potato Inc. -#define PRODUCT Qt3.14 +#define MANUFACTURER "Potato Inc." +#define PRODUCT "Qt3.14" /* turn off RGB when computer sleeps */ #ifdef RGBLIGHT_ENABLE diff --git a/keyboards/keystonecaps/gameroyadvance/keymaps/default/config.h b/keyboards/keystonecaps/gameroyadvance/keymaps/default/config.h index 693d5684c1..89e9628be8 100644 --- a/keyboards/keystonecaps/gameroyadvance/keymaps/default/config.h +++ b/keyboards/keystonecaps/gameroyadvance/keymaps/default/config.h @@ -21,5 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_SERIAL -#define EE_HANDS
\ No newline at end of file +#define EE_HANDS diff --git a/keyboards/keystonecaps/gameroyadvance/keymaps/default_all/config.h b/keyboards/keystonecaps/gameroyadvance/keymaps/default_all/config.h index 693d5684c1..89e9628be8 100644 --- a/keyboards/keystonecaps/gameroyadvance/keymaps/default_all/config.h +++ b/keyboards/keystonecaps/gameroyadvance/keymaps/default_all/config.h @@ -21,5 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -//#define USE_SERIAL -#define EE_HANDS
\ No newline at end of file +#define EE_HANDS diff --git a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/config.h b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/config.h index 2283439493..496e9d2b2c 100755 --- a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/config.h +++ b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/config.h @@ -16,7 +16,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once -#define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX, UC_OSX +#define UNICODE_SELECTED_MODES UC_WINC, UC_WIN, UC_LNX, UC_MAC #define UNICODE_CYCLE_PERSIST false #ifdef RGB_DI_PIN diff --git a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/readme.md b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/readme.md index f43610a28d..f277cc284a 100755 --- a/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/readme.md +++ b/keyboards/kprepublic/bm43hsrgb/keymaps/bitstarr/readme.md @@ -88,7 +88,7 @@ UNI Layer * Umlauts * Punctuation * Special Characters -* Switching [Input Modes](https://beta.docs.qmk.fm/using-qmk/software-features/feature_unicode#2-input-modes-id-input-modes) (UC_WINC, UC_WIN, UC_LNX, UC_OSX) +* Switching [Input Modes](https://beta.docs.qmk.fm/using-qmk/software-features/feature_unicode#2-input-modes-id-input-modes) (UC_WINC, UC_WIN, UC_LNX, UC_MAC) ## 5 UNI2 Layer ``` diff --git a/keyboards/kudox/config.h b/keyboards/kudox/config.h index 36c8f68b90..e18d46f583 100644 --- a/keyboards/kudox/config.h +++ b/keyboards/kudox/config.h @@ -18,8 +18,6 @@ #include "config_common.h" -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/kudox_full/config.h b/keyboards/kudox_full/config.h index 82b8da8a41..82ea44faf2 100644 --- a/keyboards/kudox_full/config.h +++ b/keyboards/kudox_full/config.h @@ -5,8 +5,6 @@ #include "config_common.h" -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/kudox_game/config.h b/keyboards/kudox_game/config.h index 0b789c1768..121e6632c8 100644 --- a/keyboards/kudox_game/config.h +++ b/keyboards/kudox_game/config.h @@ -19,8 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/DE_programming/config.h b/keyboards/lets_split/keymaps/DE_programming/config.h index 145be14226..990d4ed8d5 100644 --- a/keyboards/lets_split/keymaps/DE_programming/config.h +++ b/keyboards/lets_split/keymaps/DE_programming/config.h @@ -18,10 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/DE_simple/config.h b/keyboards/lets_split/keymaps/DE_simple/config.h index 5a6261c4f7..470fc07854 100644 --- a/keyboards/lets_split/keymaps/DE_simple/config.h +++ b/keyboards/lets_split/keymaps/DE_simple/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/adam/config.h b/keyboards/lets_split/keymaps/adam/config.h index 59a2e5db72..2819051c11 100644 --- a/keyboards/lets_split/keymaps/adam/config.h +++ b/keyboards/lets_split/keymaps/adam/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/aerialviews007/config.h b/keyboards/lets_split/keymaps/aerialviews007/config.h index 60e23f816d..d9787a247f 100644 --- a/keyboards/lets_split/keymaps/aerialviews007/config.h +++ b/keyboards/lets_split/keymaps/aerialviews007/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/cpeters1982/config.h b/keyboards/lets_split/keymaps/cpeters1982/config.h index 3639b9c3f2..bff85f1414 100644 --- a/keyboards/lets_split/keymaps/cpeters1982/config.h +++ b/keyboards/lets_split/keymaps/cpeters1982/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/default/config.h b/keyboards/lets_split/keymaps/default/config.h index 60e23f816d..d9787a247f 100644 --- a/keyboards/lets_split/keymaps/default/config.h +++ b/keyboards/lets_split/keymaps/default/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/dlaroe/config.h b/keyboards/lets_split/keymaps/dlaroe/config.h index 6b31e8d14e..e898e2ed2a 100644 --- a/keyboards/lets_split/keymaps/dlaroe/config.h +++ b/keyboards/lets_split/keymaps/dlaroe/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/fabian/config.h b/keyboards/lets_split/keymaps/fabian/config.h index 6ae40cc2ba..d05757233d 100644 --- a/keyboards/lets_split/keymaps/fabian/config.h +++ b/keyboards/lets_split/keymaps/fabian/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/lets_split/keymaps/halvves/config.h b/keyboards/lets_split/keymaps/halvves/config.h index 70f6d13c7b..4ba90f2cae 100644 --- a/keyboards/lets_split/keymaps/halvves/config.h +++ b/keyboards/lets_split/keymaps/halvves/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/heartrobotninja/config.h b/keyboards/lets_split/keymaps/heartrobotninja/config.h index bb3556e574..d4193609ad 100644 --- a/keyboards/lets_split/keymaps/heartrobotninja/config.h +++ b/keyboards/lets_split/keymaps/heartrobotninja/config.h @@ -23,10 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - /* Select hand configuration */ // #define MASTER_LEFT @@ -55,4 +51,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../rev2fliphalf/config.h" #endif -#endif
\ No newline at end of file +#endif diff --git a/keyboards/lets_split/keymaps/henxing/config.h b/keyboards/lets_split/keymaps/henxing/config.h index 5a6261c4f7..470fc07854 100644 --- a/keyboards/lets_split/keymaps/henxing/config.h +++ b/keyboards/lets_split/keymaps/henxing/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/hvp/config.h b/keyboards/lets_split/keymaps/hvp/config.h index df24c53cde..43d8b0f597 100644 --- a/keyboards/lets_split/keymaps/hvp/config.h +++ b/keyboards/lets_split/keymaps/hvp/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/khord/config.h b/keyboards/lets_split/keymaps/khord/config.h index 71ec20dbc8..9d3cfca20d 100644 --- a/keyboards/lets_split/keymaps/khord/config.h +++ b/keyboards/lets_split/keymaps/khord/config.h @@ -25,11 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 150 -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/mbsurfer/config.h b/keyboards/lets_split/keymaps/mbsurfer/config.h index 6469b4846d..666a2012bd 100644 --- a/keyboards/lets_split/keymaps/mbsurfer/config.h +++ b/keyboards/lets_split/keymaps/mbsurfer/config.h @@ -25,11 +25,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 100 -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/mekberg/README.md b/keyboards/lets_split/keymaps/mekberg/README.md index 5202ec8366..a24a573561 100644 --- a/keyboards/lets_split/keymaps/mekberg/README.md +++ b/keyboards/lets_split/keymaps/mekberg/README.md @@ -36,10 +36,6 @@ The special layer has Reset and EEP Reset keys on the left half, along with medi This option is used because otherwise modtap functions would fail to trigger. This increases reliability for me. -### USE_SERIAL - -N/A - ### EE_HANDS Prepared for EEPROM settings and different keymaps depending on USB port connected, but default master side remains left regardless. diff --git a/keyboards/lets_split/keymaps/mekberg/config.h b/keyboards/lets_split/keymaps/mekberg/config.h index 5523ecb5a3..41ce1b1566 100644 --- a/keyboards/lets_split/keymaps/mekberg/config.h +++ b/keyboards/lets_split/keymaps/mekberg/config.h @@ -24,10 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define TAPPING_TERM 150 #define PERMISSIVE_HOLD -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/mjt/config.h b/keyboards/lets_split/keymaps/mjt/config.h index 735a58b11a..b82efab6b0 100644 --- a/keyboards/lets_split/keymaps/mjt/config.h +++ b/keyboards/lets_split/keymaps/mjt/config.h @@ -16,8 +16,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#define USE_SERIAL - #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/lets_split/keymaps/normacos/config.h b/keyboards/lets_split/keymaps/normacos/config.h index 9f95a869df..e7b95250f3 100644 --- a/keyboards/lets_split/keymaps/normacos/config.h +++ b/keyboards/lets_split/keymaps/normacos/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/pdl/config.h b/keyboards/lets_split/keymaps/pdl/config.h index e79e132c64..89fd6ac202 100644 --- a/keyboards/lets_split/keymaps/pdl/config.h +++ b/keyboards/lets_split/keymaps/pdl/config.h @@ -24,11 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define TAPPING_TERM 200 -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/piemod/config.h b/keyboards/lets_split/keymaps/piemod/config.h index c3975da3ca..b0ccdb0699 100644 --- a/keyboards/lets_split/keymaps/piemod/config.h +++ b/keyboards/lets_split/keymaps/piemod/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/pitty/config.h b/keyboards/lets_split/keymaps/pitty/config.h index 3798f9a647..9becb13968 100644 --- a/keyboards/lets_split/keymaps/pitty/config.h +++ b/keyboards/lets_split/keymaps/pitty/config.h @@ -3,11 +3,6 @@ #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/poker/config.h b/keyboards/lets_split/keymaps/poker/config.h index 5a6261c4f7..470fc07854 100644 --- a/keyboards/lets_split/keymaps/poker/config.h +++ b/keyboards/lets_split/keymaps/poker/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/pyrol/config.h b/keyboards/lets_split/keymaps/pyrol/config.h index f3502585d4..bc0ee4be35 100644 --- a/keyboards/lets_split/keymaps/pyrol/config.h +++ b/keyboards/lets_split/keymaps/pyrol/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define USE_SERIAL - #define MASTER_LEFT #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/lets_split/keymaps/shaymdev/config.h b/keyboards/lets_split/keymaps/shaymdev/config.h index 300dc47c2e..1a46cdf108 100644 --- a/keyboards/lets_split/keymaps/shaymdev/config.h +++ b/keyboards/lets_split/keymaps/shaymdev/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define _MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/smt/config.h b/keyboards/lets_split/keymaps/smt/config.h index 5a6261c4f7..470fc07854 100644 --- a/keyboards/lets_split/keymaps/smt/config.h +++ b/keyboards/lets_split/keymaps/smt/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/tylerwince/config.h b/keyboards/lets_split/keymaps/tylerwince/config.h index 6fff5478da..1dc693d24b 100644 --- a/keyboards/lets_split/keymaps/tylerwince/config.h +++ b/keyboards/lets_split/keymaps/tylerwince/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/via/config.h b/keyboards/lets_split/keymaps/via/config.h index 334be75194..479470a93e 100644 --- a/keyboards/lets_split/keymaps/via/config.h +++ b/keyboards/lets_split/keymaps/via/config.h @@ -26,10 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/vim-mode/config.h b/keyboards/lets_split/keymaps/vim-mode/config.h index 25512a5c97..1fe4384a25 100644 --- a/keyboards/lets_split/keymaps/vim-mode/config.h +++ b/keyboards/lets_split/keymaps/vim-mode/config.h @@ -26,11 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SONG(DVORAK_SOUND) \ } -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/waples/config.h b/keyboards/lets_split/keymaps/waples/config.h index 5221fd011a..17172f729c 100644 --- a/keyboards/lets_split/keymaps/waples/config.h +++ b/keyboards/lets_split/keymaps/waples/config.h @@ -3,10 +3,6 @@ #include "../../config.h" -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/lets_split/keymaps/xk/keymap.c b/keyboards/lets_split/keymaps/xk/keymap.c index 66be11e01c..2b5bf5bfef 100755 --- a/keyboards/lets_split/keymaps/xk/keymap.c +++ b/keyboards/lets_split/keymaps/xk/keymap.c @@ -358,7 +358,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return false; break; case OSX: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); return false; break; } diff --git a/keyboards/lets_split/keymaps/yshrsmz/config.h b/keyboards/lets_split/keymaps/yshrsmz/config.h index 301f1ffc60..23426411d9 100644 --- a/keyboards/lets_split/keymaps/yshrsmz/config.h +++ b/keyboards/lets_split/keymaps/yshrsmz/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* auto shift config */ #define AUTO_SHIFT_TIMEOUT 150 diff --git a/keyboards/lets_split/keymaps/zer09/config.h b/keyboards/lets_split/keymaps/zer09/config.h index 3990c3dc5b..36d94824d5 100644 --- a/keyboards/lets_split/keymaps/zer09/config.h +++ b/keyboards/lets_split/keymaps/zer09/config.h @@ -37,11 +37,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USB_MAX_POWER_CONSUMPTION 50 -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ /* #define MASTER_LEFT */ diff --git a/keyboards/lfkeyboards/lfk65_hs/rules.mk b/keyboards/lfkeyboards/lfk65_hs/rules.mk index bfae80e0c7..618c502e06 100644 --- a/keyboards/lfkeyboards/lfk65_hs/rules.mk +++ b/keyboards/lfkeyboards/lfk65_hs/rules.mk @@ -1,8 +1,5 @@ MCU = atmega32u4 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 -FLASH_SIZE_KB = 32 -BOOT_SECTION_SIZE_KB = 4 -BOOT_LOADER = BootloaderHID +BOOTLOADER = atmel-dfu # Extra source files for IS3731 lighting SRC = TWIlib.c issi.c lighting.c diff --git a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c index 667e8859e2..38eb656892 100644 --- a/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c +++ b/keyboards/lfkeyboards/lfkpad/keymaps/pascalpfeil/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint8_t number_leds[] = {8, 9, 10, 11, 12, 13, 15, 16, 17}; -const uint8_t number_leds_size = sizeof(number_leds) / sizeof(uint8_t); +const uint8_t number_leds_size = ARRAY_SIZE(number_leds); bool led_update_user(led_t led_state) { for (uint8_t i = 0; i < number_leds_size; i++) diff --git a/keyboards/lily58/config.h b/keyboards/lily58/config.h index 57fc7fa7f9..740a3a5b1c 100644 --- a/keyboards/lily58/config.h +++ b/keyboards/lily58/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef SOFT_SERIAL_PIN #define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION #endif #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lily58/keymaps/barabas/config.h b/keyboards/lily58/keymaps/barabas/config.h index c57f19e537..5c9d0a8ec7 100644 --- a/keyboards/lily58/keymaps/barabas/config.h +++ b/keyboards/lily58/keymaps/barabas/config.h @@ -22,4 +22,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define MASTER_LEFT -#define USE_SERIAL_PD2 diff --git a/keyboards/lily58/keymaps/chuan/config.h b/keyboards/lily58/keymaps/chuan/config.h index fa93060db1..a6d1c04f57 100644 --- a/keyboards/lily58/keymaps/chuan/config.h +++ b/keyboards/lily58/keymaps/chuan/config.h @@ -32,8 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define SSD1306OLED -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD /* define tapping term */ diff --git a/keyboards/lily58/keymaps/curry/config.h b/keyboards/lily58/keymaps/curry/config.h index b3e82389d8..f724d23167 100644 --- a/keyboards/lily58/keymaps/curry/config.h +++ b/keyboards/lily58/keymaps/curry/config.h @@ -1,7 +1,6 @@ #pragma once #define EE_HANDS -#define USE_SERIAL_PD2 #define OLED_DISABLE_TIMEOUT #define TAPPING_TERM_PER_KEY diff --git a/keyboards/lily58/keymaps/cykedev/config.h b/keyboards/lily58/keymaps/cykedev/config.h index 4403031cad..dac88dff77 100644 --- a/keyboards/lily58/keymaps/cykedev/config.h +++ b/keyboards/lily58/keymaps/cykedev/config.h @@ -15,7 +15,6 @@ #pragma once -#define USE_SERIAL_PD2 #define MASTER_LEFT #define TAPPING_TERM 200 #define IGNORE_MOD_TAP_INTERRUPT_PER_KEY diff --git a/keyboards/lily58/keymaps/domnantas/config.h b/keyboards/lily58/keymaps/domnantas/config.h index 00104a1365..f32a066c14 100644 --- a/keyboards/lily58/keymaps/domnantas/config.h +++ b/keyboards/lily58/keymaps/domnantas/config.h @@ -30,7 +30,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define SSD1306OLED -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100
\ No newline at end of file +#define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/drasbeck/config.h b/keyboards/lily58/keymaps/drasbeck/config.h index ffaf5f4bc3..21444216aa 100644 --- a/keyboards/lily58/keymaps/drasbeck/config.h +++ b/keyboards/lily58/keymaps/drasbeck/config.h @@ -1,5 +1,5 @@ /* -Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck +Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck * * You are free to: * @@ -20,8 +20,6 @@ Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) 2020 Max Drasbeck // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define ENCODERS_PAD_A { F4 } #define ENCODERS_PAD_B { F5 } #define ENCODER_RESOLUTION 4 diff --git a/keyboards/lily58/keymaps/hvp/config.h b/keyboards/lily58/keymaps/hvp/config.h index 3367748de8..3da6ad8efd 100644 --- a/keyboards/lily58/keymaps/hvp/config.h +++ b/keyboards/lily58/keymaps/hvp/config.h @@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SSD1306OLED -#define USE_SERIAL_PD2 - #define TAPPING_TERM 100 #undef TAPPING_TERM #define TAPPING_TERM 150 @@ -53,4 +51,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_NUM 14 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_SLEEP -*/
\ No newline at end of file +*/ diff --git a/keyboards/lily58/keymaps/jhelvy/config.h b/keyboards/lily58/keymaps/jhelvy/config.h index 019f68ef56..2424011537 100644 --- a/keyboards/lily58/keymaps/jhelvy/config.h +++ b/keyboards/lily58/keymaps/jhelvy/config.h @@ -30,8 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SSD1306OLED -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #undef TAPPING_TERM #define TAPPING_TERM 200 diff --git a/keyboards/lily58/keymaps/mikefightsbears/config.h b/keyboards/lily58/keymaps/mikefightsbears/config.h index 6b9e52c05e..67adc930dd 100644 --- a/keyboards/lily58/keymaps/mikefightsbears/config.h +++ b/keyboards/lily58/keymaps/mikefightsbears/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/muuko/config.h b/keyboards/lily58/keymaps/muuko/config.h index e963355bd5..377ee816fe 100644 --- a/keyboards/lily58/keymaps/muuko/config.h +++ b/keyboards/lily58/keymaps/muuko/config.h @@ -21,7 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once #define EE_HANDS -#define USE_SERIAL_PD2 #define OLED_TIMEOUT 300000 diff --git a/keyboards/lily58/keymaps/narze/config.h b/keyboards/lily58/keymaps/narze/config.h index c494429af7..6466ab910d 100644 --- a/keyboards/lily58/keymaps/narze/config.h +++ b/keyboards/lily58/keymaps/narze/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define COMBO_TERM 20 #define COMBO_COUNT 3 diff --git a/keyboards/lily58/keymaps/ninjonas/config.h b/keyboards/lily58/keymaps/ninjonas/config.h index 19fb5cd92b..d67ac41a17 100644 --- a/keyboards/lily58/keymaps/ninjonas/config.h +++ b/keyboards/lily58/keymaps/ninjonas/config.h @@ -26,8 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define OLED_FONT_H "keyboards/lily58/lib/glcdfont.c" -#define OLED_DISABLE_TIMEOUT
\ No newline at end of file +#define OLED_DISABLE_TIMEOUT diff --git a/keyboards/lily58/keymaps/via/config.h b/keyboards/lily58/keymaps/via/config.h index a3f0fb0a19..38ede27f45 100644 --- a/keyboards/lily58/keymaps/via/config.h +++ b/keyboards/lily58/keymaps/via/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/yshrsmz/config.h b/keyboards/lily58/keymaps/yshrsmz/config.h index 6b9e52c05e..67adc930dd 100644 --- a/keyboards/lily58/keymaps/yshrsmz/config.h +++ b/keyboards/lily58/keymaps/yshrsmz/config.h @@ -28,8 +28,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 diff --git a/keyboards/lily58/keymaps/yuchi/config.h b/keyboards/lily58/keymaps/yuchi/config.h index 130b5642e1..1335b805cd 100644 --- a/keyboards/lily58/keymaps/yuchi/config.h +++ b/keyboards/lily58/keymaps/yuchi/config.h @@ -30,7 +30,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define OLED_DRIVER -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD -#define TAPPING_TERM 100
\ No newline at end of file +#define TAPPING_TERM 100 diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 8205899f5e..b0ef4d165b 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } #define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST diff --git a/keyboards/lime/rev1/config.h b/keyboards/lime/rev1/config.h index 3eaa4e2b60..942cb9c7b8 100644 --- a/keyboards/lime/rev1/config.h +++ b/keyboards/lime/rev1/config.h @@ -48,7 +48,6 @@ #define TAP_CODE_DELAY 10 /* communication between sides */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 #define SPLIT_USB_DETECT diff --git a/keyboards/malevolti/lyra/rev1/config.h b/keyboards/malevolti/lyra/rev1/config.h index 1e0628c6d3..5e4e98d1ff 100644 --- a/keyboards/malevolti/lyra/rev1/config.h +++ b/keyboards/malevolti/lyra/rev1/config.h @@ -1,18 +1,18 @@ /* Copyright 2021 Domanic Calleja - * - * 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/>. - */ + * + * 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 */ @@ -35,5 +35,4 @@ #define DEBOUNCE 5 /* communication between sides */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/maple_computing/christmas_tree/V2017/V2017.c b/keyboards/maple_computing/christmas_tree/V2017/V2017.c deleted file mode 100644 index e367270592..0000000000 --- a/keyboards/maple_computing/christmas_tree/V2017/V2017.c +++ /dev/null @@ -1 +0,0 @@ -#include "V2017.h"
\ No newline at end of file diff --git a/keyboards/maple_computing/christmas_tree/readme.md b/keyboards/maple_computing/christmas_tree/readme.md index 3ba255a18c..2ede444ce4 100644 --- a/keyboards/maple_computing/christmas_tree/readme.md +++ b/keyboards/maple_computing/christmas_tree/readme.md @@ -9,6 +9,6 @@ Keyboard Maintainer: [That-Canadian](https://github.com/That-Canadian) Make example for this keyboard (after setting up your build environment): - make maple_computing/christmas_tree/V2017:default + make maple_computing/christmas_tree/v2017:default See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/maple_computing/christmas_tree/rules.mk b/keyboards/maple_computing/christmas_tree/rules.mk index 45ac883163..ed78c6fabe 100644 --- a/keyboards/maple_computing/christmas_tree/rules.mk +++ b/keyboards/maple_computing/christmas_tree/rules.mk @@ -17,4 +17,4 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no # Audio output RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -DEFAULT_FOLDER = maple_computing/christmas_tree/V2017 +DEFAULT_FOLDER = maple_computing/christmas_tree/v2017 diff --git a/keyboards/maple_computing/christmas_tree/V2017/info.json b/keyboards/maple_computing/christmas_tree/v2017/info.json index 6d00c2519f..6d00c2519f 100644 --- a/keyboards/maple_computing/christmas_tree/V2017/info.json +++ b/keyboards/maple_computing/christmas_tree/v2017/info.json diff --git a/keyboards/maple_computing/christmas_tree/V2017/rules.mk b/keyboards/maple_computing/christmas_tree/v2017/rules.mk index 184a1f2247..184a1f2247 100644 --- a/keyboards/maple_computing/christmas_tree/V2017/rules.mk +++ b/keyboards/maple_computing/christmas_tree/v2017/rules.mk diff --git a/keyboards/maple_computing/christmas_tree/v2017/v2017.c b/keyboards/maple_computing/christmas_tree/v2017/v2017.c new file mode 100644 index 0000000000..22067e5367 --- /dev/null +++ b/keyboards/maple_computing/christmas_tree/v2017/v2017.c @@ -0,0 +1 @@ +#include "v2017.h"
\ No newline at end of file diff --git a/keyboards/maple_computing/christmas_tree/V2017/V2017.h b/keyboards/maple_computing/christmas_tree/v2017/v2017.h index f779c0ed47..f779c0ed47 100644 --- a/keyboards/maple_computing/christmas_tree/V2017/V2017.h +++ b/keyboards/maple_computing/christmas_tree/v2017/v2017.h diff --git a/keyboards/maple_computing/minidox/keymaps/alairock/config.h b/keyboards/maple_computing/minidox/keymaps/alairock/config.h index 6b0069f4b2..c8f5acdea7 100644 --- a/keyboards/maple_computing/minidox/keymaps/alairock/config.h +++ b/keyboards/maple_computing/minidox/keymaps/alairock/config.h @@ -24,8 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -#define USE_SERIAL - #define EE_HANDS /* ws2812 RGB LED */ diff --git a/keyboards/maple_computing/minidox/keymaps/bepo/config.h b/keyboards/maple_computing/minidox/keymaps/bepo/config.h index 7338c24c68..f2a669ec94 100644 --- a/keyboards/maple_computing/minidox/keymaps/bepo/config.h +++ b/keyboards/maple_computing/minidox/keymaps/bepo/config.h @@ -1,6 +1,4 @@ #pragma once -#define USE_SERIAL - #define EE_HANDS #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h b/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h index b2169947b7..0cd6c2b994 100644 --- a/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h +++ b/keyboards/maple_computing/minidox/keymaps/dustypomerleau/config.h @@ -6,7 +6,6 @@ #define IGNORE_MOD_TAP_INTERRUPT #define ONESHOT_TIMEOUT 1000 #define TAPPING_TERM 200 -#define USE_SERIAL // optional configuration: diff --git a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h index 1106412b59..37602b9163 100644 --- a/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h +++ b/keyboards/maple_computing/minidox/keymaps/rsthd_combos/config.h @@ -1,6 +1,5 @@ #pragma once -#define USE_SERIAL #define EE_HANDS diff --git a/keyboards/maple_computing/minidox/keymaps/that_canadian/config.h b/keyboards/maple_computing/minidox/keymaps/that_canadian/config.h index b85609127e..12ff1d970e 100644 --- a/keyboards/maple_computing/minidox/keymaps/that_canadian/config.h +++ b/keyboards/maple_computing/minidox/keymaps/that_canadian/config.h @@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -#define USE_SERIAL - #define EE_HANDS /* ws2812 RGB LED */ @@ -36,4 +34,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 -#endif
\ No newline at end of file +#endif diff --git a/keyboards/maple_computing/minidox/keymaps/xyverz/config.h b/keyboards/maple_computing/minidox/keymaps/xyverz/config.h index ae26f94999..ee2a418183 100644 --- a/keyboards/maple_computing/minidox/keymaps/xyverz/config.h +++ b/keyboards/maple_computing/minidox/keymaps/xyverz/config.h @@ -23,8 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "../../config.h" -#define USE_SERIAL - #define EE_HANDS /* ws2812 RGB LED */ diff --git a/keyboards/maple_computing/minidox/rev1/config.h b/keyboards/maple_computing/minidox/rev1/config.h index 6867fee4b5..fb12f4175a 100644 --- a/keyboards/maple_computing/minidox/rev1/config.h +++ b/keyboards/maple_computing/minidox/rev1/config.h @@ -23,6 +23,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SOFT_SERIAL_PIN D0 -#define USE_SERIAL - //#define EE_HANDS diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 2a3b5b3311..364e8325b1 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define MANUFACTURER "Massdrop Inc." -#define PRODUCT "ALT Keyboard" #define SERIAL_NUM "Unavailable" /* key matrix size */ diff --git a/keyboards/massdrop/alt/info.json b/keyboards/massdrop/alt/info.json index 909ca8904a..6e87648d95 100644 --- a/keyboards/massdrop/alt/info.json +++ b/keyboards/massdrop/alt/info.json @@ -1,5 +1,6 @@ { - "keyboard_name": "ALT", + "keyboard_name": "ALT Keyboard", + "manufacturer": "Massdrop Inc.", "url": "https://www.massdrop.com/buy/massdrop-alt-mechanical-keyboard", "maintainer": "Massdrop", "usb": { diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 8b8625e700..77967e17d3 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -20,8 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" /* USB Device descriptor parameter */ -#define MANUFACTURER "Massdrop Inc." -#define PRODUCT "CTRL Keyboard" #define SERIAL_NUM "Unavailable" /* key matrix size */ diff --git a/keyboards/massdrop/ctrl/info.json b/keyboards/massdrop/ctrl/info.json index 7d0810c630..34c60ca088 100644 --- a/keyboards/massdrop/ctrl/info.json +++ b/keyboards/massdrop/ctrl/info.json @@ -1,5 +1,6 @@ { - "keyboard_name": "CTRL", + "keyboard_name": "CTRL Keyboard", + "manufacturer": "Massdrop Inc.", "url": "https://www.massdrop.com/buy/massdrop-ctrl-mechanical-keyboard", "maintainer": "Massdrop", "usb": { diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index ddcf30b68d..eee2eaf628 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -129,8 +129,7 @@ static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { { 66, 66, 66}, { 45, 45, 45}, { 23, 23, 23}, }, }; -static const uint8_t COLOR_PATTERNS_COUNT = ( - sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); +static const uint8_t COLOR_PATTERNS_COUNT = ARRAY_SIZE(COLOR_PATTERNS); /** * trimed down version of `ISSI3733_LED_MAP`: diff --git a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c index 689a9ce36e..90020fd3f5 100644 --- a/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c +++ b/keyboards/mechkeys/mechmini/v2/keymaps/wsturgiss/keymap.c @@ -65,7 +65,7 @@ void matrix_scan_user(void) { } //tableflip (LEADER - TF) SEQ_TWO_KEYS(KC_T, KC_F) { - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); send_unicode_string("(ノಠ痊ಠ)ノ彡┻━┻"); } //screencap (LEADER - SC) @@ -74,7 +74,7 @@ void matrix_scan_user(void) { } //screencap (LEADER - TM) SEQ_TWO_KEYS(KC_T, KC_M) { - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); register_unicode(0x2122); // ™ } /* diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c index 50b1b6471c..9dbd4d3f19 100644 --- a/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff/keymap.c @@ -83,7 +83,7 @@ static const encoder_key PROGMEM encoder_keys[] = { {"Play", "", "", KC_MEDIA_PLAY_PAUSE} }; -#define NUMBER_OF_ENCODER_KEYS sizeof(encoder_keys)/sizeof(encoder_keys[0]) +#define NUMBER_OF_ENCODER_KEYS ARRAY_SIZE(encoder_keys) static uint8_t selected_encoder_key_id = 0; static encoder_key selected_encoder_key; diff --git a/keyboards/mechwild/mercutio/keymaps/fearless_spiff_en/keymap.c b/keyboards/mechwild/mercutio/keymaps/fearless_spiff_en/keymap.c index 267d3add14..9b28c68672 100644 --- a/keyboards/mechwild/mercutio/keymaps/fearless_spiff_en/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/fearless_spiff_en/keymap.c @@ -82,7 +82,7 @@ static const encoder_key PROGMEM encoder_keys[] = { {"Play", "", "", KC_MEDIA_PLAY_PAUSE} }; -#define NUMBER_OF_ENCODER_KEYS sizeof(encoder_keys)/sizeof(encoder_keys[0]) +#define NUMBER_OF_ENCODER_KEYS ARRAY_SIZE(encoder_keys) static uint8_t selected_encoder_key_id = 0; static encoder_key selected_encoder_key; diff --git a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c index 5c22abee3f..a8f1d488d4 100755 --- a/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/mercutio/keymaps/jonavin/keymap.c @@ -71,7 +71,7 @@ static const keycodedescType PROGMEM keyselection[] = { {"FLASH", QK_BOOT}, // firmware flash mode }; -#define MAX_KEYSELECTION sizeof(keyselection)/sizeof(keyselection[0]) +#define MAX_KEYSELECTION ARRAY_SIZE(keyselection) static uint8_t selectedkey_idx = 0; static keycodedescType selectedkey_rec; diff --git a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c index b0288c5d7a..58db97d093 100644 --- a/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c +++ b/keyboards/mechwild/murphpad/keymaps/jonavin/keymap.c @@ -178,7 +178,7 @@ static const keycodedescType PROGMEM keyselection[] = { {"QK_BOOT", QK_BOOT}, // firmware flash mode }; -#define MAX_KEYSELECTION sizeof(keyselection)/sizeof(keyselection[0]) +#define MAX_KEYSELECTION ARRAY_SIZE(keyselection) static uint8_t selectedkey_idx = 0; static keycodedescType selectedkey_rec; diff --git a/keyboards/mechwild/puckbuddy/puckbuddy.c b/keyboards/mechwild/puckbuddy/puckbuddy.c index b82d06f565..495cb7e825 100644 --- a/keyboards/mechwild/puckbuddy/puckbuddy.c +++ b/keyboards/mechwild/puckbuddy/puckbuddy.c @@ -16,7 +16,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = GLIDEPOINT_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) +#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array) void board_init(void) { // B9 is configured as I2C1_SDA in the board file; that function must be diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index 99ebf5b9af..a874688171 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN F4 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 6 +#define RGBLED_NUM 6 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 @@ -119,8 +119,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BOOTMAGIC_LITE_ROW 0 // #define BOOTMAGIC_LITE_COLUMN 0 -/* Serial settings */ -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/mint60/keymaps/default/config.h b/keyboards/mint60/keymaps/default/config.h index 9af2f45cfb..a044163108 100644 --- a/keyboards/mint60/keymaps/default/config.h +++ b/keyboards/mint60/keymaps/default/config.h @@ -16,8 +16,4 @@ #pragma once -/* Use I2C or Serial, not both */ -// #define USE_SERIAL -// #define USE_I2C - // #define MASTER_RIGHT diff --git a/keyboards/mint60/keymaps/eucalyn/config.h b/keyboards/mint60/keymaps/eucalyn/config.h index 9af2f45cfb..a044163108 100644 --- a/keyboards/mint60/keymaps/eucalyn/config.h +++ b/keyboards/mint60/keymaps/eucalyn/config.h @@ -16,8 +16,4 @@ #pragma once -/* Use I2C or Serial, not both */ -// #define USE_SERIAL -// #define USE_I2C - // #define MASTER_RIGHT diff --git a/keyboards/mitosis/keymaps/datagrok/keymap.c b/keyboards/mitosis/keymaps/datagrok/keymap.c index 7c77eb882f..848af3de00 100644 --- a/keyboards/mitosis/keymaps/datagrok/keymap.c +++ b/keyboards/mitosis/keymaps/datagrok/keymap.c @@ -97,7 +97,7 @@ const bool defaultlayers[] = { [_xN] = false, [_xF] = false, }; -const size_t defaultlayers_n = sizeof(defaultlayers) / sizeof(defaultlayers[0]); +const size_t defaultlayers_n = ARRAY_SIZE(defaultlayers); // New keycode KC_LAYO rotates between available default layers (for e.g., // selecting a base layout). Shift+KC_LAYO makes the current one persistent. diff --git a/keyboards/molecule/config.h b/keyboards/molecule/config.h index 8f7396dfc8..d7f218f74f 100755 --- a/keyboards/molecule/config.h +++ b/keyboards/molecule/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ // #define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 -// #define USE_SERIAL //#define BACKLIGHT_PIN B7 //#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/momoka_ergo/config.h b/keyboards/momoka_ergo/config.h index e480581220..03bd5fdfc0 100644 --- a/keyboards/momoka_ergo/config.h +++ b/keyboards/momoka_ergo/config.h @@ -53,7 +53,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_VAL_STEP 8 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCE 3 +#define DEBOUNCE 3 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST @@ -107,8 +107,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 -//#define BOOTMAGIC_LITE_COLUMN 0 +//#define BOOTMAGIC_LITE_COLUMN 0 -#define USE_SERIAL #define SPLIT_USB_DETECT #define EE_HANDS diff --git a/keyboards/moonlander/keymaps/jjerrell/config.h b/keyboards/moonlander/keymaps/jjerrell/config.h index 1fd17fbbe3..aa4bf3885e 100644 --- a/keyboards/moonlander/keymaps/jjerrell/config.h +++ b/keyboards/moonlander/keymaps/jjerrell/config.h @@ -22,6 +22,6 @@ #define ORYX_CONFIGURATOR #undef PRODUCT -#define PRODUCT Moonlander Mark I - Modified by <@jjerrell> +#define PRODUCT "Moonlander Mark I - Modified by <@jjerrell>" #define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h index c8b8015363..eea031698a 100644 --- a/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h +++ b/keyboards/mwstudio/mw65_rgb/keymaps/horrortroll/keymap_stuff.h @@ -116,7 +116,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { {{205, 250, 255}, {140, 215, 125}, false }, }; - uint8_t gp_length = sizeof(gradient_presets)/sizeof(gradient_presets[0]); + uint8_t gp_length = ARRAY_SIZE(gradient_presets); switch (keycode) { case G1_HUI: diff --git a/keyboards/mxss/keymaps/default/keymap.c b/keyboards/mxss/keymaps/default/keymap.c index 519547f15a..3b7150f7fa 100644 --- a/keyboards/mxss/keymaps/default/keymap.c +++ b/keyboards/mxss/keymaps/default/keymap.c @@ -27,7 +27,7 @@ hs_set layer_colors[4] = { [2] = {.hue = 36, .sat = 255}, // Color for Layer 2 [3] = {.hue = 185, .sat = 255}, // Color for Layer 3 }; -size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); +size_t lc_size = ARRAY_SIZE(layer_colors); // Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control enum custom_keycodes { diff --git a/keyboards/mxss/mxss_frontled.c b/keyboards/mxss/mxss_frontled.c index 8bb93d5fd8..2ab9a27bea 100644 --- a/keyboards/mxss/mxss_frontled.c +++ b/keyboards/mxss/mxss_frontled.c @@ -36,7 +36,7 @@ __attribute__ ((weak)) hs_set caps_color; __attribute__ ((weak)) -size_t lc_size = sizeof(layer_colors) / sizeof(hs_set); +size_t lc_size = ARRAY_SIZE(layer_colors); void fled_init(void) { // This checks both an EEPROM reset (from bootmagic lite, keycodes) diff --git a/keyboards/mxss/templates/keymap.c b/keyboards/mxss/templates/keymap.c index a18cff77f0..48cab22852 100644 --- a/keyboards/mxss/templates/keymap.c +++ b/keyboards/mxss/templates/keymap.c @@ -27,7 +27,7 @@ hs_set layer_colors[4] = { [2] = {.hue = 36, .sat = 255}, // Color for Layer 2 [3] = {.hue = 185, .sat = 255}, // Color for Layer 3 }; -size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t); +size_t lc_size = ARRAY_SIZE(layer_colors); // Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control enum custom_keycodes { diff --git a/keyboards/nacly/splitreus62/keymaps/scheiklp/config.h b/keyboards/nacly/splitreus62/keymaps/scheiklp/config.h index 04af418d8f..da8287df64 100644 --- a/keyboards/nacly/splitreus62/keymaps/scheiklp/config.h +++ b/keyboards/nacly/splitreus62/keymaps/scheiklp/config.h @@ -18,37 +18,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xBEEF -#define PRODUCT_ID 0xFED0 -#define DEVICE_VER 0x0001 -#define MANUFACTURER NaCly -#define PRODUCT Splitreus62 - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 12 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { D3, D2, D1, D4, C6, D7 } -#define MATRIX_COL_PINS { E6, B4, B5, B6, B2, B3 } - -#define DIODE_DIRECTION ROW2COL - -#define SPLIT_HAND_PIN F4 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* serial.c configuration for split keyboard */ -#define SOFT_SERIAL_PIN D0 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - #define AUTO_SHIFT_TIMEOUT 100 #define NO_AUTO_SHIFT_SPECIAL #define NO_AUTO_SHIFT_NUMERIC diff --git a/keyboards/obosob/steal_this_keyboard/config.h b/keyboards/obosob/steal_this_keyboard/config.h index acb0d64b79..7060e2ae6a 100644 --- a/keyboards/obosob/steal_this_keyboard/config.h +++ b/keyboards/obosob/steal_this_keyboard/config.h @@ -51,8 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCE 5 -/* Serial settings */ -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/omkbd/ergodash/mini/keymaps/default/config.h b/keyboards/omkbd/ergodash/mini/keymaps/default/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/mini/keymaps/default/config.h +++ b/keyboards/omkbd/ergodash/mini/keymaps/default/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/mini/keymaps/toyoshimahidenori/config.h b/keyboards/omkbd/ergodash/mini/keymaps/toyoshimahidenori/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/mini/keymaps/toyoshimahidenori/config.h +++ b/keyboards/omkbd/ergodash/mini/keymaps/toyoshimahidenori/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/mini/keymaps/yoshimaru46/config.h b/keyboards/omkbd/ergodash/mini/keymaps/yoshimaru46/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/mini/keymaps/yoshimaru46/config.h +++ b/keyboards/omkbd/ergodash/mini/keymaps/yoshimaru46/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/333fred/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/333fred/config.h index a8ad1e4fe7..cb50d1a34b 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/333fred/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/333fred/config.h @@ -22,7 +22,6 @@ #pragma once -#define USE_SERIAL #define MASTER_LEFT #undef TAPPING_TERM diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/default/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/greenshadowmaker/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/greenshadowmaker/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/greenshadowmaker/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/greenshadowmaker/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/m47ch4n/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/m47ch4n/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/m47ch4n/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/m47ch4n/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/nopunin10did/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/nopunin10did/config.h index b5c45669d4..9f734138b4 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/nopunin10did/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/nopunin10did/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT @@ -33,4 +27,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define EE_HANDS #undef TAPPING_TERM -#define TAPPING_TERM 300
\ No newline at end of file +#define TAPPING_TERM 300 diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/shadowprogr/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/shadowprogr/config.h index 4dcefdbcc6..2493fe09e2 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/shadowprogr/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/shadowprogr/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT @@ -33,4 +27,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define EE_HANDS #define LEADER_PER_KEY_TIMING -#define LEADER_TIMEOUT 250
\ No newline at end of file +#define LEADER_TIMEOUT 250 diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/tw1t611/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/tw1t611/config.h index df04873a97..a597d848e2 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/tw1t611/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/tw1t611/config.h @@ -20,12 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/omkbd/ergodash/rev1/keymaps/yet-another-developer/config.h b/keyboards/omkbd/ergodash/rev1/keymaps/yet-another-developer/config.h index 1005c48046..09bc62a14f 100644 --- a/keyboards/omkbd/ergodash/rev1/keymaps/yet-another-developer/config.h +++ b/keyboards/omkbd/ergodash/rev1/keymaps/yet-another-developer/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/keyboards/orthodox/keymaps/default/config.h b/keyboards/orthodox/keymaps/default/config.h index ce4538b08a..3ba91a8fb2 100644 --- a/keyboards/orthodox/keymaps/default/config.h +++ b/keyboards/orthodox/keymaps/default/config.h @@ -21,11 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index e3a89bce6a..f82d427c05 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -21,9 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ @@ -58,9 +55,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #undef PRODUCT #ifdef KEYBOARD_orthodox_rev1 -# define PRODUCT Drashna Hacked Orthodox Rev .1 +# define PRODUCT "Drashna Hacked Orthodox Rev .1" #elif KEYBOARD_orthodox_rev3 -# define PRODUCT Drashna Hacked Orthodox Rev .3 +# define PRODUCT "Drashna Hacked Orthodox Rev .3" #endif #define QMK_ESC_OUTPUT D7 // usually COL diff --git a/keyboards/orthodox/keymaps/oscillope/config.h b/keyboards/orthodox/keymaps/oscillope/config.h index 3b1fd50007..363a637790 100644 --- a/keyboards/orthodox/keymaps/oscillope/config.h +++ b/keyboards/orthodox/keymaps/oscillope/config.h @@ -24,9 +24,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/orthodox/keymaps/pdl/config.h b/keyboards/orthodox/keymaps/pdl/config.h index 5fd46b41c6..ad9b6207b3 100644 --- a/keyboards/orthodox/keymaps/pdl/config.h +++ b/keyboards/orthodox/keymaps/pdl/config.h @@ -22,12 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/orthodox/keymaps/rfvizarra/config.h b/keyboards/orthodox/keymaps/rfvizarra/config.h index 7ac207f0d3..fbe7ceb629 100644 --- a/keyboards/orthodox/keymaps/rfvizarra/config.h +++ b/keyboards/orthodox/keymaps/rfvizarra/config.h @@ -31,9 +31,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. } #endif -/* Use I2C or Serial, not both */ - -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/orthodox/keymaps/shaymdev/config.h b/keyboards/orthodox/keymaps/shaymdev/config.h index 749302284a..39f7c8accd 100644 --- a/keyboards/orthodox/keymaps/shaymdev/config.h +++ b/keyboards/orthodox/keymaps/shaymdev/config.h @@ -21,10 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - #define EE_HANDS #undef RGBLED_NUM diff --git a/keyboards/orthodox/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h index a44d2b5aed..d8e91fa6d8 100644 --- a/keyboards/orthodox/keymaps/xyverz/config.h +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -21,13 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define _MASTER_RIGHT -// #define EE_HANDS
\ No newline at end of file +// #define EE_HANDS diff --git a/keyboards/pico/config.h b/keyboards/pico/config.h index 36c8f68b90..e18d46f583 100644 --- a/keyboards/pico/config.h +++ b/keyboards/pico/config.h @@ -18,8 +18,6 @@ #include "config_common.h" -#define USE_SERIAL - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/pierce/keymaps/durken1/config.h b/keyboards/pierce/keymaps/durken1/config.h index bc0bb1c4b8..7c9970c5a9 100644 --- a/keyboards/pierce/keymaps/durken1/config.h +++ b/keyboards/pierce/keymaps/durken1/config.h @@ -31,7 +31,7 @@ #define COMBO_COUNT 3 #define COMBO_TERM 35 -#ifdef PS2_USE_USART +#ifdef PS2_DRIVER_USART #define PS2_CLOCK_PIN D5 #define PS2_DATA_PIN D2 diff --git a/keyboards/pierce/post_rules.mk b/keyboards/pierce/post_rules.mk index e0360a3391..9cc6739d78 100644 --- a/keyboards/pierce/post_rules.mk +++ b/keyboards/pierce/post_rules.mk @@ -1,6 +1,7 @@ ifeq ($(strip $(TRACKPOINT)), yes) PS2_MOUSE_ENABLE = yes - PS2_USE_USART = yes + PS2_ENABLE = yes + PS2_DRIVER = usart OPT_DEFS += -DUSART endif diff --git a/keyboards/pinky/3/keymaps/default/config.h b/keyboards/pinky/3/keymaps/default/config.h index db79776729..63e8168b47 100644 --- a/keyboards/pinky/3/keymaps/default/config.h +++ b/keyboards/pinky/3/keymaps/default/config.h @@ -24,8 +24,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/3/keymaps/ninjonas/config.h b/keyboards/pinky/3/keymaps/ninjonas/config.h index 585bd8cb5d..63e8168b47 100644 --- a/keyboards/pinky/3/keymaps/ninjonas/config.h +++ b/keyboards/pinky/3/keymaps/ninjonas/config.h @@ -24,8 +24,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 -#define RETRO_TAPPPING
\ No newline at end of file +#define RETRO_TAPPPING diff --git a/keyboards/pinky/3/keymaps/via/config.h b/keyboards/pinky/3/keymaps/via/config.h index db79776729..63e8168b47 100644 --- a/keyboards/pinky/3/keymaps/via/config.h +++ b/keyboards/pinky/3/keymaps/via/config.h @@ -24,8 +24,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/default/config.h b/keyboards/pinky/4/keymaps/default/config.h index db79776729..63e8168b47 100644 --- a/keyboards/pinky/4/keymaps/default/config.h +++ b/keyboards/pinky/4/keymaps/default/config.h @@ -24,8 +24,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pinky/4/keymaps/via/config.h b/keyboards/pinky/4/keymaps/via/config.h index db79776729..63e8168b47 100644 --- a/keyboards/pinky/4/keymaps/via/config.h +++ b/keyboards/pinky/4/keymaps/via/config.h @@ -24,8 +24,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 200 #define RETRO_TAPPPING diff --git a/keyboards/pisces/config.h b/keyboards/pisces/config.h index 42db825e3e..8690a4e5f1 100644 --- a/keyboards/pisces/config.h +++ b/keyboards/pisces/config.h @@ -18,8 +18,6 @@ #include "config_common.h" -#define USE_SERIAL - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/planck/keymaps/buhearns/config.h b/keyboards/planck/keymaps/buhearns/config.h index b8f3c18430..142fa1df21 100644 --- a/keyboards/planck/keymaps/buhearns/config.h +++ b/keyboards/planck/keymaps/buhearns/config.h @@ -2,7 +2,7 @@ #ifdef AUDIO_ENABLE #define STARTUP_SONG SONG(MARIO_MUSHROOM) - #define UNICODE_SONG_OSX SONG(COIN_SOUND) + #define UNICODE_SONG_MAC SONG(COIN_SOUND) #define UNICODE_SONG_LNX SONG(UNICODE_LINUX) #define UNICODE_SONG_WIN SONG(UNICODE_WINDOWS) #define UNICODE_SONG_WINC SONG(UNICODE_WINDOWS) diff --git a/keyboards/planck/keymaps/handwired_binaryplease/config.h b/keyboards/planck/keymaps/handwired_binaryplease/config.h index abf9f5771f..065bc2d688 100644 --- a/keyboards/planck/keymaps/handwired_binaryplease/config.h +++ b/keyboards/planck/keymaps/handwired_binaryplease/config.h @@ -1,9 +1,9 @@ #pragma once #undef MANUFACTURER -#define MANUFACTURER binaryplease +#define MANUFACTURER "binaryplease" #undef PRODUCT -#define PRODUCT Teensy_Planck +#define PRODUCT "Teensy_Planck" #undef MATRIX_ROW_PINS #define MATRIX_ROW_PINS { D3, D2, D1, D0 } diff --git a/keyboards/planck/keymaps/luke/keymap.c b/keyboards/planck/keymaps/luke/keymap.c index 1fa0ea0745..8f20a55867 100644 --- a/keyboards/planck/keymaps/luke/keymap.c +++ b/keyboards/planck/keymaps/luke/keymap.c @@ -325,7 +325,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) set_unicode_input_mode(UC_LNX); break; case M_OSX: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); break; case M_FUNCTION: if (record->event.pressed) { diff --git a/keyboards/planck/keymaps/snowkuma/keymap.c b/keyboards/planck/keymaps/snowkuma/keymap.c index fef6246b4a..3dbf680d95 100644 --- a/keyboards/planck/keymaps/snowkuma/keymap.c +++ b/keyboards/planck/keymaps/snowkuma/keymap.c @@ -369,5 +369,5 @@ void matrix_scan_user(void) { } void matrix_init_user(void) { - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); } diff --git a/keyboards/ploopyco/mouse/mouse.c b/keyboards/ploopyco/mouse/mouse.c index 19bc17738e..abcaa276d9 100644 --- a/keyboards/ploopyco/mouse/mouse.c +++ b/keyboards/ploopyco/mouse/mouse.c @@ -49,7 +49,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) +#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array) // TODO: Implement libinput profiles // https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html @@ -202,7 +202,7 @@ void keyboard_pre_init_kb(void) { #ifdef UNUSABLE_PINS const pin_t unused_pins[] = UNUSABLE_PINS; - for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) { setPinOutput(unused_pins[i]); writePinLow(unused_pins[i]); } diff --git a/keyboards/ploopyco/trackball/trackball.c b/keyboards/ploopyco/trackball/trackball.c index 786b40f9e8..c96bf15cba 100644 --- a/keyboards/ploopyco/trackball/trackball.c +++ b/keyboards/ploopyco/trackball/trackball.c @@ -49,7 +49,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) +#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array) // TODO: Implement libinput profiles // https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html @@ -207,7 +207,7 @@ void keyboard_pre_init_kb(void) { #ifdef UNUSABLE_PINS const pin_t unused_pins[] = UNUSABLE_PINS; - for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) { setPinOutput(unused_pins[i]); writePinLow(unused_pins[i]); } diff --git a/keyboards/ploopyco/trackball_mini/trackball_mini.c b/keyboards/ploopyco/trackball_mini/trackball_mini.c index df13912af4..dc3708fd51 100644 --- a/keyboards/ploopyco/trackball_mini/trackball_mini.c +++ b/keyboards/ploopyco/trackball_mini/trackball_mini.c @@ -57,7 +57,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) +#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array) // TODO: Implement libinput profiles // https://wayland.freedesktop.org/libinput/doc/latest/pointer-acceleration.html @@ -203,7 +203,7 @@ void keyboard_pre_init_kb(void) { #ifdef UNUSABLE_PINS const pin_t unused_pins[] = UNUSABLE_PINS; - for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) { setPinOutput(unused_pins[i]); writePinLow(unused_pins[i]); } diff --git a/keyboards/ploopyco/trackball_nano/trackball_nano.c b/keyboards/ploopyco/trackball_nano/trackball_nano.c index eb1d8e10b0..366918e134 100644 --- a/keyboards/ploopyco/trackball_nano/trackball_nano.c +++ b/keyboards/ploopyco/trackball_nano/trackball_nano.c @@ -50,7 +50,7 @@ keyboard_config_t keyboard_config; uint16_t dpi_array[] = PLOOPY_DPI_OPTIONS; -#define DPI_OPTION_SIZE (sizeof(dpi_array) / sizeof(uint16_t)) +#define DPI_OPTION_SIZE ARRAY_SIZE(dpi_array) void cycle_dpi(void) { keyboard_config.dpi_config = (keyboard_config.dpi_config + 1) % DPI_OPTION_SIZE; @@ -89,7 +89,7 @@ void keyboard_pre_init_kb(void) { #ifdef UNUSABLE_PINS const pin_t unused_pins[] = UNUSABLE_PINS; - for (uint8_t i = 0; i < (sizeof(unused_pins) / sizeof(pin_t)); i++) { + for (uint8_t i = 0; i < ARRAY_SIZE(unused_pins); i++) { setPinOutput(unused_pins[i]); writePinLow(unused_pins[i]); } diff --git a/keyboards/pluckey/config.h b/keyboards/pluckey/config.h index 152b8c3169..7aa146aa17 100644 --- a/keyboards/pluckey/config.h +++ b/keyboards/pluckey/config.h @@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ENCODER_RESOLUTION_RIGHT 2 /* communication between sides */ -#define USE_SERIAL #define SOFT_SERIAL_PIN D2 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ diff --git a/keyboards/preonic/keymaps/kinesis/config.h b/keyboards/preonic/keymaps/kinesis/config.h index eabce5e790..2e8585d0eb 100644 --- a/keyboards/preonic/keymaps/kinesis/config.h +++ b/keyboards/preonic/keymaps/kinesis/config.h @@ -1,58 +1,4 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6061 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Ortholinear Keyboards -#define PRODUCT The Preonic Keyboard - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 12 - -/* Planck PCB default pin-out */ -#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } -#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } - -#define BACKLIGHT_PIN B7 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* 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 */ -#define LOCKING_RESYNC_ENABLE +#pragma once /* ws2812 RGB LED */ #define RGB_DI_PIN D1 @@ -61,25 +7,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -#define TAPPING_TERM 200 - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 37e85bf512..f5e4d2c204 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -1,85 +1,7 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6061 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Ortholinear Keyboards -#define PRODUCT The Preonic Keyboard - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 12 - -/* Planck PCB default pin-out */ -#define MATRIX_ROW_PINS { D2, D5, B5, B6, D3 } -#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } - -#define BACKLIGHT_PIN B7 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST +#pragma once #define BACKLIGHT_BREATHING // LED breathing -/* number of backlight levels */ +#undef BACKLIGHT_LEVELS #define BACKLIGHT_LEVELS 5 -/* 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 */ -//#define LOCKING_RESYNC_ENABLE - -/* ws2812 RGB LED */ -//#define RGB_DI_PIN D1 - -//#define RGBLED_NUM 28 // Number of LEDs -//#define RGBLIGHT_HUE_STEP 10 -//#define RGBLIGHT_SAT_STEP 17 -//#define RGBLIGHT_VAL_STEP 17 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER #define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -#define NO_ACTION_MACRO -#define NO_ACTION_FUNCTION -//#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality -//#define SPACE_CADET // Parenthesis on L/R shift - -#endif diff --git a/keyboards/primekb/prime_e/keymaps/madhatter/config.h b/keyboards/primekb/prime_e/keymaps/madhatter/config.h index 8075bb73d5..3ec816d7ee 100644 --- a/keyboards/primekb/prime_e/keymaps/madhatter/config.h +++ b/keyboards/primekb/prime_e/keymaps/madhatter/config.h @@ -3,4 +3,4 @@ #define TAPPING_TERM 150 #undef PRODUCT -#define PRODUCT MadHatter\x27s Custom Ilpse +#define PRODUCT "MadHatter's Custom Ilpse" diff --git a/keyboards/pteron36/config.h b/keyboards/pteron36/config.h index 96b5b42f86..32c962dcc0 100644 --- a/keyboards/pteron36/config.h +++ b/keyboards/pteron36/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ - #define USE_SERIAL #define SOFT_SERIAL_PIN D3 // or D1, D2, D3, E6 //#define LED_NUM_LOCK_PIN B0 diff --git a/keyboards/qwertyydox/keymaps/default/config.h b/keyboards/qwertyydox/keymaps/default/config.h index cc85e4e2e8..504bee96de 100644 --- a/keyboards/qwertyydox/keymaps/default/config.h +++ b/keyboards/qwertyydox/keymaps/default/config.h @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/redox/keymaps/KL1RL/config.h b/keyboards/redox/keymaps/KL1RL/config.h index ea7525b388..5b9a8c161c 100644 --- a/keyboards/redox/keymaps/KL1RL/config.h +++ b/keyboards/redox/keymaps/KL1RL/config.h @@ -17,8 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -// #define USE_SERIAL #define USE_I2C /* Select hand configuration */ diff --git a/keyboards/redox/keymaps/cykedev/config.h b/keyboards/redox/keymaps/cykedev/config.h index 05ff248b6d..47bc84bd67 100644 --- a/keyboards/redox/keymaps/cykedev/config.h +++ b/keyboards/redox/keymaps/cykedev/config.h @@ -15,7 +15,6 @@ #pragma once -#define USE_SERIAL #define MASTER_LEFT #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/redox/keymaps/default/config.h b/keyboards/redox/keymaps/default/config.h index a3ef209a05..39972d3e82 100644 --- a/keyboards/redox/keymaps/default/config.h +++ b/keyboards/redox/keymaps/default/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/eightbitraptor/config.h b/keyboards/redox/keymaps/eightbitraptor/config.h index d1b0012147..1810a97c9f 100644 --- a/keyboards/redox/keymaps/eightbitraptor/config.h +++ b/keyboards/redox/keymaps/eightbitraptor/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/fculpo/config.h b/keyboards/redox/keymaps/fculpo/config.h index bff76aef26..f14e8233f6 100644 --- a/keyboards/redox/keymaps/fculpo/config.h +++ b/keyboards/redox/keymaps/fculpo/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT //#define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/finex/config.h b/keyboards/redox/keymaps/finex/config.h index 8852a4cc87..bfad3bc6bf 100644 --- a/keyboards/redox/keymaps/finex/config.h +++ b/keyboards/redox/keymaps/finex/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/finex/readme.md b/keyboards/redox/keymaps/finex/readme.md index 9b88469a13..ae092e8064 100644 --- a/keyboards/redox/keymaps/finex/readme.md +++ b/keyboards/redox/keymaps/finex/readme.md @@ -3,7 +3,6 @@ ## Features -- Enabled USE_SERIAL for Falba.Tech Redox keyboards. - PC Layouts: Colemak Mod DH-MK, Qwerty. - Mac Layouts: same as above with CTRL-GUI keys inverted. - Added redundant `Space`, `Esc`, `Ctrl` and `Enter` keys. I like to have this diff --git a/keyboards/redox/keymaps/german/config.h b/keyboards/redox/keymaps/german/config.h index a3ef209a05..39972d3e82 100644 --- a/keyboards/redox/keymaps/german/config.h +++ b/keyboards/redox/keymaps/german/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/italian/config.h b/keyboards/redox/keymaps/italian/config.h index a3ef209a05..39972d3e82 100644 --- a/keyboards/redox/keymaps/italian/config.h +++ b/keyboards/redox/keymaps/italian/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/jeherve/config.h b/keyboards/redox/keymaps/jeherve/config.h index e3ed839f44..d467cc801e 100644 --- a/keyboards/redox/keymaps/jeherve/config.h +++ b/keyboards/redox/keymaps/jeherve/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Change the default tapping toggle value (normally 5) */ #define TAPPING_TOGGLE 2 -/* Use I2C or Serial, not both */ -#define USE_SERIAL -//#define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/nrichers/config.h b/keyboards/redox/keymaps/nrichers/config.h index a3ef209a05..39972d3e82 100755 --- a/keyboards/redox/keymaps/nrichers/config.h +++ b/keyboards/redox/keymaps/nrichers/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/ptillemans/config.h b/keyboards/redox/keymaps/ptillemans/config.h index a3ef209a05..39972d3e82 100644 --- a/keyboards/redox/keymaps/ptillemans/config.h +++ b/keyboards/redox/keymaps/ptillemans/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/thattolleyguy/config.h b/keyboards/redox/keymaps/thattolleyguy/config.h index 6e8de527cd..cf32745193 100644 --- a/keyboards/redox/keymaps/thattolleyguy/config.h +++ b/keyboards/redox/keymaps/thattolleyguy/config.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL - /* Select hand configuration */ // #define MASTER_LEFT #define EE_HANDS diff --git a/keyboards/redox/keymaps/tw1t611/config.h b/keyboards/redox/keymaps/tw1t611/config.h index 2110642c54..894d50238a 100644 --- a/keyboards/redox/keymaps/tw1t611/config.h +++ b/keyboards/redox/keymaps/tw1t611/config.h @@ -1,9 +1,5 @@ #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox/keymaps/via/config.h b/keyboards/redox/keymaps/via/config.h index a3ef209a05..39972d3e82 100644 --- a/keyboards/redox/keymaps/via/config.h +++ b/keyboards/redox/keymaps/via/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define MASTER_RIGHT diff --git a/keyboards/redox_media/keymaps/default/config.h b/keyboards/redox_media/keymaps/default/config.h index 5da1f9060a..5970733b20 100644 --- a/keyboards/redox_media/keymaps/default/config.h +++ b/keyboards/redox_media/keymaps/default/config.h @@ -17,10 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT -#define EE_HANDS
\ No newline at end of file +#define EE_HANDS diff --git a/keyboards/rgbkb/pan/pan.c b/keyboards/rgbkb/pan/pan.c index c367550e49..6a17456390 100644 --- a/keyboards/rgbkb/pan/pan.c +++ b/keyboards/rgbkb/pan/pan.c @@ -51,7 +51,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { + for (int i = 0; i < ARRAY_SIZE(rgb_matrix_ws2812_array); i++) { setled(i, r, g, b); } } diff --git a/keyboards/rgbkb/sol/keymaps/default/keymap.c b/keyboards/rgbkb/sol/keymaps/default/keymap.c index 1ce18bc1ab..87241521ae 100644 --- a/keyboards/rgbkb/sol/keymaps/default/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/default/keymap.c @@ -202,7 +202,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE static pin_t encoders_pad_a[] = ENCODERS_PAD_A; -#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) +#define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { [_QWERTY] = ENCODER_LAYOUT( diff --git a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c index cdd0c6620a..d042a4fe27 100644 --- a/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c +++ b/keyboards/rgbkb/sol/keymaps/xyverz/keymap.c @@ -232,7 +232,7 @@ const rgb_matrix_f rgb_matrix_functions[6][2] = { #ifdef ENCODER_ENABLE static pin_t encoders_pad_a[] = ENCODERS_PAD_A; -#define NUMBER_OF_ENCODERS (sizeof(encoders_pad_a)/sizeof(pin_t)) +#define NUMBER_OF_ENCODERS ARRAY_SIZE(encoders_pad_a) const uint16_t PROGMEM encoders[][NUMBER_OF_ENCODERS * 2][2] = { [_QWERTY] = ENCODER_LAYOUT( \ diff --git a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h index 38e5590d38..3d3186342f 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/333fred/config.h @@ -24,10 +24,6 @@ #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - /* Select hand configuration */ //#define MASTER_LEFT #define EE_HANDS diff --git a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h index cdffe6fd50..c150da1cdd 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/cwebster2/config.h @@ -19,10 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL - #define EE_HANDS #ifdef COMBO_ENABLE diff --git a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h index 4a549c5b1f..76598a3ee5 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/default/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/default/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h index d813085e46..fa8d58e6c4 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/jwlawrence/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // place overrides here -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h index d7b37d5252..debae6aeb8 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/samae/config.h @@ -19,11 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h index d3d1a60ca9..91f63a55ba 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/starcalleramethyst/config.h @@ -1,5 +1,5 @@ /* -Copyright 2019 starcalleramethyst +Copyright 2019 starcalleramethyst 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 @@ -17,12 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h index d3e21ea172..f0ded5f66f 100644 --- a/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h +++ b/keyboards/rgbkb/zen/rev1/keymaps/xyverz/config.h @@ -19,9 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL #define EE_HANDS #undef RGBLED_NUM diff --git a/keyboards/rocketboard_16/keycode_lookup.c b/keyboards/rocketboard_16/keycode_lookup.c index 0e6e47ba0d..ab2e69b346 100644 --- a/keyboards/rocketboard_16/keycode_lookup.c +++ b/keyboards/rocketboard_16/keycode_lookup.c @@ -18,7 +18,7 @@ #include "print.h" #include "via.h" -#define num_keycodes (sizeof(lookup_table)/sizeof(lookup_table[0])) +#define num_keycodes ARRAY_SIZE(lookup_table) static char UNKNOWN_KEYCODE[] = "UNKNOWN"; int cmp(const void *v1, const void *v2) diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default/config.h index 0e452bdb4a..4f3a44d6bb 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default/config.h @@ -22,7 +22,5 @@ // #define MASTER_RIGHT // #define EE_HANDS -//#define USE_SERIAL - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h index 314fe55c30..4d52c01805 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default_with_nafuda/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h index 2ad4d0adeb..7cb5d61e2b 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/default_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_nafuda/config.h b/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_nafuda/config.h index 7ce6416010..4d52c01805 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_nafuda/config.h @@ -22,8 +22,6 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_setta21/config.h b/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_setta21/config.h index 2ad4d0adeb..7cb5d61e2b 100644 --- a/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked48/keymaps/salicylic_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h b/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h index 0761e5b6d3..603c9ab026 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/default_with_nafuda/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h index 0761e5b6d3..603c9ab026 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/default_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/config.h b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/config.h index 47da6d4418..603c9ab026 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_nafuda/config.h @@ -22,7 +22,5 @@ // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/config.h b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/config.h index 0761e5b6d3..603c9ab026 100644 --- a/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked60/keymaps/salicylic_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h b/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h index c88277da20..cba07919ff 100644 --- a/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked64/keymaps/default_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/config.h b/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/config.h index 0761e5b6d3..603c9ab026 100644 --- a/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/config.h +++ b/keyboards/salicylic_acid3/naked64/keymaps/salicylic_with_setta21/config.h @@ -21,7 +21,6 @@ #define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define USE_SERIAL_PD2 #define TAPPING_FORCE_HOLD #define TAPPING_TERM 180 diff --git a/keyboards/scatter42/config.h b/keyboards/scatter42/config.h index e271984760..a2c5cc6ec6 100644 --- a/keyboards/scatter42/config.h +++ b/keyboards/scatter42/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 -#define USE_SERIAL //#define BACKLIGHT_PIN B7 //#define BACKLIGHT_LEVELS 3 diff --git a/keyboards/sofle/keymaps/flare576/config.h b/keyboards/sofle/keymaps/flare576/config.h index c0f0a7d563..c89f38c127 100644 --- a/keyboards/sofle/keymaps/flare576/config.h +++ b/keyboards/sofle/keymaps/flare576/config.h @@ -37,4 +37,4 @@ #define TAPPING_TERM 200 #undef MANUFACTURER -#define MANUFACTURER Flare576 +#define MANUFACTURER "Flare576" diff --git a/keyboards/sofle/rev1/config.h b/keyboards/sofle/rev1/config.h index 26d35982df..1556dc716e 100644 --- a/keyboards/sofle/rev1/config.h +++ b/keyboards/sofle/rev1/config.h @@ -23,6 +23,4 @@ #define TAP_CODE_DELAY 10 /* communication between sides */ -#define USE_SERIAL -#define SERIAL_USE_MULTI_TRANSACTION #define SOFT_SERIAL_PIN D2 diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/config.h b/keyboards/spaceman/2_milk/keymaps/emoji/config.h index 90e4d63102..2d86c008d5 100644 --- a/keyboards/spaceman/2_milk/keymaps/emoji/config.h +++ b/keyboards/spaceman/2_milk/keymaps/emoji/config.h @@ -1,2 +1,2 @@ -#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC +#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WIN, UC_WINC #define TAPPING_TERM 300
\ No newline at end of file diff --git a/keyboards/spaceman/2_milk/keymaps/emoji/readme.md b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md index 1d5a08730d..3bcc4831b3 100644 --- a/keyboards/spaceman/2_milk/keymaps/emoji/readme.md +++ b/keyboards/spaceman/2_milk/keymaps/emoji/readme.md @@ -16,7 +16,7 @@ You can change it permanently tapping 2 times the KeyOne to select the next mode ## Unicode Mode List - UC_LNX -- UC_OSX +- UC_MAC - UC_WIN - UC_WINC diff --git a/keyboards/spacetime/config.h b/keyboards/spacetime/config.h index b331c8bcab..14e305f2ab 100644 --- a/keyboards/spacetime/config.h +++ b/keyboards/spacetime/config.h @@ -43,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. */ #define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 -#define USE_SERIAL // #define BACKLIGHT_PIN B7 // #define BACKLIGHT_BREATHING diff --git a/keyboards/tanuki/keymaps/tucznak/config.h b/keyboards/tanuki/keymaps/tucznak/config.h index 4f2a778ff2..37d42c0814 100644 --- a/keyboards/tanuki/keymaps/tucznak/config.h +++ b/keyboards/tanuki/keymaps/tucznak/config.h @@ -3,23 +3,16 @@ #undef MANUFACTURER #undef PRODUCT -#define MANUFACTURER Potato Inc. -#define PRODUCT Trash Panda +#define MANUFACTURER "Potato Inc." +#define PRODUCT "Trash Panda" /* for bootloader */ #define QMK_ESC_OUTPUT B2 #define QMK_ESC_INPUT D0 #define QMK_LED B0 -/* turn off RGB when computer sleeps */ -#ifdef RGBLIGHT_ENABLE -#define RGBLIGHT_SLEEP -#endif - /* send tap key if no layer key was used even after tap delay */ -#ifdef TAPPING_TERM #undef TAPPING_TERM -#endif #define TAPPING_TERM 250 #define RETRO_TAPPING #define TAPPING_TOGGLE 2 diff --git a/keyboards/torn/bongocat.c b/keyboards/torn/bongocat.c index 21322c9536..9d6d9a85f5 100644 --- a/keyboards/torn/bongocat.c +++ b/keyboards/torn/bongocat.c @@ -18,8 +18,6 @@ #ifdef OLED_ENABLE -#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0])) - #define IDLE_SPEED 20 // idle below this wpm #define TAP_SPEED 60 // tap above this wpm diff --git a/keyboards/tzarc/djinn/djinn_portscan_matrix.c b/keyboards/tzarc/djinn/djinn_portscan_matrix.c index f0ae9721f9..6fcfd48bba 100644 --- a/keyboards/tzarc/djinn/djinn_portscan_matrix.c +++ b/keyboards/tzarc/djinn/djinn_portscan_matrix.c @@ -92,11 +92,11 @@ bool matrix_scan_custom(matrix_row_t current_matrix[]) { void matrix_wait_for_interrupt(void) { // Set up row/col pins and attach callback - for (int i = 0; i < sizeof(col_pins) / sizeof(pin_t); ++i) { + for (int i = 0; i < ARRAY_SIZE(col_pins); ++i) { setPinOutput(col_pins[i]); writePinLow(col_pins[i]); } - for (int i = 0; i < sizeof(row_pins) / sizeof(pin_t); ++i) { + for (int i = 0; i < ARRAY_SIZE(row_pins); ++i) { setPinInputHigh(row_pins[i]); palEnableLineEvent(row_pins[i], PAL_EVENT_MODE_BOTH_EDGES); } @@ -105,12 +105,12 @@ void matrix_wait_for_interrupt(void) { __WFI(); // Now that the interrupt has woken us up, reset all the row/col pins back to defaults - for (int i = 0; i < sizeof(row_pins) / sizeof(pin_t); ++i) { + for (int i = 0; i < ARRAY_SIZE(row_pins); ++i) { palDisableLineEvent(row_pins[i]); writePinHigh(row_pins[i]); setPinInputHigh(row_pins[i]); } - for (int i = 0; i < sizeof(col_pins) / sizeof(pin_t); ++i) { + for (int i = 0; i < ARRAY_SIZE(col_pins); ++i) { writePinHigh(col_pins[i]); setPinInputHigh(col_pins[i]); } diff --git a/keyboards/unikeyboard/diverge3/keymaps/workman/readme.md b/keyboards/unikeyboard/diverge3/keymaps/workman/readme.md index 48ba482fe6..07a5fd9ed6 100644 --- a/keyboards/unikeyboard/diverge3/keymaps/workman/readme.md +++ b/keyboards/unikeyboard/diverge3/keymaps/workman/readme.md @@ -16,6 +16,6 @@ Reverts the number row to the normal 1, 2, 3, etc... for better gaming compatibi ## Layer 3 - Raise Layer -Volume and backlight controls (although backlight is not fully functional using `USE_SERIAL` in `../config.h`). +Volume and backlight controls. ![Raise Layer Misc Buttons Picture](https://i.imgur.com/50L3O62.png) diff --git a/keyboards/uzu42/config.h b/keyboards/uzu42/config.h index 3364d3063d..72bdafd38d 100644 --- a/keyboards/uzu42/config.h +++ b/keyboards/uzu42/config.h @@ -22,5 +22,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef SOFT_SERIAL_PIN #define SOFT_SERIAL_PIN D2 -#define SERIAL_USE_MULTI_TRANSACTION #endif diff --git a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h index afb1d86d6c..dc2a125b1e 100644 --- a/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h +++ b/keyboards/wilba_tech/wt75_b/keymaps/madhatter/config.h @@ -1,4 +1,4 @@ #pragma once #undef PRODUCT -#define PRODUCT MadHatter\x27s Custom Singa V3 +#define PRODUCT "MadHatter's Custom Singa V3" diff --git a/keyboards/xiudi/xd75/keymaps/mtdjr/config.h b/keyboards/xiudi/xd75/keymaps/mtdjr/config.h index 3c8b17df1f..f70569b024 100644 --- a/keyboards/xiudi/xd75/keymaps/mtdjr/config.h +++ b/keyboards/xiudi/xd75/keymaps/mtdjr/config.h @@ -18,5 +18,4 @@ // place overrides here #undef MANUFACTURER -#define MANUFACTURER mtdjr -#define PRODUCT XD75 +#define MANUFACTURER "mtdjr" diff --git a/keyboards/yatara/drink_me/keymaps/queen/config.h b/keyboards/yatara/drink_me/keymaps/queen/config.h index 037c4737f6..ed8565a311 100644 --- a/keyboards/yatara/drink_me/keymaps/queen/config.h +++ b/keyboards/yatara/drink_me/keymaps/queen/config.h @@ -1 +1 @@ -#define UNICODE_SELECTED_MODES UC_LNX, UC_OSX, UC_WIN, UC_WINC +#define UNICODE_SELECTED_MODES UC_LNX, UC_MAC, UC_WIN, UC_WINC diff --git a/keyboards/yatara/drink_me/keymaps/queen/keymap.c b/keyboards/yatara/drink_me/keymaps/queen/keymap.c index 44da2b31ec..70b24be79d 100644 --- a/keyboards/yatara/drink_me/keymaps/queen/keymap.c +++ b/keyboards/yatara/drink_me/keymaps/queen/keymap.c @@ -23,7 +23,7 @@ void td_diamond_osx (qk_tap_dance_state_t *state, void *user_data) { if (state->count == 1) { register_unicode(0x2666); // ♦ } else { - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); } reset_tap_dance(state); } diff --git a/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c b/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c index 1ee7ca1e77..cc6cbd90c2 100644 --- a/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c +++ b/keyboards/ymdk/melody96/keymaps/konstantin/keymap.c @@ -2,7 +2,7 @@ #include "konstantin.h" static const HSV *colors[] = { &godspeed_blue, &godspeed_yellow }; -static const size_t cnum = sizeof colors / sizeof *colors; +static const size_t cnum = ARRAY_SIZE(colors); static size_t cidx = 0; enum keycodes_keymap { diff --git a/keyboards/ymdk/ymd96/keymaps/AnthonyWharton/config.h b/keyboards/ymdk/ymd96/keymaps/AnthonyWharton/config.h index e730e99b27..27a2fcd6a7 100644 --- a/keyboards/ymdk/ymd96/keymaps/AnthonyWharton/config.h +++ b/keyboards/ymdk/ymd96/keymaps/AnthonyWharton/config.h @@ -19,36 +19,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#define VENDOR_ID 0x20A0 -#define PRODUCT_ID 0x422D -// Edit usbconfig.h to change these. -#define MANUFACTURER ymdkey -#define PRODUCT ymd96 - -/* Matrix Size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 15 -#define DIODE_DIRECTION COL2ROW - /* Required for MX Locks installed */ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE -#define PREVENT_STUCK_MODIFIERS -#define TAPPING_TOGGLE 3 -#define NO_UART 1 - +#undef BACKLIGHT_LEVELS #define BACKLIGHT_LEVELS 12 -/* RGB Underglow */ -// The RGB_DI_PING value seems to be shared between all PS2AVRGB boards. -// The same pin is used on the JJ40, at least. -#define RGBLED_NUM 18 -#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are send - // via I2C to 0xB0 - -#define RGBLIGHT_ANIMATIONS - #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1.0-2.7 #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 1-255 #define RGBLIGHT_EFFECT_SNAKE_LENGTH 7 diff --git a/keyboards/z34/config.h b/keyboards/z34/config.h index f63b2771fc..13e1188891 100644 --- a/keyboards/z34/config.h +++ b/keyboards/z34/config.h @@ -47,8 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* Serial settings */ -#define USE_SERIAL /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D2 diff --git a/layouts/community/ergodox/drashna/config.h b/layouts/community/ergodox/drashna/config.h index d669f27298..aa1d05779b 100644 --- a/layouts/community/ergodox/drashna/config.h +++ b/layouts/community/ergodox/drashna/config.h @@ -28,7 +28,7 @@ #endif // RGBLIGHT_ENABLE #undef PRODUCT -#define PRODUCT DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity +#define PRODUCT "DrashnaDox - Hacked ErgoDox EZ Hybrid Monstrosity" #undef DEBOUNCE #define DEBOUNCE 20 diff --git a/layouts/community/ergodox/jjerrell/config.h b/layouts/community/ergodox/jjerrell/config.h index 8223108d15..6aeaef35ce 100644 --- a/layouts/community/ergodox/jjerrell/config.h +++ b/layouts/community/ergodox/jjerrell/config.h @@ -17,5 +17,5 @@ #ifdef KEYBOARD_ergodox_ez #undef PRODUCT -#define PRODUCT ErgoDox EZ - Modified by <@jjerrell> +#define PRODUCT "ErgoDox EZ - Modified by <@jjerrell>" #endif diff --git a/layouts/community/ergodox/meagerfindings/config.h b/layouts/community/ergodox/meagerfindings/config.h index d69aaf79dd..28a92e2bf6 100644 --- a/layouts/community/ergodox/meagerfindings/config.h +++ b/layouts/community/ergodox/meagerfindings/config.h @@ -5,9 +5,9 @@ #undef DEVICE_VER #define DEVICE_VER 0x0001 #undef MANUFACTURER -#define MANUFACTURER meagerfindings +#define MANUFACTURER "meagerfindings" #undef PRODUCT -#define PRODUCT ErgoDox +#define PRODUCT "ErgoDox" #define USB_MAX_POWER_CONSUMPTION 500 diff --git a/layouts/community/numpad_5x6/drashna/config.h b/layouts/community/numpad_5x6/drashna/config.h index aa0c201232..83e8766b27 100644 --- a/layouts/community/numpad_5x6/drashna/config.h +++ b/layouts/community/numpad_5x6/drashna/config.h @@ -32,5 +32,5 @@ #if defined(KEYBOARD_primekb_prime_m) # undef PRODUCT -# define PRODUCT Drashna Hacked Prime_M Macro Pad +# define PRODUCT "Drashna Hacked Prime_M Macro Pad" #endif diff --git a/layouts/community/ortho_4x12/buswerks/config.h b/layouts/community/ortho_4x12/buswerks/config.h index 8d6e26287e..f96d099db5 100644 --- a/layouts/community/ortho_4x12/buswerks/config.h +++ b/layouts/community/ortho_4x12/buswerks/config.h @@ -1,24 +1,19 @@ #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT // #define _MASTER_RIGHT // #define EE_HANDS -#ifdef AUDIO_ENABLE - #define STARTUP_SONG SONG(PLANCK_SOUND) - // #define STARTUP_SONG SONG(NO_SOUND) +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ SONG(COLEMAK_SOUND), \ SONG(DVORAK_SOUND) \ - } -#endif + } +#endif // MIDI notes can be sent when in Music mode #define MIDI_BASIC diff --git a/layouts/community/ortho_4x12/colemak_mod_dh_wide/config.h b/layouts/community/ortho_4x12/colemak_mod_dh_wide/config.h index 33e9342039..2f0c23b7f1 100644 --- a/layouts/community/ortho_4x12/colemak_mod_dh_wide/config.h +++ b/layouts/community/ortho_4x12/colemak_mod_dh_wide/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/layouts/community/ortho_4x12/crs/config.h b/layouts/community/ortho_4x12/crs/config.h index 33e9342039..9ba64c921b 100644 --- a/layouts/community/ortho_4x12/crs/config.h +++ b/layouts/community/ortho_4x12/crs/config.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C /* Select hand configuration */ diff --git a/layouts/community/ortho_4x12/drashna/config.h b/layouts/community/ortho_4x12/drashna/config.h index d6197ece29..1c88d66f3b 100644 --- a/layouts/community/ortho_4x12/drashna/config.h +++ b/layouts/community/ortho_4x12/drashna/config.h @@ -46,7 +46,6 @@ #endif #if defined(KEYBOARD_lets_split_rev2) -# define USE_SERIAL # undef USE_I2C # define EE_HANDS #endif @@ -70,11 +69,11 @@ #if defined(KEYBOARD_planck) # undef PRODUCT # if defined(KEYBOARD_planck_light) -# define PRODUCT Drashna Hacked RGB Beacon(Planck Light) +# define PRODUCT "Drashna Hacked RGB Beacon(Planck Light)" # elif defined(KEYBOARD_planck_rev6) -# define PRODUCT Drashna Hacked Planck Rev6 +# define PRODUCT "Drashna Hacked Planck Rev6" # elif defined(KEYBOARD_planck_ez) -# define PRODUCT Drashna Hacked Planck EZ +# define PRODUCT "Drashna Hacked Planck EZ" # define DYNAMIC_KEYMAP_EEPROM_MAX_ADDR 4095 # endif #endif diff --git a/layouts/community/ortho_4x12/ergodoxish/config.h b/layouts/community/ortho_4x12/ergodoxish/config.h index 33e9342039..2f0c23b7f1 100644 --- a/layouts/community/ortho_4x12/ergodoxish/config.h +++ b/layouts/community/ortho_4x12/ergodoxish/config.h @@ -20,11 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/layouts/community/ortho_4x12/grahampheath/config.h b/layouts/community/ortho_4x12/grahampheath/config.h index 8bc3d7762d..342c55cdea 100644 --- a/layouts/community/ortho_4x12/grahampheath/config.h +++ b/layouts/community/ortho_4x12/grahampheath/config.h @@ -23,11 +23,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "keyboards/lets_split/config.h" -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ #define MASTER_LEFT diff --git a/layouts/community/ortho_4x12/jjerrell/config.h b/layouts/community/ortho_4x12/jjerrell/config.h index aee885b8d0..8d2080d868 100644 --- a/layouts/community/ortho_4x12/jjerrell/config.h +++ b/layouts/community/ortho_4x12/jjerrell/config.h @@ -32,7 +32,7 @@ #ifdef KEYBOARD_planck_ez_glow #undef PRODUCT -#define PRODUCT Planck EZ Glow - Modified by <@jjerrell> +#define PRODUCT "Planck EZ Glow - Modified by <@jjerrell>" #endif /* diff --git a/layouts/community/ortho_4x12/symbolic/config.h b/layouts/community/ortho_4x12/symbolic/config.h index 3f88b4cc17..db74d0fdfa 100644 --- a/layouts/community/ortho_4x12/symbolic/config.h +++ b/layouts/community/ortho_4x12/symbolic/config.h @@ -20,13 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once - - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL -// #define USE_I2C - /* Select hand configuration */ //#define MASTER_LEFT diff --git a/layouts/community/ortho_4x12/wanleg/config.h b/layouts/community/ortho_4x12/wanleg/config.h index bcf2756f6b..7ec47302bc 100644 --- a/layouts/community/ortho_4x12/wanleg/config.h +++ b/layouts/community/ortho_4x12/wanleg/config.h @@ -15,7 +15,6 @@ #define QMK_LED B0 #define QMK_ESC_OUTPUT F6 // usually COL #define QMK_ESC_INPUT D7 // usually ROW -#define USE_SERIAL #undef USE_I2C #define EE_HANDS #endif @@ -36,7 +35,7 @@ // use alternate settings for 4x4 board using ProMicro instead of Micro // usage: make 4x4:wanleg PM=yes -#if defined(KEYBOARD_40percentclub_4x4) && defined(PRO_MICRO) +#if defined(KEYBOARD_40percentclub_4x4) && defined(PRO_MICRO) #define QMK_ESC_OUTPUT F4 // usually COL #define QMK_ESC_INPUT D1 // usually ROW #define QMK_LED B0 diff --git a/layouts/community/ortho_4x12/xyverz/config.h b/layouts/community/ortho_4x12/xyverz/config.h index 287f4cc2b7..6486e0831c 100644 --- a/layouts/community/ortho_4x12/xyverz/config.h +++ b/layouts/community/ortho_4x12/xyverz/config.h @@ -3,8 +3,6 @@ #define MIDI_BASIC -#define USE_SERIAL - #define EE_HANDS #undef RGBLED_NUM diff --git a/layouts/community/ortho_5x12/333fred/config.h b/layouts/community/ortho_5x12/333fred/config.h index bdbeead547..4327d154c2 100644 --- a/layouts/community/ortho_5x12/333fred/config.h +++ b/layouts/community/ortho_5x12/333fred/config.h @@ -22,7 +22,6 @@ #pragma once -#define USE_SERIAL #define MASTER_LEFT #undef TAPPING_TERM diff --git a/layouts/community/ortho_5x12/xyverz/config.h b/layouts/community/ortho_5x12/xyverz/config.h index 5f9f6e5c11..46175c2eb1 100644 --- a/layouts/community/ortho_5x12/xyverz/config.h +++ b/layouts/community/ortho_5x12/xyverz/config.h @@ -23,7 +23,6 @@ #endif // for the split boards // -#define USE_SERIAL #define EE_HANDS #endif diff --git a/layouts/community/split_3x6_3/bbaserdem/config.h b/layouts/community/split_3x6_3/bbaserdem/config.h index adf707d1ba..1d269335fe 100644 --- a/layouts/community/split_3x6_3/bbaserdem/config.h +++ b/layouts/community/split_3x6_3/bbaserdem/config.h @@ -26,9 +26,9 @@ // Rebrand the PCB # undef PRODUCT -# define PRODUCT Protorne Keyboard +# define PRODUCT "Protorne Keyboard" # undef MANUFACTURER -# define MANUFACTURER Waffles +# define MANUFACTURER "Waffles" // Remove OLED definitions? # undef USE_I2C diff --git a/layouts/community/split_3x6_3/drashna/config.h b/layouts/community/split_3x6_3/drashna/config.h index cfcb873a80..a84d6eef2e 100644 --- a/layouts/community/split_3x6_3/drashna/config.h +++ b/layouts/community/split_3x6_3/drashna/config.h @@ -87,9 +87,9 @@ #undef PRODUCT #ifdef CONVERT_TO_PROTON_C -# define PRODUCT Drashna Hacked ARM Corne Keyboard +# define PRODUCT "Drashna Hacked ARM Corne Keyboard" #else -# define PRODUCT Drashna Hacked Corne Keyboard +# define PRODUCT "Drashna Hacked Corne Keyboard" #endif #define TAPPING_TERM_PER_KEY diff --git a/lib/python/qmk/cli/generate/config_h.py b/lib/python/qmk/cli/generate/config_h.py index a26dcdf7d7..a2178bf1e9 100755 --- a/lib/python/qmk/cli/generate/config_h.py +++ b/lib/python/qmk/cli/generate/config_h.py @@ -117,9 +117,10 @@ def generate_config_items(kb_info_json, config_h_lines): config_h_lines.append(f'# define {key} {value}') config_h_lines.append(f'#endif // {key}') elif key_type == 'str': + escaped_str = config_value.replace('\\', '\\\\').replace('"', '\\"') config_h_lines.append('') config_h_lines.append(f'#ifndef {config_key}') - config_h_lines.append(f'# define {config_key} "{config_value}"') + config_h_lines.append(f'# define {config_key} "{escaped_str}"') config_h_lines.append(f'#endif // {config_key}') elif key_type == 'bcd_version': (major, minor, revision) = config_value.split('.') diff --git a/lib/python/qmk/info.py b/lib/python/qmk/info.py index 7460d84ad3..b039c2c424 100644 --- a/lib/python/qmk/info.py +++ b/lib/python/qmk/info.py @@ -479,7 +479,7 @@ def _config_to_json(key_type, config_value): return int(config_value) elif key_type == 'str': - return config_value.strip('"') + return config_value.strip('"').replace('\\"', '"').replace('\\\\', '\\') elif key_type == 'bcd_version': major = int(config_value[2:4]) @@ -755,9 +755,6 @@ def arm_processor_rules(info_data, rules): info_data['processor_type'] = 'arm' info_data['protocol'] = 'ChibiOS' - if 'bootloader' not in info_data: - info_data['bootloader'] = 'unknown' - if 'STM32' in info_data['processor']: info_data['platform'] = 'STM32' elif 'MCU_SERIES' in rules: @@ -775,9 +772,6 @@ def avr_processor_rules(info_data, rules): info_data['platform'] = rules['ARCH'] if 'ARCH' in rules else 'unknown' info_data['protocol'] = 'V-USB' if rules.get('MCU') in VUSB_PROCESSORS else 'LUFA' - if 'bootloader' not in info_data: - info_data['bootloader'] = 'atmel-dfu' - # FIXME(fauxpark/anyone): Eventually we should detect the protocol by looking at PROTOCOL inherited from mcu_selection.mk: # info_data['protocol'] = 'V-USB' if rules.get('PROTOCOL') == 'VUSB' else 'LUFA' diff --git a/lib/python/qmk/keymap.py b/lib/python/qmk/keymap.py index f317f4d11e..fc1421962f 100644 --- a/lib/python/qmk/keymap.py +++ b/lib/python/qmk/keymap.py @@ -412,7 +412,7 @@ def list_keymaps(keyboard, c=True, json=True, additional_files=None, fullpath=Fa rules = rules_mk(keyboard) names = set() - if rules: + if rules is not None: keyboards_dir = Path('keyboards') kb_path = keyboards_dir / keyboard diff --git a/lib/python/qmk/tests/test_cli_commands.py b/lib/python/qmk/tests/test_cli_commands.py index fde8b079a3..185abb5f21 100644 --- a/lib/python/qmk/tests/test_cli_commands.py +++ b/lib/python/qmk/tests/test_cli_commands.py @@ -265,8 +265,8 @@ def test_generate_config_h(): check_returncode(result) assert '# define DEVICE_VER 0x0001' in result.stdout assert '# define DIODE_DIRECTION COL2ROW' in result.stdout - assert '# define MANUFACTURER none' in result.stdout - assert '# define PRODUCT pytest' in result.stdout + assert '# define MANUFACTURER "none"' in result.stdout + assert '# define PRODUCT "pytest"' in result.stdout assert '# define PRODUCT_ID 0x6465' in result.stdout assert '# define VENDOR_ID 0xFEED' in result.stdout assert '# define MATRIX_COLS 1' in result.stdout diff --git a/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp index 0f4ee5e981..8169707661 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp +++ b/lib/usbhost/USB_Host_Shield_2.0/SPP.cpp @@ -757,7 +757,7 @@ size_t SPP::write(const uint8_t *data, size_t size) { void SPP::write(const uint8_t *data, size_t size) { #endif for(uint8_t i = 0; i < size; i++) { - if(sppIndex >= sizeof (sppOutputBuffer) / sizeof (sppOutputBuffer[0])) + if(sppIndex >= ARRAY_SIZE(sppOutputBuffer)) send(); // Send the current data in the buffer sppOutputBuffer[sppIndex++] = data[i]; // All the bytes are put into a buffer and then send using the send() function } diff --git a/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino index 5ebfd7819c..11833334d0 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino +++ b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/PS3Multi/PS3Multi.ino @@ -19,7 +19,7 @@ USB Usb; BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so PS3BT *PS3[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM! -const uint8_t length = sizeof(PS3) / sizeof(PS3[0]); // Get the lenght of the array +const uint8_t length = ARRAY_SIZE(PS3); // Get the lenght of the array bool printAngle[length]; bool oldControllerState[length]; diff --git a/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino index 07c6f13d2b..93cd084651 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino +++ b/lib/usbhost/USB_Host_Shield_2.0/examples/Bluetooth/WiiMulti/WiiMulti.ino @@ -19,7 +19,7 @@ USB Usb; BTD Btd(&Usb); // You have to create the Bluetooth Dongle instance like so WII *Wii[2]; // We will use this pointer to store the two instance, you can easily make it larger if you like, but it will use a lot of RAM! -const uint8_t length = sizeof(Wii) / sizeof(Wii[0]); // Get the lenght of the array +const uint8_t length = ARRAY_SIZE(Wii); // Get the lenght of the array bool printAngle[length]; bool oldControllerState[length]; diff --git a/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h index 2400364e65..05dab14afe 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h +++ b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h @@ -25,7 +25,7 @@ public: virtual void OnGamePadChanged(const GamePadEventData *evt); }; -#define RPT_GAMEPAD_LEN sizeof(GamePadEventData)/sizeof(uint8_t) +#define RPT_GAMEPAD_LEN sizeof(GamePadEventData) class JoystickReportParser : public HIDReportParser { diff --git a/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h index 57fbb033bf..7af18b88f7 100644 --- a/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h +++ b/lib/usbhost/USB_Host_Shield_2.0/examples/HID/scale/scale_rptparser.h @@ -38,7 +38,7 @@ public: virtual void OnScaleChanged(const ScaleEventData *evt); }; -#define RPT_SCALE_LEN sizeof(ScaleEventData)/sizeof(uint8_t) +#define RPT_SCALE_LEN sizeof(ScaleEventData) class ScaleReportParser : public HIDReportParser { diff --git a/platforms/arm_atsam/bootloader.mk b/platforms/arm_atsam/bootloader.mk new file mode 100644 index 0000000000..1ec42edeb6 --- /dev/null +++ b/platforms/arm_atsam/bootloader.mk @@ -0,0 +1,46 @@ +# Copyright 2017 Jack Humbert +# +# 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/>. + +# If it's possible that multiple bootloaders can be used for one project, +# you can leave this unset, and the correct size will be selected +# automatically. +# +# Sets the bootloader defined in the keyboard's/keymap's rules.mk +# +# Current options for ARM (ATSAM): +# md-boot Atmel SAM-BA (only used by Drop boards) +# +# If you need to provide your own implementation, you can set inside `rules.mk` +# `BOOTLOADER = custom` -- you'll need to provide your own implementations. See +# the respective file under `platforms/<PLATFORM>/bootloaders/custom.c` to see +# which functions may be overridden. + +ifeq ($(strip $(BOOTLOADER)), custom) + OPT_DEFS += -DBOOTLOADER_CUSTOM + BOOTLOADER_TYPE = custom +endif + +ifeq ($(strip $(BOOTLOADER)), md-boot) + OPT_DEFS += -DBOOTLOADER_MD_BOOT + BOOTLOADER_TYPE = md_boot +endif + +ifeq ($(strip $(BOOTLOADER_TYPE)),) + ifneq ($(strip $(BOOTLOADER)),) + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,Invalid bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + else + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + endif +endif diff --git a/builddefs/bootloader.mk b/platforms/avr/bootloader.mk index 9f55536423..63fe635d96 100644 --- a/builddefs/bootloader.mk +++ b/platforms/avr/bootloader.mk @@ -18,9 +18,8 @@ # automatically. # # Sets the bootloader defined in the keyboard's/keymap's rules.mk -# Current options: # -# AVR: +# Current options for AVR: # halfkay PJRC Teensy # caterina Pro Micro (Sparkfun/generic) # atmel-dfu Atmel factory DFU @@ -29,14 +28,6 @@ # qmk-hid QMK HID (LUFA + blinkenlight) # bootloadhid HIDBootFlash compatible (ATmega32A) # usbasploader USBaspLoader (ATmega328P) -# ARM: -# halfkay PJRC Teensy -# kiibohd Input:Club Kiibohd bootloader (only used on their boards) -# stm32duino STM32Duino (STM32F103x8) -# stm32-dfu STM32 USB DFU in ROM -# apm32-dfu APM32 USB DFU in ROM -# RISC-V: -# gd32v-dfu GD32V USB DFU in ROM # # If you need to provide your own implementation, you can set inside `rules.mk` # `BOOTLOADER = custom` -- you'll need to provide your own implementations. See @@ -50,6 +41,7 @@ ifeq ($(strip $(BOOTLOADER)), custom) OPT_DEFS += -DBOOTLOADER_CUSTOM BOOTLOADER_TYPE = custom endif + ifeq ($(strip $(BOOTLOADER)), atmel-dfu) OPT_DEFS += -DBOOTLOADER_ATMEL_DFU OPT_DEFS += -DBOOTLOADER_DFU @@ -105,10 +97,6 @@ ifeq ($(strip $(BOOTLOADER)), halfkay) ifeq ($(strip $(MCU)), at90usb1286) BOOTLOADER_SIZE = 1024 endif - # Teensy LC, 3.0, 3.1/2, 3.5, 3.6 - ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK64FX512 MK66FX1M0)) - FIRMWARE_FORMAT = hex - endif endif ifeq ($(strip $(BOOTLOADER)), caterina) OPT_DEFS += -DBOOTLOADER_CATERINA @@ -116,13 +104,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 @@ -147,77 +135,10 @@ ifdef BOOTLOADER_SIZE OPT_DEFS += -DBOOTLOADER_SIZE=$(strip $(BOOTLOADER_SIZE)) endif -ifeq ($(strip $(BOOTLOADER)), stm32-dfu) - OPT_DEFS += -DBOOTLOADER_STM32_DFU - BOOTLOADER_TYPE = stm32_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 -endif -ifeq ($(strip $(BOOTLOADER)), apm32-dfu) - OPT_DEFS += -DBOOTLOADER_APM32_DFU - BOOTLOADER_TYPE = stm32_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 314B -p 0106 -endif -ifeq ($(strip $(BOOTLOADER)), gd32v-dfu) - OPT_DEFS += -DBOOTLOADER_GD32V_DFU - BOOTLOADER_TYPE = gd32v_dfu - - # Options to pass to dfu-util when flashing - DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave - DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189 -endif -ifeq ($(strip $(BOOTLOADER)), kiibohd) - OPT_DEFS += -DBOOTLOADER_KIIBOHD - BOOTLOADER_TYPE = kiibohd - - ifeq ($(strip $(MCU_ORIG)), MK20DX128) - MCU_LDSCRIPT = MK20DX128BLDR4 - endif - ifeq ($(strip $(MCU_ORIG)), MK20DX256) - MCU_LDSCRIPT = MK20DX256BLDR8 - endif - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1C11:B007 - DFU_SUFFIX_ARGS = -v 1C11 -p B007 -endif -ifeq ($(strip $(BOOTLOADER)), stm32duino) - OPT_DEFS += -DBOOTLOADER_STM32DUINO - MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader - BOARD = STM32_F103_STM32DUINO - BOOTLOADER_TYPE = stm32duino - - # Options to pass to dfu-util when flashing - DFU_ARGS = -d 1EAF:0003 -a 2 -R - DFU_SUFFIX_ARGS = -v 1EAF -p 0003 -endif -ifeq ($(strip $(BOOTLOADER)), tinyuf2) - OPT_DEFS += -DBOOTLOADER_TINYUF2 - BOOTLOADER_TYPE = tinyuf2 - FIRMWARE_FORMAT = uf2 -endif -ifeq ($(strip $(BOOTLOADER)), rp2040) - OPT_DEFS += -DBOOTLOADER_RP2040 - BOOTLOADER_TYPE = rp2040 -endif -ifeq ($(strip $(BOOTLOADER)), halfkay) - OPT_DEFS += -DBOOTLOADER_HALFKAY - BOOTLOADER_TYPE = halfkay -endif -ifeq ($(strip $(BOOTLOADER)), md-boot) - OPT_DEFS += -DBOOTLOADER_MD_BOOT - BOOTLOADER_TYPE = md_boot -endif -ifeq ($(strip $(BOOTLOADER)), wb32-dfu) - OPT_DEFS += -DBOOTLOADER_WB32_DFU - BOOTLOADER_TYPE = wb32_dfu -endif - ifeq ($(strip $(BOOTLOADER_TYPE)),) - $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate 'BOOTLOADER' in your keyboard's 'rules.mk' file.) + ifneq ($(strip $(BOOTLOADER)),) + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,Invalid bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + else + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + endif endif diff --git a/platforms/avr/flash.mk b/platforms/avr/flash.mk index 6d50e72534..cd980b9733 100644 --- a/platforms/avr/flash.mk +++ b/platforms/avr/flash.mk @@ -177,9 +177,9 @@ else ifeq ($(strip $(BOOTLOADER)), halfkay) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_TEENSY) else ifeq (dfu,$(findstring dfu,$(BOOTLOADER))) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_DFU) -else ifneq (,$(filter $(BOOTLOADER), usbasploader USBasp)) +else ifeq ($(strip $(BOOTLOADER)), usbasploader) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_USBASP) -else ifneq (,$(filter $(BOOTLOADER), bootloadhid bootloadHID)) +else ifeq ($(strip $(BOOTLOADER)), bootloadhid) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_BOOTLOADHID) else ifeq ($(strip $(BOOTLOADER)), qmk-hid) $(UNSYNC_OUTPUT_CMD) && $(call EXEC_HID_LUFA) diff --git a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c index e38a7e0054..f74c9e8be7 100644 --- a/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c +++ b/platforms/chibios/boards/GENERIC_WB32_F3G71XX/board/board.c @@ -80,3 +80,7 @@ void __early_init(void) { void boardInit(void) { } + +void restart_usb_driver(USBDriver *usbp) { + // Do nothing. Restarting the USB driver on these boards breaks it. +} diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c index 22b4ff73b5..a99537fc27 100644 --- a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c +++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/board/board.c @@ -80,3 +80,7 @@ void __early_init(void) { void boardInit(void) { } + +void restart_usb_driver(USBDriver *usbp) { + // Do nothing. Restarting the USB driver on these boards breaks it. +} diff --git a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/configs/config.h b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/configs/config.h index e02e526113..d4c7e54642 100644 --- a/platforms/chibios/boards/GENERIC_WB32_FQ95XX/configs/config.h +++ b/platforms/chibios/boards/GENERIC_WB32_FQ95XX/configs/config.h @@ -18,3 +18,5 @@ #ifndef EARLY_INIT_PERFORM_BOOTLOADER_JUMP # define EARLY_INIT_PERFORM_BOOTLOADER_JUMP TRUE #endif + +#define USB_ENDPOINTS_ARE_REORDERABLE diff --git a/platforms/chibios/bootloader.mk b/platforms/chibios/bootloader.mk new file mode 100644 index 0000000000..0568d35321 --- /dev/null +++ b/platforms/chibios/bootloader.mk @@ -0,0 +1,122 @@ +# Copyright 2017 Jack Humbert +# +# 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/>. + +# If it's possible that multiple bootloaders can be used for one project, +# you can leave this unset, and the correct size will be selected +# automatically. +# +# Sets the bootloader defined in the keyboard's/keymap's rules.mk +# +# Current options for ARM: +# halfkay PJRC Teensy +# kiibohd Input:Club Kiibohd bootloader (only used on their boards) +# stm32duino STM32Duino (STM32F103x8) +# stm32-dfu STM32 USB DFU in ROM +# apm32-dfu APM32 USB DFU in ROM +# wb32-dfu WB32 USB DFU in ROM +# tinyuf2 TinyUF2 +# rp2040 Raspberry Pi RP2040 +# Current options for RISC-V: +# gd32v-dfu GD32V USB DFU in ROM +# +# If you need to provide your own implementation, you can set inside `rules.mk` +# `BOOTLOADER = custom` -- you'll need to provide your own implementations. See +# the respective file under `platforms/<PLATFORM>/bootloaders/custom.c` to see +# which functions may be overridden. + +ifeq ($(strip $(BOOTLOADER)), custom) + OPT_DEFS += -DBOOTLOADER_CUSTOM + BOOTLOADER_TYPE = custom +endif + +ifeq ($(strip $(BOOTLOADER)), halfkay) + OPT_DEFS += -DBOOTLOADER_HALFKAY + BOOTLOADER_TYPE = halfkay + + # Teensy LC, 3.0, 3.1/2, 3.5, 3.6 + ifneq (,$(filter $(MCU_ORIG), MKL26Z64 MK20DX128 MK20DX256 MK64FX512 MK66FX1M0)) + FIRMWARE_FORMAT = hex + endif +endif +ifeq ($(strip $(BOOTLOADER)), stm32-dfu) + OPT_DEFS += -DBOOTLOADER_STM32_DFU + BOOTLOADER_TYPE = stm32_dfu + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 0483:DF11 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 0483 -p DF11 +endif +ifeq ($(strip $(BOOTLOADER)), apm32-dfu) + OPT_DEFS += -DBOOTLOADER_APM32_DFU + BOOTLOADER_TYPE = stm32_dfu + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 314B:0106 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 314B -p 0106 +endif +ifeq ($(strip $(BOOTLOADER)), gd32v-dfu) + OPT_DEFS += -DBOOTLOADER_GD32V_DFU + BOOTLOADER_TYPE = gd32v_dfu + + # Options to pass to dfu-util when flashing + DFU_ARGS ?= -d 28E9:0189 -a 0 -s 0x08000000:leave + DFU_SUFFIX_ARGS ?= -v 28E9 -p 0189 +endif +ifeq ($(strip $(BOOTLOADER)), kiibohd) + OPT_DEFS += -DBOOTLOADER_KIIBOHD + BOOTLOADER_TYPE = kiibohd + + ifeq ($(strip $(MCU_ORIG)), MK20DX128) + MCU_LDSCRIPT = MK20DX128BLDR4 + endif + ifeq ($(strip $(MCU_ORIG)), MK20DX256) + MCU_LDSCRIPT = MK20DX256BLDR8 + endif + + # Options to pass to dfu-util when flashing + DFU_ARGS = -d 1C11:B007 + DFU_SUFFIX_ARGS = -v 1C11 -p B007 +endif +ifeq ($(strip $(BOOTLOADER)), stm32duino) + OPT_DEFS += -DBOOTLOADER_STM32DUINO + MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader + BOARD = STM32_F103_STM32DUINO + BOOTLOADER_TYPE = stm32duino + + # Options to pass to dfu-util when flashing + DFU_ARGS = -d 1EAF:0003 -a 2 -R + DFU_SUFFIX_ARGS = -v 1EAF -p 0003 +endif +ifeq ($(strip $(BOOTLOADER)), tinyuf2) + OPT_DEFS += -DBOOTLOADER_TINYUF2 + BOOTLOADER_TYPE = tinyuf2 + FIRMWARE_FORMAT = uf2 +endif +ifeq ($(strip $(BOOTLOADER)), rp2040) + OPT_DEFS += -DBOOTLOADER_RP2040 + BOOTLOADER_TYPE = rp2040 +endif +ifeq ($(strip $(BOOTLOADER)), wb32-dfu) + OPT_DEFS += -DBOOTLOADER_WB32_DFU + BOOTLOADER_TYPE = wb32_dfu +endif + +ifeq ($(strip $(BOOTLOADER_TYPE)),) + ifneq ($(strip $(BOOTLOADER)),) + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,Invalid bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + else + $(call CATASTROPHIC_ERROR,Invalid BOOTLOADER,No bootloader specified. Please set an appropriate bootloader in your rules.mk or info.json.) + endif +endif diff --git a/platforms/chibios/converters/promicro_to_elite_pi/_pin_defs.h b/platforms/chibios/converters/promicro_to_elite_pi/_pin_defs.h new file mode 100644 index 0000000000..1372bef79e --- /dev/null +++ b/platforms/chibios/converters/promicro_to_elite_pi/_pin_defs.h @@ -0,0 +1,36 @@ +// Copyright 2022 QMK +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +// Left side (front) +#define D3 0U +#define D2 1U +// GND +// GND +#define D1 2U +#define D0 3U +#define D4 4U +#define C6 5U +#define D7 6U +#define E6 7U +#define B4 8U +#define B5 9U + +// Right side (front) +// RAW +// GND +// RESET +// VCC +#define F4 29U +#define F5 28U +#define F6 27U +#define F7 26U +#define B1 22U +#define B3 20U +#define B2 23U +#define B6 21U + +// LEDs +#define D5 12U +#define B0 13U diff --git a/platforms/chibios/converters/promicro_to_elite_pi/converter.mk b/platforms/chibios/converters/promicro_to_elite_pi/converter.mk new file mode 100644 index 0000000000..590a004189 --- /dev/null +++ b/platforms/chibios/converters/promicro_to_elite_pi/converter.mk @@ -0,0 +1,9 @@ +# Elite-Pi MCU settings for converting AVR projects +MCU := RP2040 +BOARD := QMK_PM2040 +BOOTLOADER := rp2040 + +# These are defaults based on what has been implemented for RP2040 boards +SERIAL_DRIVER ?= vendor +WS2812_DRIVER ?= vendor +BACKLIGHT_DRIVER ?= software diff --git a/platforms/chibios/drivers/ws2812_spi.c b/platforms/chibios/drivers/ws2812_spi.c index a73eb69720..390884a2a4 100644 --- a/platforms/chibios/drivers/ws2812_spi.c +++ b/platforms/chibios/drivers/ws2812_spi.c @@ -181,7 +181,7 @@ void ws2812_init(void) { spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters. */ spiSelect(&WS2812_SPI); /* Slave Select assertion. */ #ifdef WS2812_SPI_USE_CIRCULAR_BUFFER - spiStartSend(&WS2812_SPI, sizeof(txbuf) / sizeof(txbuf[0]), txbuf); + spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf); #endif } @@ -200,9 +200,9 @@ void ws2812_setleds(LED_TYPE* ledarray, uint16_t leds) { // Instead spiSend can be used to send synchronously (or the thread logic can be added back). #ifndef WS2812_SPI_USE_CIRCULAR_BUFFER # ifdef WS2812_SPI_SYNC - spiSend(&WS2812_SPI, sizeof(txbuf) / sizeof(txbuf[0]), txbuf); + spiSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf); # else - spiStartSend(&WS2812_SPI, sizeof(txbuf) / sizeof(txbuf[0]), txbuf); + spiStartSend(&WS2812_SPI, ARRAY_SIZE(txbuf), txbuf); # endif #endif } diff --git a/platforms/chibios/flash.mk b/platforms/chibios/flash.mk index 790c4f3316..2802368b5d 100644 --- a/platforms/chibios/flash.mk +++ b/platforms/chibios/flash.mk @@ -23,6 +23,7 @@ define EXEC_DFU_UTIL $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin endef +WB32_DFU_UPDATER ?= wb32-dfu-updater_cli define EXEC_WB32_DFU_UPDATER if ! wb32-dfu-updater_cli -l | grep -q "Found DFU"; then \ @@ -34,7 +35,7 @@ define EXEC_WB32_DFU_UPDATER done ;\ printf "\n" ;\ fi - wb32-dfu-updater_cli -D $(BUILD_DIR)/$(TARGET).bin + $(WB32_DFU_UPDATER) -D $(BUILD_DIR)/$(TARGET).bin && $(WB32_DFU_UPDATER) -R endef dfu-util: $(BUILD_DIR)/$(TARGET).bin cpfirmware sizeafter diff --git a/quantum/backlight/backlight_driver_common.c b/quantum/backlight/backlight_driver_common.c index e4c2e90b5f..1eb8969084 100644 --- a/quantum/backlight/backlight_driver_common.c +++ b/quantum/backlight/backlight_driver_common.c @@ -9,7 +9,7 @@ #if defined(BACKLIGHT_PINS) static const pin_t backlight_pins[] = BACKLIGHT_PINS; # ifndef BACKLIGHT_LED_COUNT -# define BACKLIGHT_LED_COUNT (sizeof(backlight_pins) / sizeof(pin_t)) +# define BACKLIGHT_LED_COUNT ARRAY_SIZE(backlight_pins) # endif # define FOR_EACH_LED(x) \ diff --git a/quantum/backlight/backlight_software.c b/quantum/backlight/backlight_software.c index 3d412cab52..27ccbd2c9f 100644 --- a/quantum/backlight/backlight_software.c +++ b/quantum/backlight/backlight_software.c @@ -26,7 +26,7 @@ static const uint16_t backlight_duty_table[] = { 0b1110111011101110, 0b1111111111111111, }; -#define backlight_duty_table_size (sizeof(backlight_duty_table) / sizeof(backlight_duty_table[0])) +#define backlight_duty_table_size ARRAY_SIZE(backlight_duty_table) // clang-format on diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c index eee29aaf91..e180cfccdf 100644 --- a/quantum/dip_switch.c +++ b/quantum/dip_switch.c @@ -33,7 +33,7 @@ #endif #ifdef DIP_SWITCH_PINS -# define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t)) +# define NUMBER_OF_DIP_SWITCHES (ARRAY_SIZE(dip_switch_pad)) static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; #endif @@ -43,7 +43,7 @@ typedef struct matrix_index_t { uint8_t col; } matrix_index_t; -# define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(matrix_index_t)) +# define NUMBER_OF_DIP_SWITCHES (ARRAY_SIZE(dip_switch_pad)) static matrix_index_t dip_switch_pad[] = DIP_SWITCH_MATRIX_GRID; extern bool peek_matrix(uint8_t row_index, uint8_t col_index, bool read_raw); static uint16_t scan_count; diff --git a/quantum/encoder.c b/quantum/encoder.c index 5f8a7ce080..1393e34868 100644 --- a/quantum/encoder.c +++ b/quantum/encoder.c @@ -24,7 +24,8 @@ #include <string.h> #ifndef ENCODER_MAP_KEY_DELAY -# define ENCODER_MAP_KEY_DELAY 2 +# include "action.h" +# define ENCODER_MAP_KEY_DELAY TAP_CODE_DELAY #endif #if !defined(ENCODER_RESOLUTIONS) && !defined(ENCODER_RESOLUTION) @@ -143,9 +144,14 @@ void encoder_init(void) { static void encoder_exec_mapping(uint8_t index, bool clockwise) { // The delays below cater for Windows and its wonderful requirements. action_exec(clockwise ? ENCODER_CW_EVENT(index, true) : ENCODER_CCW_EVENT(index, true)); +# if ENCODER_MAP_KEY_DELAY > 0 wait_ms(ENCODER_MAP_KEY_DELAY); +# endif // ENCODER_MAP_KEY_DELAY > 0 + action_exec(clockwise ? ENCODER_CW_EVENT(index, false) : ENCODER_CCW_EVENT(index, false)); +# if ENCODER_MAP_KEY_DELAY > 0 wait_ms(ENCODER_MAP_KEY_DELAY); +# endif // ENCODER_MAP_KEY_DELAY > 0 } #endif // ENCODER_MAP_ENABLE diff --git a/quantum/encoder.h b/quantum/encoder.h index 82f95b4931..4eb67fa25d 100644 --- a/quantum/encoder.h +++ b/quantum/encoder.h @@ -32,17 +32,17 @@ void encoder_state_raw(uint8_t* slave_state); void encoder_update_raw(uint8_t* slave_state); # if defined(ENCODERS_PAD_A_RIGHT) -# define NUM_ENCODERS_LEFT (sizeof(((pin_t[])ENCODERS_PAD_A)) / sizeof(pin_t)) -# define NUM_ENCODERS_RIGHT (sizeof(((pin_t[])ENCODERS_PAD_A_RIGHT)) / sizeof(pin_t)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) +# define NUM_ENCODERS_RIGHT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A_RIGHT)) # else -# define NUM_ENCODERS_LEFT (sizeof(((pin_t[])ENCODERS_PAD_A)) / sizeof(pin_t)) +# define NUM_ENCODERS_LEFT ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) # define NUM_ENCODERS_RIGHT NUM_ENCODERS_LEFT # endif # define NUM_ENCODERS (NUM_ENCODERS_LEFT + NUM_ENCODERS_RIGHT) #else // SPLIT_KEYBOARD -# define NUM_ENCODERS (sizeof(((pin_t[])ENCODERS_PAD_A)) / sizeof(pin_t)) +# define NUM_ENCODERS ARRAY_SIZE(((pin_t[])ENCODERS_PAD_A)) # define NUM_ENCODERS_LEFT NUM_ENCODERS # define NUM_ENCODERS_RIGHT 0 diff --git a/quantum/keyboard.c b/quantum/keyboard.c index 1c62a43d9d..3b5e9b0200 100644 --- a/quantum/keyboard.c +++ b/quantum/keyboard.c @@ -107,6 +107,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #endif #ifdef BLUETOOTH_ENABLE # include "outputselect.h" +# ifdef BLUETOOTH_BLUEFRUIT_LE +# include "bluefruit_le.h" +# elif BLUETOOTH_RN42 +# include "rn42.h" +# endif #endif #ifdef CAPS_WORD_ENABLE # include "caps_word.h" @@ -346,9 +351,6 @@ void quantum_init(void) { #ifdef HAPTIC_ENABLE haptic_init(); #endif -#if defined(BLUETOOTH_ENABLE) && defined(OUTPUT_AUTO_ENABLE) - set_output(OUTPUT_AUTO); -#endif } /** \brief keyboard_init @@ -410,6 +412,9 @@ void keyboard_init(void) { // init after split init pointing_device_init(); #endif +#if defined(BLUETOOTH_RN42) + rn42_init(); +#endif #if defined(DEBUG_MATRIX_SCAN_RATE) && defined(CONSOLE_ENABLE) debug_enable = true; @@ -670,5 +675,9 @@ void keyboard_task(void) { programmable_button_send(); #endif +#ifdef BLUETOOTH_BLUEFRUIT_LE + bluefruit_le_task(); +#endif + led_task(); } diff --git a/quantum/keymap.h b/quantum/keymap.h index edff484129..67e35c4e2f 100644 --- a/quantum/keymap.h +++ b/quantum/keymap.h @@ -19,38 +19,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <stdint.h> #include <stdbool.h> +#include "platform_deps.h" #include "action.h" -#if defined(__AVR__) -# include <avr/pgmspace.h> -#elif defined PROTOCOL_CHIBIOS -// We need to ensure that chibios is include before redefining reset -# include <ch.h> -#endif #include "keycode.h" #include "report.h" #include "host.h" -// #include "print.h" #include "debug.h" #include "keycode_config.h" #include "gpio.h" // for pin_t -// ChibiOS uses RESET in its FlagStatus enumeration -// Therefore define it as QK_BOOTLOADER here, to avoid name collision -#if defined(PROTOCOL_CHIBIOS) -# define RESET QK_BOOTLOADER -#endif -// Gross hack, remove me and change RESET keycode to QK_BOOT -#if defined(__AVR_AT90USB647__) || defined(__AVR_AT90USB1287__) -# undef RESET -#endif - #include "quantum_keycodes.h" -// Gross hack, remove me and change RESET keycode to QK_BOOT -#if defined(MCU_RP) -# undef RESET -#endif - // translates key to keycode uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); diff --git a/quantum/painter/rules.mk b/quantum/painter/rules.mk index 91787dfe0e..4420bccf63 100644 --- a/quantum/painter/rules.mk +++ b/quantum/painter/rules.mk @@ -8,9 +8,10 @@ VALID_QUANTUM_PAINTER_DRIVERS := ili9163_spi ili9341_spi ili9488_spi st7789_spi #------------------------------------------------------------------------------- OPT_DEFS += -DQUANTUM_PAINTER_ENABLE -COMMON_VPATH += $(QUANTUM_DIR)/painter +COMMON_VPATH += $(QUANTUM_DIR)/painter \ + $(QUANTUM_DIR)/unicode SRC += \ - $(QUANTUM_DIR)/utf8.c \ + $(QUANTUM_DIR)/unicode/utf8.c \ $(QUANTUM_DIR)/color.c \ $(QUANTUM_DIR)/painter/qp.c \ $(QUANTUM_DIR)/painter/qp_stream.c \ diff --git a/quantum/pointing_device/pointing_device.c b/quantum/pointing_device/pointing_device.c index 505a7a6ffd..ae3f122e89 100644 --- a/quantum/pointing_device/pointing_device.c +++ b/quantum/pointing_device/pointing_device.c @@ -166,11 +166,9 @@ __attribute__((weak)) void pointing_device_send(void) { host_mouse_send(&local_mouse_report); } // send it and 0 it out except for buttons, so those stay until they are explicity over-ridden using update_pointing_device - local_mouse_report.x = 0; - local_mouse_report.y = 0; - local_mouse_report.v = 0; - local_mouse_report.h = 0; - + uint8_t buttons = local_mouse_report.buttons; + memset(&local_mouse_report, 0, sizeof(local_mouse_report)); + local_mouse_report.buttons = buttons; memcpy(&old_report, &local_mouse_report, sizeof(local_mouse_report)); } diff --git a/quantum/pointing_device/pointing_device_drivers.c b/quantum/pointing_device/pointing_device_drivers.c index b96f8ff4b3..096ad5d028 100644 --- a/quantum/pointing_device/pointing_device_drivers.c +++ b/quantum/pointing_device/pointing_device_drivers.c @@ -17,6 +17,7 @@ */ #include "pointing_device.h" +#include "pointing_device_internal.h" #include "debug.h" #include "wait.h" #include "timer.h" @@ -32,10 +33,7 @@ report_mouse_t adns5050_get_report(report_mouse_t mouse_report) { report_adns5050_t data = adns5050_read_burst(); if (data.dx != 0 || data.dy != 0) { -# ifdef CONSOLE_ENABLE - if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); -# endif - + pd_dprintf("Raw ] X: %d, Y: %d\n", data.dx, data.dy); mouse_report.x = (mouse_xy_report_t)data.dx; mouse_report.y = (mouse_xy_report_t)data.dy; } @@ -76,9 +74,7 @@ const pointing_device_driver_t pointing_device_driver = { report_mouse_t analog_joystick_get_report(report_mouse_t mouse_report) { report_analog_joystick_t data = analog_joystick_read(); -# ifdef CONSOLE_ENABLE - if (debug_mouse) dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); -# endif + pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); mouse_report.x = data.x; mouse_report.y = data.y; @@ -140,11 +136,9 @@ report_mouse_t cirque_pinnacle_get_report(report_mouse_t mouse_report) { return mouse_report; } -# if CONSOLE_ENABLE - if (debug_mouse && touchData.touchDown) { - dprintf("cirque_pinnacle touchData x=%4d y=%4d z=%2d\n", touchData.xValue, touchData.yValue, touchData.zValue); + if (touchData.touchDown) { + pd_dprintf("cirque_pinnacle touchData x=%4d y=%4d z=%2d\n", touchData.xValue, touchData.yValue, touchData.zValue); } -# endif // Scale coordinates to arbitrary X, Y resolution cirque_pinnacle_scale_data(&touchData, cirque_pinnacle_get_scale(), cirque_pinnacle_get_scale()); @@ -227,9 +221,7 @@ const pointing_device_driver_t pointing_device_driver = { report_mouse_t paw3204_get_report(report_mouse_t mouse_report) { report_paw3204_t data = paw3204_read(); if (data.isMotion) { -# ifdef CONSOLE_ENABLE - dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); -# endif + pd_dprintf("Raw ] X: %d, Y: %d\n", data.x, data.y); mouse_report.x = data.x; mouse_report.y = data.y; @@ -329,7 +321,7 @@ report_mouse_t pmw33xx_get_report(report_mouse_t mouse_report) { if (!in_motion) { in_motion = true; - dprintf("PWM3360 (0): starting motion\n"); + pd_dprintf("PWM3360 (0): starting motion\n"); } mouse_report.x = CONSTRAIN_HID_XY(report.delta_x); diff --git a/quantum/pointing_device_internal.h b/quantum/pointing_device_internal.h new file mode 100644 index 0000000000..ef649407ca --- /dev/null +++ b/quantum/pointing_device_internal.h @@ -0,0 +1,14 @@ +// Copyright 2022 Stefan Kerkmann +// SPDX-License-Identifier: GPL-2.0-or-later + +#pragma once + +#ifdef POINTING_DEVICE_DEBUG +# include "debug.h" +# include "print.h" +# define pd_dprintf(...) dprintf(__VA_ARGS__) +#else +# define pd_dprintf(...) \ + do { \ + } while (0) +#endif diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c index ae00b3227a..3593f75f0d 100644 --- a/quantum/process_keycode/process_leader.c +++ b/quantum/process_keycode/process_leader.c @@ -58,7 +58,7 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) { keycode = keycode & 0xFF; } # endif // LEADER_KEY_STRICT_KEY_PROCESSING - if (leader_sequence_size < (sizeof(leader_sequence) / sizeof(leader_sequence[0]))) { + if (leader_sequence_size < ARRAY_SIZE(leader_sequence)) { leader_sequence[leader_sequence_size] = keycode; leader_sequence_size++; } else { diff --git a/quantum/process_keycode/process_ucis.c b/quantum/process_keycode/process_ucis.c index 6a8d8f0ff6..646471bc4d 100644 --- a/quantum/process_keycode/process_ucis.c +++ b/quantum/process_keycode/process_ucis.c @@ -15,6 +15,9 @@ */ #include "process_ucis.h" +#include "unicode.h" +#include "keycode.h" +#include "wait.h" qk_ucis_state_t qk_ucis_state; @@ -26,9 +29,7 @@ void qk_ucis_start(void) { } __attribute__((weak)) void qk_ucis_start_user(void) { - unicode_input_start(); - register_hex(0x2328); // ⌨ - unicode_input_finish(); + register_unicode(0x2328); // ⌨ } __attribute__((weak)) void qk_ucis_success(uint8_t symbol_index) {} @@ -51,10 +52,7 @@ static bool is_uni_seq(char *seq) { __attribute__((weak)) void qk_ucis_symbol_fallback(void) { for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { - uint8_t keycode = qk_ucis_state.codes[i]; - register_code(keycode); - unregister_code(keycode); - wait_ms(UNICODE_TYPE_DELAY); + tap_code(qk_ucis_state.codes[i]); } } @@ -63,7 +61,6 @@ __attribute__((weak)) void qk_ucis_cancel(void) {} void register_ucis(const uint32_t *code_points) { for (int i = 0; i < UCIS_MAX_CODE_POINTS && code_points[i]; i++) { register_unicode(code_points[i]); - wait_ms(UNICODE_TYPE_DELAY); } } @@ -94,9 +91,7 @@ bool process_ucis(uint16_t keycode, keyrecord_t *record) { case KC_ENTER: case KC_ESCAPE: for (uint8_t i = 0; i < qk_ucis_state.count; i++) { - register_code(KC_BACKSPACE); - unregister_code(KC_BACKSPACE); - wait_ms(UNICODE_TYPE_DELAY); + tap_code(KC_BACKSPACE); } if (keycode == KC_ESCAPE) { diff --git a/quantum/process_keycode/process_ucis.h b/quantum/process_keycode/process_ucis.h index a667430bda..3de0707762 100644 --- a/quantum/process_keycode/process_ucis.h +++ b/quantum/process_keycode/process_ucis.h @@ -16,8 +16,10 @@ #pragma once -#include "quantum.h" -#include "process_unicode_common.h" +#include <stdbool.h> +#include <stdint.h> + +#include "action.h" #ifndef UCIS_MAX_SYMBOL_LENGTH # define UCIS_MAX_SYMBOL_LENGTH 32 diff --git a/quantum/process_keycode/process_unicode.c b/quantum/process_keycode/process_unicode.c index 18a1d8bc1f..99cc2f5f26 100644 --- a/quantum/process_keycode/process_unicode.c +++ b/quantum/process_keycode/process_unicode.c @@ -15,14 +15,14 @@ */ #include "process_unicode.h" -#include "action_util.h" -#include "eeprom.h" +#include "unicode.h" +#include "quantum_keycodes.h" bool process_unicode(uint16_t keycode, keyrecord_t *record) { - if (keycode >= QK_UNICODE && keycode <= QK_UNICODE_MAX && record->event.pressed) { - unicode_input_start(); - register_hex(keycode & 0x7FFF); - unicode_input_finish(); + if (record->event.pressed) { + if (keycode >= QK_UNICODE && keycode <= QK_UNICODE_MAX) { + register_unicode(keycode & 0x7FFF); + } } return true; } diff --git a/quantum/process_keycode/process_unicode.h b/quantum/process_keycode/process_unicode.h index 22765ad560..341bc8d861 100644 --- a/quantum/process_keycode/process_unicode.h +++ b/quantum/process_keycode/process_unicode.h @@ -16,6 +16,9 @@ #pragma once -#include "process_unicode_common.h" +#include <stdbool.h> +#include <stdint.h> + +#include "action.h" bool process_unicode(uint16_t keycode, keyrecord_t *record); diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c index 8de31c055c..bd5fc560f3 100644 --- a/quantum/process_keycode/process_unicode_common.c +++ b/quantum/process_keycode/process_unicode_common.c @@ -15,289 +15,17 @@ */ #include "process_unicode_common.h" -#include "eeprom.h" -#include "utf8.h" +#include "unicode.h" +#include "action_util.h" +#include "keycode.h" -unicode_config_t unicode_config; -uint8_t unicode_saved_mods; -bool unicode_saved_caps_lock; -bool unicode_saved_num_lock; - -#if UNICODE_SELECTED_MODES != -1 -static uint8_t selected[] = {UNICODE_SELECTED_MODES}; -static int8_t selected_count = sizeof selected / sizeof *selected; -static int8_t selected_index; -#endif - -void unicode_input_mode_init(void) { - unicode_config.raw = eeprom_read_byte(EECONFIG_UNICODEMODE); -#if UNICODE_SELECTED_MODES != -1 -# if UNICODE_CYCLE_PERSIST - // Find input_mode in selected modes - int8_t i; - for (i = 0; i < selected_count; i++) { - if (selected[i] == unicode_config.input_mode) { - selected_index = i; - break; - } - } - if (i == selected_count) { - // Not found: input_mode isn't selected, change to one that is - unicode_config.input_mode = selected[selected_index = 0]; - } -# else - // Always change to the first selected input mode - unicode_config.input_mode = selected[selected_index = 0]; -# endif -#endif - dprintf("Unicode input mode init to: %u\n", unicode_config.input_mode); -} - -uint8_t get_unicode_input_mode(void) { - return unicode_config.input_mode; -} - -void set_unicode_input_mode(uint8_t mode) { - unicode_config.input_mode = mode; - persist_unicode_input_mode(); - dprintf("Unicode input mode set to: %u\n", unicode_config.input_mode); -} - -void cycle_unicode_input_mode(int8_t offset) { -#if UNICODE_SELECTED_MODES != -1 - selected_index = (selected_index + offset) % selected_count; - if (selected_index < 0) { - selected_index += selected_count; - } - unicode_config.input_mode = selected[selected_index]; -# if UNICODE_CYCLE_PERSIST - persist_unicode_input_mode(); -# endif - dprintf("Unicode input mode cycle to: %u\n", unicode_config.input_mode); -#endif -} - -void persist_unicode_input_mode(void) { - eeprom_update_byte(EECONFIG_UNICODEMODE, unicode_config.input_mode); -} - -__attribute__((weak)) void unicode_input_start(void) { - unicode_saved_caps_lock = host_keyboard_led_state().caps_lock; - unicode_saved_num_lock = host_keyboard_led_state().num_lock; - - // Note the order matters here! - // Need to do this before we mess around with the mods, or else - // UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work - // correctly in the shifted case. - if (unicode_config.input_mode == UC_LNX && unicode_saved_caps_lock) { - tap_code(KC_CAPS_LOCK); - } - - unicode_saved_mods = get_mods(); // Save current mods - clear_mods(); // Unregister mods to start from a clean state - clear_weak_mods(); - - switch (unicode_config.input_mode) { - case UC_MAC: - register_code(UNICODE_KEY_MAC); - break; - case UC_LNX: - tap_code16(UNICODE_KEY_LNX); - break; - case UC_WIN: - // For increased reliability, use numpad keys for inputting digits - if (!unicode_saved_num_lock) { - tap_code(KC_NUM_LOCK); - } - register_code(KC_LEFT_ALT); - wait_ms(UNICODE_TYPE_DELAY); - tap_code(KC_KP_PLUS); - break; - case UC_WINC: - tap_code(UNICODE_KEY_WINC); - tap_code(KC_U); - break; - case UC_EMACS: - // The usual way to type unicode in emacs is C-x-8 <RET> then the unicode number in hex - tap_code16(LCTL(KC_X)); - tap_code16(KC_8); - tap_code16(KC_ENTER); - break; - } - - wait_ms(UNICODE_TYPE_DELAY); -} - -__attribute__((weak)) void unicode_input_finish(void) { - switch (unicode_config.input_mode) { - case UC_MAC: - unregister_code(UNICODE_KEY_MAC); - break; - case UC_LNX: - tap_code(KC_SPACE); - if (unicode_saved_caps_lock) { - tap_code(KC_CAPS_LOCK); - } - break; - case UC_WIN: - unregister_code(KC_LEFT_ALT); - if (!unicode_saved_num_lock) { - tap_code(KC_NUM_LOCK); - } - break; - case UC_WINC: - tap_code(KC_ENTER); - break; - case UC_EMACS: - tap_code16(KC_ENTER); - break; - } - - set_mods(unicode_saved_mods); // Reregister previously set mods -} - -__attribute__((weak)) void unicode_input_cancel(void) { - switch (unicode_config.input_mode) { - case UC_MAC: - unregister_code(UNICODE_KEY_MAC); - break; - case UC_LNX: - tap_code(KC_ESCAPE); - if (unicode_saved_caps_lock) { - tap_code(KC_CAPS_LOCK); - } - break; - case UC_WINC: - tap_code(KC_ESCAPE); - break; - case UC_WIN: - unregister_code(KC_LEFT_ALT); - if (!unicode_saved_num_lock) { - tap_code(KC_NUM_LOCK); - } - break; - case UC_EMACS: - tap_code16(LCTL(KC_G)); // C-g cancels - break; - } - - set_mods(unicode_saved_mods); // Reregister previously set mods -} - -// clang-format off - -static void send_nibble_wrapper(uint8_t digit) { - if (unicode_config.input_mode == UC_WIN) { - uint8_t kc = digit < 10 - ? KC_KP_1 + (10 + digit - 1) % 10 - : KC_A + (digit - 10); - tap_code(kc); - return; - } - send_nibble(digit); -} - -// clang-format on - -void register_hex(uint16_t hex) { - for (int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i * 4)) & 0xF); - send_nibble_wrapper(digit); - } -} - -void register_hex32(uint32_t hex) { - bool onzerostart = true; - for (int i = 7; i >= 0; i--) { - if (i <= 3) { - onzerostart = false; - } - uint8_t digit = ((hex >> (i * 4)) & 0xF); - if (digit == 0) { - if (!onzerostart) { - send_nibble_wrapper(digit); - } - } else { - send_nibble_wrapper(digit); - onzerostart = false; - } - } -} - -void register_unicode(uint32_t code_point) { - if (code_point > 0x10FFFF || (code_point > 0xFFFF && unicode_config.input_mode == UC_WIN)) { - // Code point out of range, do nothing - return; - } - - unicode_input_start(); - if (code_point > 0xFFFF && unicode_config.input_mode == UC_MAC) { - // Convert code point to UTF-16 surrogate pair on macOS - code_point -= 0x10000; - uint32_t lo = code_point & 0x3FF, hi = (code_point & 0xFFC00) >> 10; - register_hex32(hi + 0xD800); - register_hex32(lo + 0xDC00); - } else { - register_hex32(code_point); - } - unicode_input_finish(); -} - -void send_unicode_string(const char *str) { - if (!str) { - return; - } - - while (*str) { - int32_t code_point = 0; - str = decode_utf8(str, &code_point); - - if (code_point >= 0) { - register_unicode(code_point); - } - } -} - -// clang-format off - -static void audio_helper(void) { -#ifdef AUDIO_ENABLE - switch (get_unicode_input_mode()) { -# ifdef UNICODE_SONG_MAC - static float song_mac[][2] = UNICODE_SONG_MAC; - case UC_MAC: - PLAY_SONG(song_mac); - break; -# endif -# ifdef UNICODE_SONG_LNX - static float song_lnx[][2] = UNICODE_SONG_LNX; - case UC_LNX: - PLAY_SONG(song_lnx); - break; -# endif -# ifdef UNICODE_SONG_WIN - static float song_win[][2] = UNICODE_SONG_WIN; - case UC_WIN: - PLAY_SONG(song_win); - break; -# endif -# ifdef UNICODE_SONG_BSD - static float song_bsd[][2] = UNICODE_SONG_BSD; - case UC_BSD: - PLAY_SONG(song_bsd); - break; -# endif -# ifdef UNICODE_SONG_WINC - static float song_winc[][2] = UNICODE_SONG_WINC; - case UC_WINC: - PLAY_SONG(song_winc); - break; -# endif - } +#if defined(UNICODE_ENABLE) +# include "process_unicode.h" +#elif defined(UNICODEMAP_ENABLE) +# include "process_unicodemap.h" +#elif defined(UCIS_ENABLE) +# include "process_ucis.h" #endif -} - -// clang-format on bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { @@ -305,35 +33,27 @@ bool process_unicode_common(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case UNICODE_MODE_FORWARD: cycle_unicode_input_mode(shifted ? -1 : +1); - audio_helper(); break; case UNICODE_MODE_REVERSE: cycle_unicode_input_mode(shifted ? +1 : -1); - audio_helper(); break; case UNICODE_MODE_MAC: set_unicode_input_mode(UC_MAC); - audio_helper(); break; case UNICODE_MODE_LNX: set_unicode_input_mode(UC_LNX); - audio_helper(); break; case UNICODE_MODE_WIN: set_unicode_input_mode(UC_WIN); - audio_helper(); break; case UNICODE_MODE_BSD: set_unicode_input_mode(UC_BSD); - audio_helper(); break; case UNICODE_MODE_WINC: set_unicode_input_mode(UC_WINC); - audio_helper(); break; case UNICODE_MODE_EMACS: set_unicode_input_mode(UC_EMACS); - audio_helper(); break; } } diff --git a/quantum/process_keycode/process_unicode_common.h b/quantum/process_keycode/process_unicode_common.h index 15e798dbb3..fd09a41818 100644 --- a/quantum/process_keycode/process_unicode_common.h +++ b/quantum/process_keycode/process_unicode_common.h @@ -16,187 +16,9 @@ #pragma once -#include "quantum.h" +#include <stdbool.h> +#include <stdint.h> -#if defined(UNICODE_ENABLE) + defined(UNICODEMAP_ENABLE) + defined(UCIS_ENABLE) > 1 -# error "Cannot enable more than one Unicode method (UNICODE, UNICODEMAP, UCIS) at the same time" -#endif - -// Keycodes used for starting Unicode input on different platforms -#ifndef UNICODE_KEY_MAC -# define UNICODE_KEY_MAC KC_LEFT_ALT -#endif -#ifndef UNICODE_KEY_LNX -# define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) -#endif -#ifndef UNICODE_KEY_WINC -# define UNICODE_KEY_WINC KC_RIGHT_ALT -#endif - -// Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) -// Example: #define UNICODE_SELECTED_MODES UC_WINC, UC_LNX -#ifndef UNICODE_SELECTED_MODES -# define UNICODE_SELECTED_MODES -1 -#endif - -// Whether input mode changes in cycle should be written to EEPROM -#ifndef UNICODE_CYCLE_PERSIST -# define UNICODE_CYCLE_PERSIST true -#endif - -// Delay between starting Unicode input and sending a sequence, in ms -#ifndef UNICODE_TYPE_DELAY -# define UNICODE_TYPE_DELAY 10 -#endif - -// Deprecated aliases -#if !defined(UNICODE_KEY_MAC) && defined(UNICODE_KEY_OSX) -# define UNICODE_KEY_MAC UNICODE_KEY_OSX -#endif -#if !defined(UNICODE_SONG_MAC) && defined(UNICODE_SONG_OSX) -# define UNICODE_SONG_MAC UNICODE_SONG_OSX -#endif -#define UC_OSX UC_MAC - -enum unicode_input_modes { - UC_MAC, // macOS using Unicode Hex Input - UC_LNX, // Linux using IBus - UC_WIN, // Windows using EnableHexNumpad - UC_BSD, // BSD (not implemented) - UC_WINC, // Windows using WinCompose (https://github.com/samhocevar/wincompose) - UC_EMACS, // Emacs is an operating system in search of a good text editor - UC__COUNT // Number of available input modes (always leave at the end) -}; - -typedef union { - uint32_t raw; - struct { - uint8_t input_mode : 8; - }; -} unicode_config_t; - -extern unicode_config_t unicode_config; - -void unicode_input_mode_init(void); -uint8_t get_unicode_input_mode(void); -void set_unicode_input_mode(uint8_t mode); -void cycle_unicode_input_mode(int8_t offset); -void persist_unicode_input_mode(void); - -void unicode_input_start(void); -void unicode_input_finish(void); -void unicode_input_cancel(void); - -void register_hex(uint16_t hex); -void register_hex32(uint32_t hex); -void register_unicode(uint32_t code_point); - -void send_unicode_string(const char *str); +#include "action.h" bool process_unicode_common(uint16_t keycode, keyrecord_t *record); - -#define UC_BSPC UC(0x0008) -#define UC_SPC UC(0x0020) - -#define UC_EXLM UC(0x0021) -#define UC_DQUT UC(0x0022) -#define UC_HASH UC(0x0023) -#define UC_DLR UC(0x0024) -#define UC_PERC UC(0x0025) -#define UC_AMPR UC(0x0026) -#define UC_QUOT UC(0x0027) -#define UC_LPRN UC(0x0028) -#define UC_RPRN UC(0x0029) -#define UC_ASTR UC(0x002A) -#define UC_PLUS UC(0x002B) -#define UC_COMM UC(0x002C) -#define UC_DASH UC(0x002D) -#define UC_DOT UC(0x002E) -#define UC_SLSH UC(0x002F) - -#define UC_0 UC(0x0030) -#define UC_1 UC(0x0031) -#define UC_2 UC(0x0032) -#define UC_3 UC(0x0033) -#define UC_4 UC(0x0034) -#define UC_5 UC(0x0035) -#define UC_6 UC(0x0036) -#define UC_7 UC(0x0037) -#define UC_8 UC(0x0038) -#define UC_9 UC(0x0039) - -#define UC_COLN UC(0x003A) -#define UC_SCLN UC(0x003B) -#define UC_LT UC(0x003C) -#define UC_EQL UC(0x003D) -#define UC_GT UC(0x003E) -#define UC_QUES UC(0x003F) -#define UC_AT UC(0x0040) - -#define UC_A UC(0x0041) -#define UC_B UC(0x0042) -#define UC_C UC(0x0043) -#define UC_D UC(0x0044) -#define UC_E UC(0x0045) -#define UC_F UC(0x0046) -#define UC_G UC(0x0047) -#define UC_H UC(0x0048) -#define UC_I UC(0x0049) -#define UC_J UC(0x004A) -#define UC_K UC(0x004B) -#define UC_L UC(0x004C) -#define UC_M UC(0x004D) -#define UC_N UC(0x004E) -#define UC_O UC(0x004F) -#define UC_P UC(0x0050) -#define UC_Q UC(0x0051) -#define UC_R UC(0x0052) -#define UC_S UC(0x0053) -#define UC_T UC(0x0054) -#define UC_U UC(0x0055) -#define UC_V UC(0x0056) -#define UC_W UC(0x0057) -#define UC_X UC(0x0058) -#define UC_Y UC(0x0059) -#define UC_Z UC(0x005A) - -#define UC_LBRC UC(0x005B) -#define UC_BSLS UC(0x005C) -#define UC_RBRC UC(0x005D) -#define UC_CIRM UC(0x005E) -#define UC_UNDR UC(0x005F) - -#define UC_GRV UC(0x0060) - -#define UC_a UC(0x0061) -#define UC_b UC(0x0062) -#define UC_c UC(0x0063) -#define UC_d UC(0x0064) -#define UC_e UC(0x0065) -#define UC_f UC(0x0066) -#define UC_g UC(0x0067) -#define UC_h UC(0x0068) -#define UC_i UC(0x0069) -#define UC_j UC(0x006A) -#define UC_k UC(0x006B) -#define UC_l UC(0x006C) -#define UC_m UC(0x006D) -#define UC_n UC(0x006E) -#define UC_o UC(0x006F) -#define UC_p UC(0x0070) -#define UC_q UC(0x0071) -#define UC_r UC(0x0072) -#define UC_s UC(0x0073) -#define UC_t UC(0x0074) -#define UC_u UC(0x0075) -#define UC_v UC(0x0076) -#define UC_w UC(0x0077) -#define UC_x UC(0x0078) -#define UC_y UC(0x0079) -#define UC_z UC(0x007A) - -#define UC_LCBR UC(0x007B) -#define UC_PIPE UC(0x007C) -#define UC_RCBR UC(0x007D) -#define UC_TILD UC(0x007E) -#define UC_DEL UC(0x007F) diff --git a/quantum/process_keycode/process_unicodemap.c b/quantum/process_keycode/process_unicodemap.c index 459397014d..979d773b05 100644 --- a/quantum/process_keycode/process_unicodemap.c +++ b/quantum/process_keycode/process_unicodemap.c @@ -15,6 +15,11 @@ */ #include "process_unicodemap.h" +#include "unicode.h" +#include "quantum_keycodes.h" +#include "keycode.h" +#include "action_util.h" +#include "host.h" __attribute__((weak)) uint16_t unicodemap_index(uint16_t keycode) { if (keycode >= QK_UNICODEMAP_PAIR) { diff --git a/quantum/process_keycode/process_unicodemap.h b/quantum/process_keycode/process_unicodemap.h index c429859bbb..73f5449864 100644 --- a/quantum/process_keycode/process_unicodemap.h +++ b/quantum/process_keycode/process_unicodemap.h @@ -16,7 +16,11 @@ #pragma once -#include "process_unicode_common.h" +#include <stdbool.h> +#include <stdint.h> + +#include "action.h" +#include "progmem.h" extern const uint32_t PROGMEM unicode_map[]; diff --git a/quantum/quantum.c b/quantum/quantum.c index 9a0016b150..acafd8025c 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -361,8 +361,10 @@ bool process_record_quantum(keyrecord_t *record) { #endif return false; case QK_CLEAR_EEPROM: +#ifdef NO_RESET eeconfig_init(); -#ifndef NO_RESET +#else + eeconfig_disable(); soft_reset_keyboard(); #endif return false; diff --git a/quantum/quantum.h b/quantum/quantum.h index 8d74f2be38..51360c3d2a 100644 --- a/quantum/quantum.h +++ b/quantum/quantum.h @@ -109,6 +109,7 @@ extern layer_state_t layer_state; #endif #ifdef UNICODE_COMMON_ENABLE +# include "unicode.h" # include "process_unicode_common.h" #endif diff --git a/quantum/quantum_keycodes_legacy.h b/quantum/quantum_keycodes_legacy.h index 51380d9c50..1de81b4c0f 100644 --- a/quantum/quantum_keycodes_legacy.h +++ b/quantum/quantum_keycodes_legacy.h @@ -4,7 +4,6 @@ // Deprecated Quantum keycodes -#define RESET QK_BOOTLOADER #define DEBUG QK_DEBUG_TOGGLE #define GRAVE_ESC QK_GRAVE_ESCAPE #define EEPROM_RESET QK_CLEAR_EEPROM @@ -13,4 +12,5 @@ #define EEP_RST QK_CLEAR_EEPROM #define TERM_ON _Static_assert(false, "The Terminal feature has been removed from QMK. Please remove use of TERM_ON/TERM_OFF from your keymap.") -#define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.")
\ No newline at end of file +#define TERM_OFF _Static_assert(false, "The Terminal feature has been removed from QMK.. Please remove use of TERM_ON/TERM_OFF from your keymap.") +// #define RESET _Static_assert(false, "The RESET keycode has been removed from QMK.. Please remove use from your keymap.") diff --git a/quantum/rgb_matrix/rgb_matrix_drivers.c b/quantum/rgb_matrix/rgb_matrix_drivers.c index 27fa7369bf..99151e5a92 100644 --- a/quantum/rgb_matrix/rgb_matrix_drivers.c +++ b/quantum/rgb_matrix/rgb_matrix_drivers.c @@ -369,7 +369,7 @@ static inline void setled(int i, uint8_t r, uint8_t g, uint8_t b) { } static void setled_all(uint8_t r, uint8_t g, uint8_t b) { - for (int i = 0; i < sizeof(rgb_matrix_ws2812_array) / sizeof(rgb_matrix_ws2812_array[0]); i++) { + for (int i = 0; i < ARRAY_SIZE(rgb_matrix_ws2812_array); i++) { setled(i, r, g, b); } } diff --git a/quantum/secure.c b/quantum/secure.c index f07f6af2cb..f2a567f31d 100644 --- a/quantum/secure.c +++ b/quantum/secure.c @@ -3,6 +3,7 @@ #include "secure.h" #include "timer.h" +#include "util.h" #ifndef SECURE_UNLOCK_TIMEOUT # define SECURE_UNLOCK_TIMEOUT 5000 @@ -59,7 +60,7 @@ void secure_activity_event(void) { void secure_keypress_event(uint8_t row, uint8_t col) { static const uint8_t sequence[][2] = SECURE_UNLOCK_SEQUENCE; - static const uint8_t sequence_len = sizeof(sequence) / sizeof(sequence[0]); + static const uint8_t sequence_len = ARRAY_SIZE(sequence); static uint8_t offset = 0; if ((sequence[offset][0] == row) && (sequence[offset][1] == col)) { diff --git a/quantum/unicode/unicode.c b/quantum/unicode/unicode.c new file mode 100644 index 0000000000..f9f429e7af --- /dev/null +++ b/quantum/unicode/unicode.c @@ -0,0 +1,376 @@ +/* Copyright 2022 + * + * 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 "unicode.h" + +#include "eeprom.h" +#include "eeconfig.h" +#include "action.h" +#include "action_util.h" +#include "host.h" +#include "keycode.h" +#include "wait.h" +#include "audio.h" +#include "send_string.h" +#include "utf8.h" + +#if defined(UNICODE_ENABLE) + defined(UNICODEMAP_ENABLE) + defined(UCIS_ENABLE) > 1 +# error "Cannot enable more than one Unicode method (UNICODE, UNICODEMAP, UCIS) at the same time" +#endif + +// Keycodes used for starting Unicode input on different platforms +#ifndef UNICODE_KEY_MAC +# define UNICODE_KEY_MAC KC_LEFT_ALT +#endif +#ifndef UNICODE_KEY_LNX +# define UNICODE_KEY_LNX LCTL(LSFT(KC_U)) +#endif +#ifndef UNICODE_KEY_WINC +# define UNICODE_KEY_WINC KC_RIGHT_ALT +#endif + +// Comma-delimited, ordered list of input modes selected for use (e.g. in cycle) +// Example: #define UNICODE_SELECTED_MODES UC_WINC, UC_LNX +#ifndef UNICODE_SELECTED_MODES +# define UNICODE_SELECTED_MODES -1 +#endif + +// Whether input mode changes in cycle should be written to EEPROM +#ifndef UNICODE_CYCLE_PERSIST +# define UNICODE_CYCLE_PERSIST true +#endif + +// Delay between starting Unicode input and sending a sequence, in ms +#ifndef UNICODE_TYPE_DELAY +# define UNICODE_TYPE_DELAY 10 +#endif + +unicode_config_t unicode_config; +uint8_t unicode_saved_mods; +led_t unicode_saved_led_state; + +#if UNICODE_SELECTED_MODES != -1 +static uint8_t selected[] = {UNICODE_SELECTED_MODES}; +static int8_t selected_count = ARRAY_SIZE(selected); +static int8_t selected_index; +#endif + +/** \brief unicode input mode set at user level + * + * Run user code on unicode input mode change + */ +__attribute__((weak)) void unicode_input_mode_set_user(uint8_t input_mode) {} + +/** \brief unicode input mode set at keyboard level + * + * Run keyboard code on unicode input mode change + */ +__attribute__((weak)) void unicode_input_mode_set_kb(uint8_t input_mode) { + unicode_input_mode_set_user(input_mode); +} + +#ifdef AUDIO_ENABLE +# ifdef UNICODE_SONG_MAC +static float song_mac[][2] = UNICODE_SONG_MAC; +# endif +# ifdef UNICODE_SONG_LNX +static float song_lnx[][2] = UNICODE_SONG_LNX; +# endif +# ifdef UNICODE_SONG_WIN +static float song_win[][2] = UNICODE_SONG_WIN; +# endif +# ifdef UNICODE_SONG_BSD +static float song_bsd[][2] = UNICODE_SONG_BSD; +# endif +# ifdef UNICODE_SONG_WINC +static float song_winc[][2] = UNICODE_SONG_WINC; +# endif +# ifdef UNICODE_SONG_EMACS +static float song_emacs[][2] = UNICODE_SONG_EMACS; +# endif + +static void unicode_play_song(uint8_t mode) { + switch (mode) { +# ifdef UNICODE_SONG_MAC + case UC_MAC: + PLAY_SONG(song_mac); + break; +# endif +# ifdef UNICODE_SONG_LNX + case UC_LNX: + PLAY_SONG(song_lnx); + break; +# endif +# ifdef UNICODE_SONG_WIN + case UC_WIN: + PLAY_SONG(song_win); + break; +# endif +# ifdef UNICODE_SONG_BSD + case UC_BSD: + PLAY_SONG(song_bsd); + break; +# endif +# ifdef UNICODE_SONG_WINC + case UC_WINC: + PLAY_SONG(song_winc); + break; +# endif +# ifdef UNICODE_SONG_EMACS + case UC_EMACS: + PLAY_SONG(song_emacs); + break; +# endif + } +} +#endif + +void unicode_input_mode_init(void) { + unicode_config.raw = eeprom_read_byte(EECONFIG_UNICODEMODE); +#if UNICODE_SELECTED_MODES != -1 +# if UNICODE_CYCLE_PERSIST + // Find input_mode in selected modes + int8_t i; + for (i = 0; i < selected_count; i++) { + if (selected[i] == unicode_config.input_mode) { + selected_index = i; + break; + } + } + if (i == selected_count) { + // Not found: input_mode isn't selected, change to one that is + unicode_config.input_mode = selected[selected_index = 0]; + } +# else + // Always change to the first selected input mode + unicode_config.input_mode = selected[selected_index = 0]; +# endif +#endif + unicode_input_mode_set_kb(unicode_config.input_mode); + dprintf("Unicode input mode init to: %u\n", unicode_config.input_mode); +} + +uint8_t get_unicode_input_mode(void) { + return unicode_config.input_mode; +} + +void set_unicode_input_mode(uint8_t mode) { + unicode_config.input_mode = mode; + persist_unicode_input_mode(); +#ifdef AUDIO_ENABLE + unicode_play_song(mode); +#endif + unicode_input_mode_set_kb(mode); + dprintf("Unicode input mode set to: %u\n", unicode_config.input_mode); +} + +void cycle_unicode_input_mode(int8_t offset) { +#if UNICODE_SELECTED_MODES != -1 + selected_index = (selected_index + offset) % selected_count; + if (selected_index < 0) { + selected_index += selected_count; + } + unicode_config.input_mode = selected[selected_index]; +# if UNICODE_CYCLE_PERSIST + persist_unicode_input_mode(); +# endif +# ifdef AUDIO_ENABLE + unicode_play_song(unicode_config.input_mode); +# endif + unicode_input_mode_set_kb(unicode_config.input_mode); + dprintf("Unicode input mode cycle to: %u\n", unicode_config.input_mode); +#endif +} + +void persist_unicode_input_mode(void) { + eeprom_update_byte(EECONFIG_UNICODEMODE, unicode_config.input_mode); +} + +__attribute__((weak)) void unicode_input_start(void) { + unicode_saved_led_state = host_keyboard_led_state(); + + // Note the order matters here! + // Need to do this before we mess around with the mods, or else + // UNICODE_KEY_LNX (which is usually Ctrl-Shift-U) might not work + // correctly in the shifted case. + if (unicode_config.input_mode == UC_LNX && unicode_saved_led_state.caps_lock) { + tap_code(KC_CAPS_LOCK); + } + + unicode_saved_mods = get_mods(); // Save current mods + clear_mods(); // Unregister mods to start from a clean state + clear_weak_mods(); + + switch (unicode_config.input_mode) { + case UC_MAC: + register_code(UNICODE_KEY_MAC); + break; + case UC_LNX: + tap_code16(UNICODE_KEY_LNX); + break; + case UC_WIN: + // For increased reliability, use numpad keys for inputting digits + if (!unicode_saved_led_state.num_lock) { + tap_code(KC_NUM_LOCK); + } + register_code(KC_LEFT_ALT); + wait_ms(UNICODE_TYPE_DELAY); + tap_code(KC_KP_PLUS); + break; + case UC_WINC: + tap_code(UNICODE_KEY_WINC); + tap_code(KC_U); + break; + case UC_EMACS: + // The usual way to type unicode in emacs is C-x-8 <RET> then the unicode number in hex + tap_code16(LCTL(KC_X)); + tap_code16(KC_8); + tap_code16(KC_ENTER); + break; + } + + wait_ms(UNICODE_TYPE_DELAY); +} + +__attribute__((weak)) void unicode_input_finish(void) { + switch (unicode_config.input_mode) { + case UC_MAC: + unregister_code(UNICODE_KEY_MAC); + break; + case UC_LNX: + tap_code(KC_SPACE); + if (unicode_saved_led_state.caps_lock) { + tap_code(KC_CAPS_LOCK); + } + break; + case UC_WIN: + unregister_code(KC_LEFT_ALT); + if (!unicode_saved_led_state.num_lock) { + tap_code(KC_NUM_LOCK); + } + break; + case UC_WINC: + tap_code(KC_ENTER); + break; + case UC_EMACS: + tap_code16(KC_ENTER); + break; + } + + set_mods(unicode_saved_mods); // Reregister previously set mods +} + +__attribute__((weak)) void unicode_input_cancel(void) { + switch (unicode_config.input_mode) { + case UC_MAC: + unregister_code(UNICODE_KEY_MAC); + break; + case UC_LNX: + tap_code(KC_ESCAPE); + if (unicode_saved_led_state.caps_lock) { + tap_code(KC_CAPS_LOCK); + } + break; + case UC_WINC: + tap_code(KC_ESCAPE); + break; + case UC_WIN: + unregister_code(KC_LEFT_ALT); + if (!unicode_saved_led_state.num_lock) { + tap_code(KC_NUM_LOCK); + } + break; + case UC_EMACS: + tap_code16(LCTL(KC_G)); // C-g cancels + break; + } + + set_mods(unicode_saved_mods); // Reregister previously set mods +} + +// clang-format off + +static void send_nibble_wrapper(uint8_t digit) { + if (unicode_config.input_mode == UC_WIN) { + uint8_t kc = digit < 10 + ? KC_KP_1 + (10 + digit - 1) % 10 + : KC_A + (digit - 10); + tap_code(kc); + return; + } + send_nibble(digit); +} + +// clang-format on + +void register_hex(uint16_t hex) { + for (int i = 3; i >= 0; i--) { + uint8_t digit = ((hex >> (i * 4)) & 0xF); + send_nibble_wrapper(digit); + } +} + +void register_hex32(uint32_t hex) { + bool onzerostart = true; + for (int i = 7; i >= 0; i--) { + if (i <= 3) { + onzerostart = false; + } + uint8_t digit = ((hex >> (i * 4)) & 0xF); + if (digit == 0) { + if (!onzerostart) { + send_nibble_wrapper(digit); + } + } else { + send_nibble_wrapper(digit); + onzerostart = false; + } + } +} + +void register_unicode(uint32_t code_point) { + if (code_point > 0x10FFFF || (code_point > 0xFFFF && unicode_config.input_mode == UC_WIN)) { + // Code point out of range, do nothing + return; + } + + unicode_input_start(); + if (code_point > 0xFFFF && unicode_config.input_mode == UC_MAC) { + // Convert code point to UTF-16 surrogate pair on macOS + code_point -= 0x10000; + uint32_t lo = code_point & 0x3FF, hi = (code_point & 0xFFC00) >> 10; + register_hex32(hi + 0xD800); + register_hex32(lo + 0xDC00); + } else { + register_hex32(code_point); + } + unicode_input_finish(); +} + +void send_unicode_string(const char *str) { + if (!str) { + return; + } + + while (*str) { + int32_t code_point = 0; + str = decode_utf8(str, &code_point); + + if (code_point >= 0) { + register_unicode(code_point); + } + } +} diff --git a/quantum/unicode/unicode.h b/quantum/unicode/unicode.h new file mode 100644 index 0000000000..b3e43799ff --- /dev/null +++ b/quantum/unicode/unicode.h @@ -0,0 +1,165 @@ +/* Copyright 2022 + * + * 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 <stdint.h> + +#include "quantum.h" + +typedef union { + uint32_t raw; + struct { + uint8_t input_mode : 8; + }; +} unicode_config_t; + +extern unicode_config_t unicode_config; + +enum unicode_input_modes { + UC_MAC, // macOS using Unicode Hex Input + UC_LNX, // Linux using IBus + UC_WIN, // Windows using EnableHexNumpad + UC_BSD, // BSD (not implemented) + UC_WINC, // Windows using WinCompose (https://github.com/samhocevar/wincompose) + UC_EMACS, // Emacs is an operating system in search of a good text editor + UC__COUNT // Number of available input modes (always leave at the end) +}; + +void unicode_input_mode_init(void); +uint8_t get_unicode_input_mode(void); +void set_unicode_input_mode(uint8_t mode); +void cycle_unicode_input_mode(int8_t offset); +void persist_unicode_input_mode(void); + +void unicode_input_mode_set_user(uint8_t input_mode); +void unicode_input_mode_set_kb(uint8_t input_mode); + +void unicode_input_start(void); +void unicode_input_finish(void); +void unicode_input_cancel(void); + +void register_hex(uint16_t hex); +void register_hex32(uint32_t hex); +void register_unicode(uint32_t code_point); + +void send_unicode_string(const char *str); + +// clang-format off + +#define UC_BSPC UC(0x0008) // (backspace) + +#define UC_SPC UC(0x0020) // (space) +#define UC_EXLM UC(0x0021) // ! +#define UC_DQUT UC(0x0022) // " +#define UC_HASH UC(0x0023) // # +#define UC_DLR UC(0x0024) // $ +#define UC_PERC UC(0x0025) // % +#define UC_AMPR UC(0x0026) // & +#define UC_QUOT UC(0x0027) // ' +#define UC_LPRN UC(0x0028) // ( +#define UC_RPRN UC(0x0029) // ) +#define UC_ASTR UC(0x002A) // * +#define UC_PLUS UC(0x002B) // + +#define UC_COMM UC(0x002C) // , +#define UC_DASH UC(0x002D) // - +#define UC_DOT UC(0x002E) // . +#define UC_SLSH UC(0x002F) // / + +#define UC_0 UC(0x0030) // 0 +#define UC_1 UC(0x0031) // 1 +#define UC_2 UC(0x0032) // 2 +#define UC_3 UC(0x0033) // 3 +#define UC_4 UC(0x0034) // 4 +#define UC_5 UC(0x0035) // 5 +#define UC_6 UC(0x0036) // 6 +#define UC_7 UC(0x0037) // 7 +#define UC_8 UC(0x0038) // 8 +#define UC_9 UC(0x0039) // 9 +#define UC_COLN UC(0x003A) // : +#define UC_SCLN UC(0x003B) // ; +#define UC_LT UC(0x003C) // < +#define UC_EQL UC(0x003D) // = +#define UC_GT UC(0x003E) // > +#define UC_QUES UC(0x003F) // ? + +#define UC_AT UC(0x0040) // @ +#define UC_A UC(0x0041) // A +#define UC_B UC(0x0042) // B +#define UC_C UC(0x0043) // C +#define UC_D UC(0x0044) // D +#define UC_E UC(0x0045) // E +#define UC_F UC(0x0046) // F +#define UC_G UC(0x0047) // G +#define UC_H UC(0x0048) // H +#define UC_I UC(0x0049) // I +#define UC_J UC(0x004A) // J +#define UC_K UC(0x004B) // K +#define UC_L UC(0x004C) // L +#define UC_M UC(0x004D) // M +#define UC_N UC(0x004E) // N +#define UC_O UC(0x004F) // O + +#define UC_P UC(0x0050) // P +#define UC_Q UC(0x0051) // Q +#define UC_R UC(0x0052) // R +#define UC_S UC(0x0053) // S +#define UC_T UC(0x0054) // T +#define UC_U UC(0x0055) // U +#define UC_V UC(0x0056) // V +#define UC_W UC(0x0057) // W +#define UC_X UC(0x0058) // X +#define UC_Y UC(0x0059) // Y +#define UC_Z UC(0x005A) // Z +#define UC_LBRC UC(0x005B) // [ +#define UC_BSLS UC(0x005C) // (backslash) +#define UC_RBRC UC(0x005D) // ] +#define UC_CIRM UC(0x005E) // ^ +#define UC_UNDR UC(0x005F) // _ + +#define UC_GRV UC(0x0060) // ` +#define UC_a UC(0x0061) // a +#define UC_b UC(0x0062) // b +#define UC_c UC(0x0063) // c +#define UC_d UC(0x0064) // d +#define UC_e UC(0x0065) // e +#define UC_f UC(0x0066) // f +#define UC_g UC(0x0067) // g +#define UC_h UC(0x0068) // h +#define UC_i UC(0x0069) // i +#define UC_j UC(0x006A) // j +#define UC_k UC(0x006B) // k +#define UC_l UC(0x006C) // l +#define UC_m UC(0x006D) // m +#define UC_n UC(0x006E) // n +#define UC_o UC(0x006F) // o + +#define UC_p UC(0x0070) // p +#define UC_q UC(0x0071) // q +#define UC_r UC(0x0072) // r +#define UC_s UC(0x0073) // s +#define UC_t UC(0x0074) // t +#define UC_u UC(0x0075) // u +#define UC_v UC(0x0076) // v +#define UC_w UC(0x0077) // w +#define UC_x UC(0x0078) // x +#define UC_y UC(0x0079) // y +#define UC_z UC(0x007A) // z +#define UC_LCBR UC(0x007B) // { +#define UC_PIPE UC(0x007C) // | +#define UC_RCBR UC(0x007D) // } +#define UC_TILD UC(0x007E) // ~ +#define UC_DEL UC(0x007F) // (delete) diff --git a/quantum/utf8.c b/quantum/unicode/utf8.c index 4b2cd4d8d4..4b2cd4d8d4 100644 --- a/quantum/utf8.c +++ b/quantum/unicode/utf8.c diff --git a/quantum/utf8.h b/quantum/unicode/utf8.h index fb10910944..521dd1918c 100644 --- a/quantum/utf8.h +++ b/quantum/unicode/utf8.h @@ -18,4 +18,4 @@ #include <stdint.h> -const char *decode_utf8(const char *str, int32_t *code_point);
\ No newline at end of file +const char *decode_utf8(const char *str, int32_t *code_point); diff --git a/quantum/util.h b/quantum/util.h index ab96ce4bde..9c034cc404 100644 --- a/quantum/util.h +++ b/quantum/util.h @@ -1,26 +1,11 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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/>. -*/ +// Copyright 2022 Stefan Kerkmann (KarlK90) +// Copyright 2011 Jun Wako <wakojun@gmail.com> +// SPDX-License-Identifier: GPL-2.0-or-later + #pragma once #include "bitwise.h" -// convert to L string -#define LSTR(s) XLSTR(s) -#define XLSTR(s) L## #s // convert to string #define STR(s) XSTR(s) #define XSTR(s) #s @@ -32,3 +17,32 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #if !defined(MAX) # define MAX(x, y) (((x) > (y)) ? (x) : (y)) #endif + +#if !defined(CEILING) +/** + * @brief Computes the rounded up result of a division of two integers at + * compile time. + */ +# define CEILING(dividend, divisor) (((dividend) + (divisor)-1) / (divisor)) +#endif + +#if !defined(IS_ARRAY) +/** + * @brief Returns true if the value is an array, false if it's a pointer. + * + * This macro is ill-formed for scalars, which is OK for its intended use in + * ARRAY_SIZE. + */ +# define IS_ARRAY(value) (!__builtin_types_compatible_p(typeof((value)), typeof(&(value)[0]))) +#endif + +#if !defined(ARRAY_SIZE) +/** + * @brief Computes the number of elements of the given array at compile time. + * + * This Macro can only be used for statically allocated arrays that have not + * been decayed into a pointer. This is detected at compile time, though the + * error message for scalar values is poor. + */ +# define ARRAY_SIZE(array) (__builtin_choose_expr(IS_ARRAY((array)), sizeof((array)) / sizeof((array)[0]), (void)0)) +#endif @@ -1,3 +1,7 @@ +# THIS IS THE DEVELOP BRANCH + +Warning- This is the `develop` branch of QMK Firmware. You may encounter broken code here. Please see [Breaking Changes](https://docs.qmk.fm/#/breaking_changes) for more information. + # Quantum Mechanical Keyboard Firmware [![Current Version](https://img.shields.io/github/tag/qmk/qmk_firmware.svg)](https://github.com/qmk/qmk_firmware/tags) diff --git a/tests/test_common/test_driver.cpp b/tests/test_common/test_driver.cpp index 86644ab6bd..7ecd4931ed 100644 --- a/tests/test_common/test_driver.cpp +++ b/tests/test_common/test_driver.cpp @@ -31,7 +31,7 @@ uint8_t hex_digit_to_keycode(uint8_t digit) { } } // namespace -TestDriver::TestDriver() : m_driver{&TestDriver::keyboard_leds, &TestDriver::send_keyboard, &TestDriver::send_mouse, &TestDriver::send_system, &TestDriver::send_consumer} { +TestDriver::TestDriver() : m_driver{&TestDriver::keyboard_leds, &TestDriver::send_keyboard, &TestDriver::send_mouse, &TestDriver::send_extra} { host_set_driver(&m_driver); m_this = this; } @@ -53,12 +53,8 @@ void TestDriver::send_mouse(report_mouse_t* report) { m_this->send_mouse_mock(*report); } -void TestDriver::send_system(uint16_t data) { - m_this->send_system_mock(data); -} - -void TestDriver::send_consumer(uint16_t data) { - m_this->send_consumer(data); +void TestDriver::send_extra(uint8_t report_id, uint16_t data) { + m_this->send_extra_mock(report_id, data); } namespace internal { diff --git a/tests/test_common/test_driver.hpp b/tests/test_common/test_driver.hpp index b58cfd1ebc..666bfb1fba 100644 --- a/tests/test_common/test_driver.hpp +++ b/tests/test_common/test_driver.hpp @@ -32,15 +32,13 @@ class TestDriver { MOCK_METHOD1(send_keyboard_mock, void(report_keyboard_t&)); MOCK_METHOD1(send_mouse_mock, void(report_mouse_t&)); - MOCK_METHOD1(send_system_mock, void(uint16_t)); - MOCK_METHOD1(send_consumer_mock, void(uint16_t)); + MOCK_METHOD2(send_extra_mock, void(uint8_t, uint16_t)); private: static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t* report); static void send_mouse(report_mouse_t* report); - static void send_system(uint16_t data); - static void send_consumer(uint16_t data); + static void send_extra(uint8_t report_id, uint16_t data); host_driver_t m_driver; uint8_t m_leds = 0; static TestDriver* m_this; diff --git a/tmk_core/protocol/arm_atsam/main_arm_atsam.c b/tmk_core/protocol/arm_atsam/main_arm_atsam.c index 8ee9e042e7..0537e3937d 100644 --- a/tmk_core/protocol/arm_atsam/main_arm_atsam.c +++ b/tmk_core/protocol/arm_atsam/main_arm_atsam.c @@ -37,14 +37,13 @@ void main_subtasks(void); uint8_t keyboard_leds(void); void send_keyboard(report_keyboard_t *report); void send_mouse(report_mouse_t *report); -void send_system(uint16_t data); -void send_consumer(uint16_t data); +void send_extra(uint8_t report_id, uint16_t data); #ifdef DEFERRED_EXEC_ENABLE void deferred_exec_task(void); #endif // DEFERRED_EXEC_ENABLE -host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer}; +host_driver_t arm_atsam_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra}; uint8_t led_states; @@ -114,8 +113,8 @@ void send_mouse(report_mouse_t *report) { #endif // MOUSEKEY_ENABLE } -#ifdef EXTRAKEY_ENABLE void send_extra(uint8_t report_id, uint16_t data) { +#ifdef EXTRAKEY_ENABLE uint32_t irqflags; irqflags = __get_PRIMASK(); @@ -129,18 +128,6 @@ void send_extra(uint8_t report_id, uint16_t data) { __DMB(); __set_PRIMASK(irqflags); -} -#endif // EXTRAKEY_ENABLE - -void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif // EXTRAKEY_ENABLE -} - -void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_CONSUMER, data); #endif // EXTRAKEY_ENABLE } diff --git a/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c index 69b3ad574c..58fc4efd9c 100644 --- a/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c +++ b/tmk_core/protocol/arm_atsam/md_rgb_matrix_programs.c @@ -95,7 +95,7 @@ led_setup_t leds_rainbow_s[] = { void *led_setups[] = {leds_rainbow_s, leds_rainbow_ns, leds_teal_salmon, leds_yellow, leds_red, leds_green, leds_blue, leds_white, leds_white_with_red_stripe, leds_black_with_red_stripe, leds_off}; -const uint8_t led_setups_count = sizeof(led_setups) / sizeof(led_setups[0]); +const uint8_t led_setups_count = ARRAY_SIZE(led_setups); # endif // USE_MASSDROP_CONFIGURATOR #endif // RGB_MATRIX_ENABLE
\ No newline at end of file diff --git a/tmk_core/protocol/chibios/chibios.c b/tmk_core/protocol/chibios/chibios.c index c9a480c325..024160a925 100644 --- a/tmk_core/protocol/chibios/chibios.c +++ b/tmk_core/protocol/chibios/chibios.c @@ -58,13 +58,12 @@ uint8_t keyboard_leds(void); void send_keyboard(report_keyboard_t *report); void send_mouse(report_mouse_t *report); -void send_system(uint16_t data); -void send_consumer(uint16_t data); +void send_extra(uint8_t report_id, uint16_t data); void send_programmable_button(uint32_t data); void send_digitizer(report_digitizer_t *report); /* host struct */ -host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; +host_driver_t chibios_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra, send_programmable_button}; #ifdef VIRTSER_ENABLE void virtser_task(void); diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index eb9ef82554..222a867e3c 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c @@ -946,8 +946,8 @@ void shared_in_cb(USBDriver *usbp, usbep_t ep) { * --------------------------------------------------------- */ +void send_extra(uint8_t report_id, uint16_t data) { #ifdef EXTRAKEY_ENABLE -static void send_extra(uint8_t report_id, uint16_t data) { osalSysLock(); if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) { osalSysUnlock(); @@ -970,18 +970,6 @@ static void send_extra(uint8_t report_id, uint16_t data) { usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report_extra_t)); osalSysUnlock(); -} -#endif - -void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif -} - -void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_CONSUMER, data); #endif } diff --git a/tmk_core/protocol/host.c b/tmk_core/protocol/host.c index 3d8604d541..53854b94fb 100644 --- a/tmk_core/protocol/host.c +++ b/tmk_core/protocol/host.c @@ -24,6 +24,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "debug.h" #include "digitizer.h" +#ifdef BLUETOOTH_ENABLE +# include "outputselect.h" +# ifdef BLUETOOTH_BLUEFRUIT_LE +# include "bluefruit_le.h" +# elif BLUETOOTH_RN42 +# include "rn42.h" +# endif +#endif + #ifdef NKRO_ENABLE # include "keycode_config.h" extern keymap_config_t keymap_config; @@ -63,6 +72,17 @@ led_t host_keyboard_led_state(void) { /* send report */ void host_keyboard_send(report_keyboard_t *report) { +#ifdef BLUETOOTH_ENABLE + if (where_to_send() == OUTPUT_BLUETOOTH) { +# ifdef BLUETOOTH_BLUEFRUIT_LE + bluefruit_le_send_keys(report->mods, report->keys, sizeof(report->keys)); +# elif BLUETOOTH_RN42 + rn42_send_keyboard(report); +# endif + return; + } +#endif + if (!driver) return; #if defined(NKRO_ENABLE) && defined(NKRO_SHARED_EP) if (keyboard_protocol && keymap_config.nkro) { @@ -90,6 +110,18 @@ void host_keyboard_send(report_keyboard_t *report) { } void host_mouse_send(report_mouse_t *report) { +#ifdef BLUETOOTH_ENABLE + if (where_to_send() == OUTPUT_BLUETOOTH) { +# ifdef BLUETOOTH_BLUEFRUIT_LE + // FIXME: mouse buttons + bluefruit_le_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); +# elif BLUETOOTH_RN42 + rn42_send_mouse(report); +# endif + return; + } +#endif + if (!driver) return; #ifdef MOUSE_SHARED_EP report->report_id = REPORT_ID_MOUSE; @@ -107,15 +139,26 @@ void host_system_send(uint16_t report) { last_system_report = report; if (!driver) return; - (*driver->send_system)(report); + (*driver->send_extra)(REPORT_ID_SYSTEM, report); } void host_consumer_send(uint16_t report) { if (report == last_consumer_report) return; last_consumer_report = report; +#ifdef BLUETOOTH_ENABLE + if (where_to_send() == OUTPUT_BLUETOOTH) { +# ifdef BLUETOOTH_BLUEFRUIT_LE + bluefruit_le_send_consumer_key(report); +# elif BLUETOOTH_RN42 + rn42_send_consumer(report); +# endif + return; + } +#endif + if (!driver) return; - (*driver->send_consumer)(report); + (*driver->send_extra)(REPORT_ID_CONSUMER, report); } void host_digitizer_send(digitizer_t *digitizer) { diff --git a/tmk_core/protocol/host_driver.h b/tmk_core/protocol/host_driver.h index affd0dcb34..680d9727d3 100644 --- a/tmk_core/protocol/host_driver.h +++ b/tmk_core/protocol/host_driver.h @@ -27,9 +27,8 @@ typedef struct { uint8_t (*keyboard_leds)(void); void (*send_keyboard)(report_keyboard_t *); void (*send_mouse)(report_mouse_t *); - void (*send_system)(uint16_t); - void (*send_consumer)(uint16_t); + void (*send_extra)(uint8_t, uint16_t); void (*send_programmable_button)(uint32_t); } host_driver_t; -void send_digitizer(report_digitizer_t *report);
\ No newline at end of file +void send_digitizer(report_digitizer_t *report); diff --git a/tmk_core/protocol/lufa/lufa.c b/tmk_core/protocol/lufa/lufa.c index b4b03357a3..2a3f5fd883 100644 --- a/tmk_core/protocol/lufa/lufa.c +++ b/tmk_core/protocol/lufa/lufa.c @@ -65,15 +65,6 @@ extern keymap_config_t keymap_config; # include "audio.h" #endif -#ifdef BLUETOOTH_ENABLE -# include "outputselect.h" -# ifdef BLUETOOTH_BLUEFRUIT_LE -# include "bluefruit_le.h" -# elif BLUETOOTH_RN42 -# include "rn42.h" -# endif -#endif - #ifdef VIRTSER_ENABLE # include "virtser.h" #endif @@ -101,10 +92,9 @@ static report_keyboard_t keyboard_report_sent; static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); +static void send_extra(uint8_t report_id, uint16_t data); static void send_programmable_button(uint32_t data); -host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; +host_driver_t lufa_driver = {keyboard_leds, send_keyboard, send_mouse, send_extra, send_programmable_button}; #ifdef VIRTSER_ENABLE // clang-format off @@ -649,17 +639,6 @@ static uint8_t keyboard_leds(void) { static void send_keyboard(report_keyboard_t *report) { uint8_t timeout = 255; -#ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - bluefruit_le_send_keys(report->mods, report->keys, sizeof(report->keys)); -# elif BLUETOOTH_RN42 - rn42_send_keyboard(report); -# endif - return; - } -#endif - /* Select the Keyboard Report Endpoint */ uint8_t ep = KEYBOARD_IN_EPNUM; uint8_t size = KEYBOARD_REPORT_SIZE; @@ -696,18 +675,6 @@ static void send_mouse(report_mouse_t *report) { #ifdef MOUSE_ENABLE uint8_t timeout = 255; -# ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - // FIXME: mouse buttons - bluefruit_le_send_mouse_move(report->x, report->y, report->v, report->h, report->buttons); -# elif BLUETOOTH_RN42 - rn42_send_mouse(report); -# endif - return; - } -# endif - /* Select the Mouse Report Endpoint */ Endpoint_SelectEndpoint(MOUSE_IN_EPNUM); @@ -746,42 +713,11 @@ static void send_report(void *report, size_t size) { * * FIXME: Needs doc */ -#ifdef EXTRAKEY_ENABLE static void send_extra(uint8_t report_id, uint16_t data) { +#ifdef EXTRAKEY_ENABLE static report_extra_t r; r = (report_extra_t){.report_id = report_id, .usage = data}; send_report(&r, sizeof(r)); -} -#endif - -/** \brief Send System - * - * FIXME: Needs doc - */ -static void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif -} - -/** \brief Send Consumer - * - * FIXME: Needs doc - */ -static void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE -# ifdef BLUETOOTH_ENABLE - if (where_to_send() == OUTPUT_BLUETOOTH) { -# ifdef BLUETOOTH_BLUEFRUIT_LE - bluefruit_le_send_consumer_key(data); -# elif BLUETOOTH_RN42 - rn42_send_consumer(data); -# endif - return; - } -# endif - - send_extra(REPORT_ID_CONSUMER, data); #endif } @@ -1028,10 +964,6 @@ void protocol_pre_init(void) { setup_usb(); sei(); -#if defined(BLUETOOTH_RN42) - rn42_init(); -#endif - /* wait for USB startup & debug output */ #ifdef WAIT_FOR_USB @@ -1083,10 +1015,6 @@ void protocol_post_task(void) { MIDI_Device_USBTask(&USB_MIDI_Interface); #endif -#ifdef BLUETOOTH_BLUEFRUIT_LE - bluefruit_le_task(); -#endif - #ifdef VIRTSER_ENABLE virtser_task(); CDC_Device_USBTask(&cdc_device); diff --git a/tmk_core/protocol/usb_descriptor.c b/tmk_core/protocol/usb_descriptor.c index 21795cef60..7117d2fc11 100644 --- a/tmk_core/protocol/usb_descriptor.c +++ b/tmk_core/protocol/usb_descriptor.c @@ -1046,7 +1046,7 @@ const USB_Descriptor_Configuration_t PROGMEM ConfigurationDescriptor = { */ const USB_Descriptor_String_t PROGMEM LanguageString = { .Header = { - .Size = USB_STRING_LEN(1), + .Size = 4, .Type = DTYPE_String }, .UnicodeString = {LANGUAGE_ID_ENG} @@ -1054,24 +1054,24 @@ const USB_Descriptor_String_t PROGMEM LanguageString = { const USB_Descriptor_String_t PROGMEM ManufacturerString = { .Header = { - .Size = USB_STRING_LEN(sizeof(STR(MANUFACTURER)) - 1), // Subtract 1 for null terminator + .Size = sizeof(USBSTR(MANUFACTURER)), .Type = DTYPE_String }, - .UnicodeString = LSTR(MANUFACTURER) + .UnicodeString = USBSTR(MANUFACTURER) }; const USB_Descriptor_String_t PROGMEM ProductString = { .Header = { - .Size = USB_STRING_LEN(sizeof(STR(PRODUCT)) - 1), // Subtract 1 for null terminator + .Size = sizeof(USBSTR(PRODUCT)), .Type = DTYPE_String }, - .UnicodeString = LSTR(PRODUCT) + .UnicodeString = USBSTR(PRODUCT) }; #if defined(SERIAL_NUMBER) const USB_Descriptor_String_t PROGMEM SerialNumberString = { .Header = { - .Size = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1), // Subtract 1 for null terminator + .Size = sizeof(USBSTR(SERIAL_NUMBER)), .Type = DTYPE_String }, .UnicodeString = USBSTR(SERIAL_NUMBER) diff --git a/tmk_core/protocol/vusb/vusb.c b/tmk_core/protocol/vusb/vusb.c index d07cc0d27e..013d637b6f 100644 --- a/tmk_core/protocol/vusb/vusb.c +++ b/tmk_core/protocol/vusb/vusb.c @@ -224,11 +224,10 @@ void console_task(void) { static uint8_t keyboard_leds(void); static void send_keyboard(report_keyboard_t *report); static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); +static void send_extra(uint8_t report_id, uint16_t data); static void send_programmable_button(uint32_t data); -static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_system, send_consumer, send_programmable_button}; +static host_driver_t driver = {keyboard_leds, send_keyboard, send_mouse, send_extra, send_programmable_button}; host_driver_t *vusb_driver(void) { return &driver; @@ -269,8 +268,8 @@ static void send_mouse(report_mouse_t *report) { #endif } -#ifdef EXTRAKEY_ENABLE static void send_extra(uint8_t report_id, uint16_t data) { +#ifdef EXTRAKEY_ENABLE static uint8_t last_id = 0; static uint16_t last_data = 0; if ((report_id == last_id) && (data == last_data)) return; @@ -282,18 +281,6 @@ static void send_extra(uint8_t report_id, uint16_t data) { if (usbInterruptIsReadyShared()) { usbSetInterruptShared((void *)&report, sizeof(report_extra_t)); } -} -#endif - -static void send_system(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_SYSTEM, data); -#endif -} - -static void send_consumer(uint16_t data) { -#ifdef EXTRAKEY_ENABLE - send_extra(REPORT_ID_CONSUMER, data); #endif } @@ -672,7 +659,7 @@ const PROGMEM uchar console_hid_report[] = { // clang-format off const PROGMEM usbStringDescriptor_t usbStringDescriptorZero = { .header = { - .bLength = USB_STRING_LEN(1), + .bLength = 4, .bDescriptorType = USBDESCR_STRING }, .bString = {0x0409} // US English @@ -680,24 +667,24 @@ const PROGMEM usbStringDescriptor_t usbStringDescriptorZero = { const PROGMEM usbStringDescriptor_t usbStringDescriptorManufacturer = { .header = { - .bLength = USB_STRING_LEN(sizeof(STR(MANUFACTURER)) - 1), + .bLength = sizeof(USBSTR(MANUFACTURER)), .bDescriptorType = USBDESCR_STRING }, - .bString = LSTR(MANUFACTURER) + .bString = USBSTR(MANUFACTURER) }; const PROGMEM usbStringDescriptor_t usbStringDescriptorProduct = { .header = { - .bLength = USB_STRING_LEN(sizeof(STR(PRODUCT)) - 1), + .bLength = sizeof(USBSTR(PRODUCT)), .bDescriptorType = USBDESCR_STRING }, - .bString = LSTR(PRODUCT) + .bString = USBSTR(PRODUCT) }; #if defined(SERIAL_NUMBER) const PROGMEM usbStringDescriptor_t usbStringDescriptorSerial = { .header = { - .bLength = USB_STRING_LEN(sizeof(SERIAL_NUMBER) - 1), + .bLength = sizeof(USBSTR(SERIAL_NUMBER)), .bDescriptorType = USBDESCR_STRING }, .bString = USBSTR(SERIAL_NUMBER) diff --git a/tmk_core/protocol/vusb/vusb.h b/tmk_core/protocol/vusb/vusb.h index b1ecc98f37..c5cb27ded6 100644 --- a/tmk_core/protocol/vusb/vusb.h +++ b/tmk_core/protocol/vusb/vusb.h @@ -118,8 +118,6 @@ typedef struct usbConfigurationDescriptor { #endif } __attribute__((packed)) usbConfigurationDescriptor_t; -#define USB_STRING_LEN(s) (sizeof(usbDescriptorHeader_t) + ((s) << 1)) - extern bool vusb_suspended; host_driver_t *vusb_driver(void); diff --git a/users/arkag/arkag.c b/users/arkag/arkag.c index da85d4f6d4..00abbf2ae3 100644 --- a/users/arkag/arkag.c +++ b/users/arkag/arkag.c @@ -190,7 +190,7 @@ void set_os (uint8_t os, bool update) { } switch (os) { case OS_MAC: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); underglow = (Color){ 213, 255, 255 }; break; case OS_WIN: diff --git a/users/brandonschlack/rgb_bs.c b/users/brandonschlack/rgb_bs.c index 1abf785b49..94842021cd 100644 --- a/users/brandonschlack/rgb_bs.c +++ b/users/brandonschlack/rgb_bs.c @@ -75,7 +75,7 @@ void rgb_theme_step_reverse(void) { rgb_theme_color_t get_rgb_theme_color(uint8_t index) { rgb_theme_t theme = get_rgb_theme(); - size_t rgb_theme_color_max = sizeof theme.colors / sizeof *theme.colors; + size_t rgb_theme_color_max = ARRAY_SIZE(theme.colors); if (index == _ADJUST) { return default_adjust; diff --git a/users/curry/oled.c b/users/curry/oled.c index 5a8f0de61d..89112af121 100644 --- a/users/curry/oled.c +++ b/users/curry/oled.c @@ -41,7 +41,7 @@ void add_keylog(uint16_t keycode) { keylog_str[i] = keylog_str[i - 1]; } - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { keylog_str[0] = pgm_read_byte(&code_to_name[keycode]); } diff --git a/users/davidkristoffersen/util/functions.c b/users/davidkristoffersen/util/functions.c index 781d8f214d..3ab4ace2d6 100644 --- a/users/davidkristoffersen/util/functions.c +++ b/users/davidkristoffersen/util/functions.c @@ -33,14 +33,14 @@ code_set_t EN_SHIFT_CODES [] = { const shift_code_t SHIFT_CODES [] = { #ifdef LAYER_NO {.lang = LAYER_NO, - .size = ARR_LEN(NO_SHIFT_CODES), + .size = ARRAY_SIZE(NO_SHIFT_CODES), .codes = NO_SHIFT_CODES}, #endif {.lang = LAYER_EN, - .size = ARR_LEN(EN_SHIFT_CODES), + .size = ARRAY_SIZE(EN_SHIFT_CODES), .codes = EN_SHIFT_CODES}, }; -const int SHIFT_CODES_SIZE = ARR_LEN(SHIFT_CODES); +const int SHIFT_CODES_SIZE = ARRAY_SIZE(SHIFT_CODES); #endif #ifdef LAYER_NO @@ -72,7 +72,7 @@ const code_set_t EN2NO_CODES [] = { {KC_DLR, NO_DLR}, {KC_GRV, NO_GRV} }; -const int EN2NO_CODES_SIZE = ARR_LEN(EN2NO_CODES); +const int EN2NO_CODES_SIZE = ARRAY_SIZE(EN2NO_CODES); #endif // Check if layer is an active default layer diff --git a/users/davidkristoffersen/util/functions.h b/users/davidkristoffersen/util/functions.h index eee1dadc57..5fef010694 100644 --- a/users/davidkristoffersen/util/functions.h +++ b/users/davidkristoffersen/util/functions.h @@ -15,8 +15,6 @@ // Return false if test equal false #define HANDLE_FALSE(bool) if (!bool) return false; -// Generic array lenght define -#define ARR_LEN(arr) (sizeof(arr) / sizeof(arr)[0]) // Printf-like functionality for send_string #define SEND_VAR(str, ...) \ do { \ diff --git a/users/drashna/keyrecords/tap_dance.md b/users/drashna/keyrecords/tap_dance.md index 0bf67cbd5a..fef1435918 100644 --- a/users/drashna/keyrecords/tap_dance.md +++ b/users/drashna/keyrecords/tap_dance.md @@ -88,7 +88,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode; // if the tapdance is hit more than the number of elemints in the array, reset - if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t) ) ) { + if (state->count >= ARRAY_SIZE(diablo_times) ) { diablo_timer[diablo_keys->index].key_interval = 0; reset_tap_dance(state); } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) diff --git a/users/drashna/keyrecords/tap_dances.c b/users/drashna/keyrecords/tap_dances.c index 6caf6b6b3e..7bdea3cae3 100644 --- a/users/drashna/keyrecords/tap_dances.c +++ b/users/drashna/keyrecords/tap_dances.c @@ -23,7 +23,7 @@ void diablo_tapdance_master(qk_tap_dance_state_t *state, void *user_data) { diablo_timer[diablo_keys->index].keycode = diablo_keys->keycode; // if the tapdance is hit more than the number of elemints in the array, reset - if (state->count >= (sizeof(diablo_times) / sizeof(uint8_t))) { + if (state->count >= ARRAY_SIZE(diablo_times)) { diablo_timer[diablo_keys->index].key_interval = 0; reset_tap_dance(state); } else { // else set the interval (tapdance count starts at 1, array starts at 0, so offset by one) diff --git a/users/drashna/keyrecords/unicode.c b/users/drashna/keyrecords/unicode.c index b3fc71cb09..bfce38f555 100644 --- a/users/drashna/keyrecords/unicode.c +++ b/users/drashna/keyrecords/unicode.c @@ -43,7 +43,7 @@ typedef uint32_t (*translator_function_t)(bool is_shifted, uint32_t keycode); static inline uint32_t translator_name(bool is_shifted, uint32_t keycode) { \ static const uint32_t translation[] = {__VA_ARGS__}; \ uint32_t ret = keycode; \ - if ((keycode - KC_A) < (sizeof(translation) / sizeof(uint32_t))) { \ + if ((keycode - KC_A) < ARRAY_SIZE(translation)) { \ ret = translation[keycode - KC_A]; \ } \ return ret; \ diff --git a/users/drashna/oled/oled_stuff.c b/users/drashna/oled/oled_stuff.c index e082f8ab3e..68801b80a4 100644 --- a/users/drashna/oled/oled_stuff.c +++ b/users/drashna/oled/oled_stuff.c @@ -87,7 +87,7 @@ void add_keylog(uint16_t keycode, keyrecord_t *record) { memmove(keylog_str, keylog_str + 1, OLED_KEYLOGGER_LENGTH - 1); - if (keycode < (sizeof(code_to_name) / sizeof(char))) { + if (keycode < ARRAY_SIZE(code_to_name)) { keylog_str[(OLED_KEYLOGGER_LENGTH - 1)] = pgm_read_byte(&code_to_name[keycode]); } diff --git a/users/gary/gary.h b/users/gary/gary.h index 10f2331591..ce920cf776 100644 --- a/users/gary/gary.h +++ b/users/gary/gary.h @@ -1,7 +1,6 @@ #include QMK_KEYBOARD_H #pragma once -#define USE_SERIAL #define MASTER_LEFT // Layers diff --git a/users/gourdo1/gourdo1.h b/users/gourdo1/gourdo1.h index ecf6eaf25d..a198fd0805 100644 --- a/users/gourdo1/gourdo1.h +++ b/users/gourdo1/gourdo1.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -// DEFINE MACROS -#define ARRAYSIZE(arr) sizeof(arr) / sizeof(arr[0]) - // LAYERS -- Note: to avoid compile problems, make sure total layers matches DYNAMIC_KEYMAP_LAYER_COUNT defined in config.h (where _COLEMAK layer is defined) enum custom_user_layers { _BASE, diff --git a/users/jonavin/jonavin.h b/users/jonavin/jonavin.h index ab2ce0dff2..c3e383bd3a 100644 --- a/users/jonavin/jonavin.h +++ b/users/jonavin/jonavin.h @@ -17,9 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -// DEFINE MACROS -#define ARRAYSIZE(arr) sizeof(arr)/sizeof(arr[0]) - // LAYERS enum custom_user_layers { diff --git a/users/sigma/sigma.c b/users/sigma/sigma.c index 8470060a53..64fa68228b 100644 --- a/users/sigma/sigma.c +++ b/users/sigma/sigma.c @@ -67,7 +67,7 @@ void set_os(uint8_t os) { #if defined(UNICODE_ENABLE) || defined(UNICODEMAP_ENABLE) || defined(UCIS_ENABLE) switch (os) { case _OS_MACOS: - set_unicode_input_mode(UC_OSX); + set_unicode_input_mode(UC_MAC); break; case _OS_LINUX: set_unicode_input_mode(UC_LNX); diff --git a/users/spidey3/config.h b/users/spidey3/config.h index 91bcf910ee..36d59b6a5d 100644 --- a/users/spidey3/config.h +++ b/users/spidey3/config.h @@ -42,7 +42,7 @@ #define SPI_DEBUG_SCAN_RATE #undef MANUFACTURER -#define MANUFACTURER Window of Fire +#define MANUFACTURER "Window of Fire" // Some keyboards enable BACKLIGHT_CAPS_LOCK without checking if backlight is enabled. // Undef as appropriate to avoid compiler warnings in that case. diff --git a/users/spidey3/layer_rgb.c b/users/spidey3/layer_rgb.c index c867468194..bdf4584ef1 100644 --- a/users/spidey3/layer_rgb.c +++ b/users/spidey3/layer_rgb.c @@ -97,7 +97,7 @@ const rgblight_segment_t *const PROGMEM _rgb_layers[] = { // clang-format on -const uint8_t PROGMEM _n_rgb_layers = sizeof(_rgb_layers) / sizeof(_rgb_layers[0]) - 1; +const uint8_t PROGMEM _n_rgb_layers = ARRAY_SIZE(_rgb_layers) - 1; void clear_rgb_layers() { for (uint8_t i = 0; i < _n_rgb_layers; i++) { @@ -112,8 +112,7 @@ void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) { } } -void do_rgb_unicode(void) { - uint8_t uc_mode = get_unicode_input_mode(); +void do_rgb_unicode(uint8_t uc_mode) { for (uint8_t i = 0; i < UC__COUNT; i++) { bool is_on = i == uc_mode; rgblight_set_layer_state(UNICODE_OFFSET + i, is_on); @@ -123,7 +122,7 @@ void do_rgb_unicode(void) { void do_rgb_all(void) { do_rgb_layers(default_layer_state, LAYER_BASE_DEFAULT, LAYER_BASE_REGULAR); do_rgb_layers(layer_state, LAYER_BASE_REGULAR, LAYER_BASE_END); - do_rgb_unicode(); + do_rgb_unicode(get_unicode_input_mode()); rgblight_set_layer_state(MISC_OFFSET + 0, spi_gflock); rgblight_set_layer_state(MISC_OFFSET + 1, spi_replace_mode != SPI_NORMAL); } @@ -148,7 +147,7 @@ extern rgblight_status_t rgblight_status; # define STARTUP_ANIMATION_CYCLE_STEP 2 # define STARTUP_ANIMATION_RAMP_TO_STEPS 70 # define STARTUP_ANIMATION_STEP_TIME 10 -# define STARTUP_ANIMATION_INITIAL_DELAY 0 // milliseconds, must be < 255 * STEP_TIME +# define STARTUP_ANIMATION_INITIAL_DELAY 0 // milliseconds, must be < 255 * STEP_TIME // clang-format off typedef enum { @@ -382,6 +381,13 @@ bool led_update_user_rgb(led_t led_state) { return true; } +#if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user_rgb(uint8_t input_mode) { + rgb_layer_ack(ACK_MEH); + do_rgb_unicode(input_mode); +} +#endif + void rgb_layer_ack_yn(bool yn) { rgb_layer_ack(yn ? ACK_YES : ACK_NO); } void rgb_layer_ack(layer_ack_t n) { @@ -458,7 +464,7 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { break; case RGB_TOG: - // Hack - we only get called on the press for RGB_TOG, + // Hack - we only get called on the press for RGB_TOG, // but the flag is only flipped on the release... rgb_layer_ack_yn(!rgblight_config.enable); break; @@ -476,20 +482,5 @@ void post_process_record_user_rgb(uint16_t keycode, keyrecord_t *record) { rgb_layer_ack_yn(keymap_config.nkro); break; #endif - -#if defined(UNICODE_COMMON_ENABLE) - case UC_M_MA: - case UC_M_LN: - case UC_M_WI: - case UC_M_BS: - case UC_M_WC: - case UC_M_EM: - - case UC_MOD: - case UC_RMOD: - rgb_layer_ack(ACK_MEH); - do_rgb_unicode(); - break; -#endif } } diff --git a/users/spidey3/rules.mk b/users/spidey3/rules.mk index c95582e176..35cfdb4187 100644 --- a/users/spidey3/rules.mk +++ b/users/spidey3/rules.mk @@ -11,5 +11,5 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes) SRC += layer_rgb.c endif ifeq ($(strip $(UNICODEMAP_ENABLE)), yes) - SRC += unicode.c + SRC += spidey3_unicode.c endif diff --git a/users/spidey3/spidey3.c b/users/spidey3/spidey3.c index 842bb465f7..d9b893814a 100644 --- a/users/spidey3/spidey3.c +++ b/users/spidey3/spidey3.c @@ -98,14 +98,14 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin clear_oneshot_mods(); #endif - bool caps = host_keyboard_led_state().caps_lock; + bool caps = host_keyboard_led_state().caps_lock; uint32_t base = ((shifted == caps) ? baseAlphaLower : baseAlphaUpper); _register(base + (keycode - KC_A)); set_mods(temp_mod); } return false; case KC_0: - if (shifted) { // skip shifted numbers, so that we can still use symbols etc. + if (shifted) { // skip shifted numbers, so that we can still use symbols etc. return true; } if (record->event.pressed) { @@ -113,7 +113,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin } return false; case KC_1 ... KC_9: - if (shifted) { // skip shifted numbers, so that we can still use symbols etc. + if (shifted) { // skip shifted numbers, so that we can still use symbols etc. return true; } if (record->event.pressed) { @@ -122,7 +122,7 @@ bool process_record_glyph_replacement(uint16_t keycode, keyrecord_t *record, uin return false; case KC_SPACE: if (record->event.pressed) { - _register(spaceGlyph); // em space + _register(spaceGlyph); // em space } return false; } @@ -338,7 +338,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { set_mods(mods); return false; } - } else { // on release of KC_BSPC + } else { // on release of KC_BSPC // In case KC_DEL is still being sent even after the release of KC_BSPC if (delkey_registered) { unregister_code(KC_DEL); @@ -387,3 +387,11 @@ bool led_update_user(led_t led_state) { return true; #endif } + +#if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user(uint8_t input_mode) { +# ifdef RGBLIGHT_ENABLE + unicode_input_mode_set_user_rgb(input_mode); +# endif +} +#endif diff --git a/users/spidey3/spidey3.h b/users/spidey3/spidey3.h index e91b299e55..e344b08895 100644 --- a/users/spidey3/spidey3.h +++ b/users/spidey3/spidey3.h @@ -6,7 +6,7 @@ #include QMK_KEYBOARD_H #ifdef UNICODEMAP_ENABLE -# include "unicode.h" +# include "spidey3_unicode.h" #endif enum userspace_layers { @@ -17,9 +17,9 @@ enum userspace_layers { }; enum custom_keycodes { - CH_CPNL = SAFE_RANGE, // AL Control Panel - CH_ASST, // AL Context-aware Desktop Assistant - CH_SUSP, // Suspend + CH_CPNL = SAFE_RANGE, // AL Control Panel + CH_ASST, // AL Context-aware Desktop Assistant + CH_SUSP, // Suspend SPI_NORMAL, SPI_WIDE, @@ -65,6 +65,11 @@ void rgb_layer_ack(layer_ack_t n); void rgb_layer_ack_yn(bool yn); void clear_rgb_layers(void); void shutdown_user_rgb(void); + +# if defined(UNICODE_COMMON_ENABLE) +void unicode_input_mode_set_user_rgb(uint8_t input_mode); +# endif + #endif #ifdef UNICODEMAP_ENABLE diff --git a/users/spidey3/unicode.c b/users/spidey3/spidey3_unicode.c index 5292b0809b..c2804d8805 100644 --- a/users/spidey3/unicode.c +++ b/users/spidey3/spidey3_unicode.c @@ -2,7 +2,7 @@ // SPDX-License-Identifier: GPL-2.0-or-later -#include "unicode.h" +#include "spidey3_unicode.h" const uint32_t PROGMEM unicode_map[] = { [BUL1] = 0x2022, // • diff --git a/users/spidey3/unicode.h b/users/spidey3/spidey3_unicode.h index ee8e00056c..ee8e00056c 100644 --- a/users/spidey3/unicode.h +++ b/users/spidey3/spidey3_unicode.h diff --git a/users/uqs/uqs.c b/users/uqs/uqs.c index 72284143c6..7e2d09e0f6 100644 --- a/users/uqs/uqs.c +++ b/users/uqs/uqs.c @@ -78,9 +78,9 @@ const rgblight_segment_t* const PROGMEM my_rgb_layers[] = { my_rgb_segments[L_MOUSE], }; -_Static_assert(sizeof(my_rgb_layers) / sizeof(my_rgb_layers[0]) == - sizeof(my_rgb_segments) / sizeof(my_rgb_segments[0]), - "Number of rgb_segment definitions does not match up!"); +_Static_assert(ARRAY_SIZE(my_rgb_layers) == + ARRAY_SIZE(my_rgb_segments), + "Number of rgb_segment definitions does not match up!"); #endif #ifdef COMBO_ENABLE @@ -125,7 +125,7 @@ const uint16_t PROGMEM my_combos[][4] = { {KC_BTN1, KC_BTN2, KC_BTN3, COMBO_END}, }; -const uint16_t COMBO_LEN = sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0]); +const uint16_t COMBO_LEN = ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos); #define MY_ACTION_COMBO(ck) \ [ck] = { .keys = &(my_action_combos[ck][0]) } @@ -162,11 +162,11 @@ combo_t key_combos[] = { MY_COMBO(14), }; -_Static_assert(sizeof(key_combos) / sizeof(key_combos[0]) == - (sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])), - "Number of combo definitions does not match up!"); +_Static_assert(ARRAY_SIZE(key_combos) == + (ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos)), + "Number of combo definitions does not match up!"); #else -combo_t key_combos[sizeof(my_action_combos) / sizeof(my_action_combos[0]) + sizeof(my_combos) / sizeof(my_combos[0])]; +combo_t key_combos[ARRAY_SIZE(my_action_combos) + ARRAY_SIZE(my_combos)]; #endif void process_combo_event(uint16_t combo_index, bool pressed) { @@ -235,10 +235,10 @@ void keyboard_post_init_user(void) { #endif #if defined(COMBO_ENABLE) && !defined(COMBO_STATICALLY) uint8_t i = 0; - for (; i < sizeof(my_action_combos) / sizeof(my_action_combos[0]); i++) { + for (; i < ARRAY_SIZE(my_action_combos); i++) { key_combos[i].keys = &(my_action_combos[i][0]); } - for (uint8_t j = 0; j < sizeof(my_combos) / sizeof(my_combos[0]); j++, i++) { + for (uint8_t j = 0; j < ARRAY_SIZE(my_combos); j++, i++) { key_combos[i].keycode = my_combos[j][0]; key_combos[i].keys = &(my_combos[j][1]); } |