Skip to content

Commit

Permalink
Merge remote-tracking branch 'qmk/develop' into develop
Browse files Browse the repository at this point in the history
* qmk/develop: (69 commits)
  Use opendrain pin with external pullup again (qmk#14474)
  Add i2c defaults for Convert to Proton C (qmk#14470)
  [Keyboard] Increase the way to add oled code for helix/rev3. (qmk#14426)
  [Bug] fix logical minimum in Programmable Button rdesc (qmk#14464)
  Adds optional hebrew layout (Unicode) (qmk#14156)
  New CLI subcommand to create clang-compatible compilation database (`compile_commands.json`) (qmk#14370)
  [Keyboard] Add the Idobao ID96 keyboard (qmk#14371)
  [Keyboard] Add FJLabs TF60 Variants and TF65 Variant (qmk#14392)
  [Keyboard] Add Absolute Designs AD65 Keyboard (qmk#14391)
  [Bug] Fix descriptor for USB Programmable Buttons (qmk#14455)
  Make ChibiOS PAL interactions less STM32 specific - Round 2 (qmk#14456)
  core: fix compilation issues with USB programmable buttons (qmk#14454)
  [Keyboard] add Matrix Me (qmk#14331)
  [Keyboard] Replaced Maker Keyboards & FJLabs Legacy Code (qmk#14393)
  [Keyboard] Add `NO_LED` positions to match key matrix. (qmk#14417)
  [Keymap] A slight improvement to my own ErgoDox keymap (qmk#14425)
  [Keymap] Trying again with Prime-e update! (qmk#14429)
  [Keyboard] Update lighting effects for xbows keyboard (qmk#14432)
  [Docs] add sync options heading, update led indicators (qmk#14441)
  [Bug] Fix IS31fl3741 driver to accept 1 or 2 addresses (qmk#14451)
  ...
  • Loading branch information
Carlos Cardoso committed Sep 17, 2021
2 parents 77f7f95 + efde8d6 commit 59993bb
Show file tree
Hide file tree
Showing 3,589 changed files with 15,313 additions and 8,438 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,8 @@ __pycache__

# Allow to exist but don't include it in the repo
user_song_list.h

# clangd
compile_commands.json
.clangd/
.cache/
53 changes: 48 additions & 5 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/pointing_device.c
endif

ifeq ($(strip $(PROGRAMMABLE_BUTTON_ENABLE)), yes)
OPT_DEFS += -DPROGRAMMABLE_BUTTON_ENABLE
SRC += $(QUANTUM_DIR)/programmable_button.c
SRC += $(QUANTUM_DIR)/process_keycode/process_programmable_button.c
endif

VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
EEPROM_DRIVER ?= vendor
ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
Expand Down Expand Up @@ -157,31 +163,45 @@ else
# Automatically provided by avr-libc, nothing required
else ifeq ($(PLATFORM),CHIBIOS)
ifeq ($(MCU_SERIES), STM32F3xx)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F303xC
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES), STM32F1xx)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F103xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F072xB
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifneq ($(filter $(MCU_SERIES)_$(MCU_LDSCRIPT),STM32F4xx_STM32F401xC STM32F4xx_STM32F411xE),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F401xC
else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6)

# Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
# This ensures that the EEPROM page buffer fits into RAM
USE_PROCESS_STACKSIZE = 0x600
USE_EXCEPTIONS_STACKSIZE = 0x300

OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
SRC += eeprom_driver.c
SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
OPT_DEFS += -DEEPROM_EMU_STM32F042x6
OPT_DEFS += -DSTM32_EEPROM_ENABLE
else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
OPT_DEFS += -DEEPROM_DRIVER
COMMON_VPATH += $(DRIVER_PATH)/eeprom
Expand Down Expand Up @@ -745,3 +765,26 @@ ifeq ($(strip $(USBPD_ENABLE)), yes)
endif
endif
endif

BLUETOOTH_ENABLE ?= no
VALID_BLUETOOTH_DRIVER_TYPES = AdafruitBLE RN42 custom
ifeq ($(strip $(BLUETOOTH_ENABLE)), yes)
ifeq ($(filter $(strip $(BLUETOOTH_DRIVER)),$(VALID_BLUETOOTH_DRIVER_TYPES)),)
$(error "$(BLUETOOTH_DRIVER)" is not a valid Bluetooth driver type)
endif
OPT_DEFS += -DBLUETOOTH_ENABLE
NO_USB_STARTUP_CHECK := yes
SRC += outputselect.c

ifeq ($(strip $(BLUETOOTH_DRIVER)), AdafruitBLE)
OPT_DEFS += -DMODULE_ADAFRUIT_BLE
SRC += analog.c
SRC += $(LUFA_DIR)/adafruit_ble.cpp
QUANTUM_LIB_SRC += spi_master.c
endif

ifeq ($(strip $(BLUETOOTH_DRIVER)), RN42)
OPT_DEFS += -DMODULE_RN42
SRC += $(TMK_DIR)/protocol/serial_uart.c
endif
endif
2 changes: 0 additions & 2 deletions data/schemas/keyboard.jsonschema
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@
"c_macro": {
"type": "boolean"
},
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
"layout": {
"type": "array",
"items": {
Expand All @@ -136,7 +135,6 @@
"multipleOf": 1
}
},
"key_count": {"$ref": "qmk.definitions.v1#/key_unit"},
"r": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"rx": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
"ry": {"$ref": "qmk.definitions.v1#/unsigned_decimal"},
Expand Down
1 change: 0 additions & 1 deletion data/templates/avr/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
NKRO_ENABLE = no # USB Nkey Rollover
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
BLUETOOTH_ENABLE = no # Enable Bluetooth
AUDIO_ENABLE = no # Audio output
2 changes: 0 additions & 2 deletions data/templates/base/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
"keyboard_name": "%KEYBOARD%",
"url": "",
"maintainer": "%YOUR_NAME%",
"width": 3,
"height": 2,
"layouts": {
"LAYOUT": {
"layout": [
Expand Down
1 change: 0 additions & 1 deletion disable_features.mk
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Unconditionally disable features that a keyboard advertises it doesn't support

FEATURE_NAMES :=
FEATURE_NAMES += ADAFRUIT_BLE
FEATURE_NAMES += AUDIO
FEATURE_NAMES += BACKLIGHT
FEATURE_NAMES += BLUETOOTH
Expand Down
1 change: 1 addition & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
* [Mod-Tap](mod_tap.md)
* [Macros](feature_macros.md)
* [Mouse Keys](feature_mouse_keys.md)
* [Programmable Button](feature_programmable_button.md)
* [Space Cadet Shift](feature_space_cadet.md)
* [US ANSI Shifted Keys](keycodes_us_ansi_shifted.md)

Expand Down
14 changes: 7 additions & 7 deletions docs/audio_driver.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ This driver needs one Timer per enabled/used DAC channel, to trigger conversion;

Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timers 6, 7 and 8:

``` c
```c
//halconf.h:
#define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1
Expand Down Expand Up @@ -93,14 +93,14 @@ only needs one timer (GPTD6, Tim6) to trigger the DAC unit to do a conversion; t
Additionally, in the board config, you'll want to make changes to enable the DACs, GPT for Timer 6:
``` c
```c
//halconf.h:
#define HAL_USE_DAC TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_DAC_USE_DAC1_CH1
Expand Down Expand Up @@ -153,15 +153,15 @@ This driver uses the ChibiOS-PWM system to produce a square-wave on specific out
The hardware directly toggles the pin via its alternate function. See your MCU's data-sheet for which pin can be driven by what timer - looking for TIMx_CHy and the corresponding alternate function.

A configuration example for the STM32F103C8 would be:
``` c
```c
//halconf.h:
#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
#define HAL_USE_GPT TRUE
#include_next <halconf.h>
```

``` c
```c
// mcuconf.h:
#include_next <mcuconf.h>
#undef STM32_PWM_USE_TIM1
Expand All @@ -177,7 +177,7 @@ If we now target pin A8, looking through the data-sheet of the STM32F103C8, for
- TIM1_CH4 = PA11

with all this information, the configuration would contain these lines:
``` c
```c
//config.h:
#define AUDIO_PIN A8
#define AUDIO_PWM_DRIVER PWMD1
Expand Down
27 changes: 27 additions & 0 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,33 @@ qmk format-c
qmk format-c -b branch_name
```

## `qmk generate-compilation-database`

**Usage**:

```
qmk generate-compilation-database [-kb KEYBOARD] [-km KEYMAP]
```

Creates a `compile_commands.json` file.

Does your IDE/editor use a language server but doesn't _quite_ find all the necessary include files? Do you hate red squigglies? Do you wish your editor could figure out `#include QMK_KEYBOARD_H`? You might need a [compilation database](https://clang.llvm.org/docs/JSONCompilationDatabase.html)! The qmk tool can build this for you.

This command needs to know which keyboard and keymap to build. It uses the same configuration options as the `qmk compile` command: arguments, current directory, and config files.

**Example:**

```
$ cd ~/qmk_firmware/keyboards/gh60/satan/keymaps/colemak
$ qmk generate-compilation-database
Ψ Making clean
Ψ Gathering build instructions from make -n gh60/satan:colemak
Ψ Found 50 compile commands
Ψ Writing build database to /Users/you/src/qmk_firmware/compile_commands.json
```

Now open your dev environment and live a squiggly-free life.

## `qmk docs`

This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.
Expand Down
2 changes: 1 addition & 1 deletion docs/cli_development.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ If you intend to maintain keyboards and/or contribute to QMK, you can enable the

This will allow you to see all available subcommands.
**Note:** You will have to install additional requirements:
```bash
```
python3 -m pip install -r requirements-dev.txt
```

Expand Down
4 changes: 2 additions & 2 deletions docs/configurator_default_keymaps.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Keymaps in this directory require four key-value pairs:

Additionally, most keymaps contain a `commit` key. This key is not consumed by the API that back-stops QMK Configurator, but is used by Configurator's maintainers to tell which version of a keymap was used to create the JSON keymap in this repository. The value is the SHA of the last commit to modify a board's default `keymap.c` in the `qmk_firmware` repository. The SHA is found by checking out [the `master` branch of the `qmk/qmk_firmware` repository](https://github.com/qmk/qmk_firmware/tree/master/) and running `git log -1 --pretty=oneline -- keyboards/<keyboard>/keymaps/default/keymap.c` (use `keymap.json` if the keyboard in question has this file instead), which should return something similar to:

```shell
```
f14629ed1cd7c7ec9089604d64f29a99981558e8 Remove/migrate action_get_macro()s from default keymaps (#5625)
```

Expand All @@ -31,7 +31,7 @@ In this example, `f14629ed1cd7c7ec9089604d64f29a99981558e8` is the value that sh

If one wished to add a default keymap for the H87a by Hineybush, one would run the `git log` command above against the H87a's default keymap in `qmk_firmware`:

```shell
```
user ~/qmk_firmware (master)
$ git log -1 --pretty=oneline master -- keyboards/hineybush/h87a/keymaps/default/keymap.c
ef8878fba5d3786e3f9c66436da63a560cd36ac9 Hineybush h87a lock indicators (#8237)
Expand Down
2 changes: 1 addition & 1 deletion docs/custom_matrix.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The reasons to use this feature include:
Implementing custom matrix usually involves compilation of an additional source file. It is recommended that for consistency, this file is called `matrix.c`.

Add a new file to your keyboard directory:
```text
```
keyboards/<keyboard>/matrix.c
```

Expand Down
4 changes: 2 additions & 2 deletions docs/faq_debug.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
```
Example output
```text
```
Waiting for device:.......
Listening:
KL: kc: 169, col: 0, row: 0, pressed: 1
Expand All @@ -82,7 +82,7 @@ When testing performance issues, it can be useful to know the frequency at which
```

Example output
```text
```
> matrix scan frequency: 315
> matrix scan frequency: 313
> matrix scan frequency: 316
Expand Down
12 changes: 6 additions & 6 deletions docs/feature_backlight.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ The MCU can only supply so much current to its GPIO pins. Instead of powering th

Most keyboards have backlighting enabled by default if they support it, but if it is not working for you, check that your `rules.mk` includes the following:

```makefile
```make
BACKLIGHT_ENABLE = yes
```

Expand Down Expand Up @@ -54,7 +54,7 @@ If backlight breathing is enabled (see below), the following functions are also

To select which driver to use, configure your `rules.mk` with the following:

```makefile
```make
BACKLIGHT_DRIVER = software
```

Expand Down Expand Up @@ -87,7 +87,7 @@ This functionality is configured at the keyboard level with the `BACKLIGHT_ON_ST

The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be:

```makefile
```make
BACKLIGHT_DRIVER = pwm
```

Expand Down Expand Up @@ -143,7 +143,7 @@ The breathing effect is the same as in the hardware PWM implementation.

While still in its early stages, ARM backlight support aims to eventually have feature parity with AVR. The `pwm` driver is configured by default, however the equivalent setting within `rules.mk` would be:

```makefile
```make
BACKLIGHT_DRIVER = pwm
```

Expand All @@ -167,7 +167,7 @@ Currently only hardware PWM is supported, not timer assisted, and does not provi

In this mode, PWM is "emulated" while running other keyboard tasks. It offers maximum hardware compatibility without extra platform configuration. The tradeoff is the backlight might jitter when the keyboard is busy. To enable, add this to your `rules.mk`:

```makefile
```make
BACKLIGHT_DRIVER = software
```

Expand All @@ -188,7 +188,7 @@ To activate multiple backlight pins, add something like this to your `config.h`,
If none of the above drivers apply to your board (for example, you are using a separate IC to control the backlight), you can implement a custom backlight driver using this simple API provided by QMK. To enable, add this to your `rules.mk`:
```makefile
```make
BACKLIGHT_DRIVER = custom
```

Expand Down
19 changes: 10 additions & 9 deletions docs/feature_bluetooth.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@

Currently Bluetooth support is limited to AVR based chips. For Bluetooth 2.1, QMK has support for RN-42 modules. For more recent BLE protocols, currently only the Adafruit Bluefruit SPI Friend is directly supported. BLE is needed to connect to iOS devices. Note iOS does not support mouse input.

|Board |Bluetooth Protocol |Connection Type |rules.mk |Bluetooth Chip|
|----------------------------------------------------------------|----------------------------|----------------|---------------------------|--------------|
|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic | UART |`BLUETOOTH = RN42` | RN-42 |
|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy | SPI |`BLUETOOTH = AdafruitBLE` | nRF51822 |
|Board |Bluetooth Protocol |Connection Type|rules.mk |Bluetooth Chip|
|----------------------------------------------------------------|--------------------|---------------|--------------------------------|--------------|
|Roving Networks RN-42 (Sparkfun Bluesmirf) |Bluetooth Classic |UART |`BLUETOOTH_DRIVER = RN42` |RN-42 |
|[Bluefruit LE SPI Friend](https://www.adafruit.com/product/2633)|Bluetooth Low Energy|SPI |`BLUETOOTH_DRIVER = AdafruitBLE`|nRF51822 |

Not Supported Yet but possible:
* [Bluefruit LE UART Friend](https://www.adafruit.com/product/2479). [Possible tmk implementation found in](https://github.com/tmk/tmk_keyboard/issues/514)
Expand All @@ -23,16 +23,17 @@ Currently The only bluetooth chipset supported by QMK is the Adafruit Bluefruit

A Bluefruit UART friend can be converted to an SPI friend, however this [requires](https://github.com/qmk/qmk_firmware/issues/2274) some reflashing and soldering directly to the MDBT40 chip.


<!-- FIXME: Document bluetooth support more completely. -->
## Bluetooth Rules.mk Options

The currently supported Bluetooth chipsets do not support [N-Key Rollover (NKRO)](reference_glossary.md#n-key-rollover-nkro), so `rules.mk` must contain `NKRO_ENABLE = no`.

Use only one of these to enable Bluetooth:
* BLUETOOTH_ENABLE = yes (Legacy Option)
* BLUETOOTH = RN42
* BLUETOOTH = AdafruitBLE
Add the following to your `rules.mk`:

```make
BLUETOOTH_ENABLE = yes
BLUETOOTH_DRIVER = AdafruitBLE # or RN42
```
## Bluetooth Keycodes
Expand Down
2 changes: 1 addition & 1 deletion docs/feature_digitizer.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ The digitizer HID interface allows setting the mouse cursor position at absolute

To enable the digitizer interface, add the following line to your rules.mk:

```makefile
```make
DIGITIZER_ENABLE = yes
```

Expand Down

0 comments on commit 59993bb

Please sign in to comment.