Skip to content

Commit

Permalink
Merge pull request qmk#2 from qmk/master
Browse files Browse the repository at this point in the history
Merge QMK origin into fork
  • Loading branch information
LouWii authored Nov 13, 2019
2 parents 59c720f + 79edb7c commit dce8c6b
Show file tree
Hide file tree
Showing 2,149 changed files with 71,377 additions and 35,361 deletions.
8 changes: 7 additions & 1 deletion .github/ISSUE_TEMPLATE/blank.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
---
name: Blank issue
about: If you're 100% sure that you don't need one of the other issue templates, use this one instead.
about: If you're 100% sure that you don't need one of the other issue templates, use
this one instead.
title: ''
labels: help wanted, question
assignees: ''

---


7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
name: Bug report
about: Create a report to help us improve the QMK Firmware
about: Create a report to help us improve QMK Firmware.
title: "[Bug] "
labels: bug, help wanted, discussion
assignees: ''

---

<!-- Provide a general summary of the bug in the title above. -->

<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
Expand Down
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: QMK Discord
url: https://discord.gg/Uq7gcHh
about: Ask questions, discuss issues and features. Chill.
- name: OLKB Subreddit
url: https://www.reddit.com/r/olkb
about: All things OLKB and QMK.
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
name: Feature request
about: Suggest a new feature or changes to existing features
about: Suggest a new feature or changes to existing features.
title: "[Feature Request] "
labels: enhancement, help wanted, discussion
assignees: ''

---

<!--- Provide a general summary of the changes you want in the title above. -->

<!--- This template is entirely optional and can be removed, but is here to help both you and us. -->
Expand Down
7 changes: 6 additions & 1 deletion .github/ISSUE_TEMPLATE/other_issues.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
---
name: Other issues
about: Anything else that doesn't fall into the above categories.
about: Anything else that doesn't fall into the above categories.
title: ''
labels: help wanted, question, discussion
assignees: ''

---

<!--- Provide a general summary of the changes you want in the title above. -->

<!--- Anything on lines wrapped in comments like these will not show up in the final text. -->
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ util/Win_Check_Output.txt

# ignore image files
*.png
*.jpg
*.gif
*.jpg

# Do not ignore MiniDox left/right hand eeprom files
!keyboards/minidox/*.eep
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
os: linux
dist: trusty
sudo: required
group: edge
language: c
branches:
Expand All @@ -17,6 +16,7 @@ install:
- npm install -g moxygen
script:
- git rev-parse --short HEAD
- git diff --name-only HEAD $TRAVIS_BRANCH
- bash util/travis_test.sh
- bash util/travis_build.sh
- bash util/travis_docs.sh
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -558,10 +558,10 @@ endef
if ! python3 --version 1> /dev/null 2>&1; then printf "$(MSG_PYTHON_MISSING)"; fi
# Check if the submodules are dirty, and display a warning if they are
ifndef SKIP_GIT
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 1 --init lib/chibios; fi
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 1 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 1 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 1 --init lib/lufa; fi
if [ ! -e lib/chibios ]; then git submodule sync lib/chibios && git submodule update --depth 50 --init lib/chibios; fi
if [ ! -e lib/chibios-contrib ]; then git submodule sync lib/chibios-contrib && git submodule update --depth 50 --init lib/chibios-contrib; fi
if [ ! -e lib/ugfx ]; then git submodule sync lib/ugfx && git submodule update --depth 50 --init lib/ugfx; fi
if [ ! -e lib/lufa ]; then git submodule sync lib/lufa && git submodule update --depth 50 --init lib/lufa; fi
git submodule status --recursive 2>/dev/null | \
while IFS= read -r x; do \
case "$$x" in \
Expand Down
2 changes: 1 addition & 1 deletion bin/qmk
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ with open(os.path.join(qmk_dir, 'requirements.txt'), 'r') as fd:

module = line.split('=')[0] if '=' in line else line
if not find_spec(module):
print('Could not find module %s!', module)
print('Could not find module %s!' % module)
print('Please run `pip3 install -r requirements.txt` to install the python dependencies.')
exit(255)

Expand Down
63 changes: 57 additions & 6 deletions common_features.mk
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
else
SRC += ws2812.c
WS2812_DRIVER_REQUIRED = yes
endif
endif

Expand Down Expand Up @@ -176,7 +176,7 @@ endif

ifeq ($(strip $(RGB_MATRIX_ENABLE)), WS2812)
OPT_DEFS += -DWS2812
SRC += ws2812.c
WS2812_DRIVER_REQUIRED = yes
endif

ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
Expand Down Expand Up @@ -229,12 +229,59 @@ ifeq ($(strip $(LCD_ENABLE)), yes)
CIE1931_CURVE = yes
endif

ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
# backward compat
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
BACKLIGHT_ENABLE = custom
endif

VALID_BACKLIGHT_TYPES := yes software custom

BACKLIGHT_ENABLE ?= no
ifneq ($(strip $(BACKLIGHT_ENABLE)), no)
ifeq ($(filter $(BACKLIGHT_ENABLE),$(VALID_BACKLIGHT_TYPES)),)
$(error BACKLIGHT_ENABLE="$(BACKLIGHT_ENABLE)" is not a valid backlight type)
endif

ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
CIE1931_CURVE = yes
endif
ifeq ($(strip $(BACKLIGHT_CUSTOM_DRIVER)), yes)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER

COMMON_VPATH += $(QUANTUM_DIR)/backlight
SRC += $(QUANTUM_DIR)/backlight/backlight.c
OPT_DEFS += -DBACKLIGHT_ENABLE

ifeq ($(strip $(BACKLIGHT_ENABLE)), software)
SRC += $(QUANTUM_DIR)/backlight/backlight_soft.c
else
ifeq ($(strip $(BACKLIGHT_ENABLE)), custom)
OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
endif

ifeq ($(PLATFORM),AVR)
SRC += $(QUANTUM_DIR)/backlight/backlight_avr.c
else
SRC += $(QUANTUM_DIR)/backlight/backlight_arm.c
endif
endif
endif

VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c

WS2812_DRIVER ?= bitbang
ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
$(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
endif

ifeq ($(strip $(WS2812_DRIVER)), bitbang)
SRC += ws2812.c
else
SRC += ws2812_$(strip $(WS2812_DRIVER)).c
endif

# add extra deps
ifeq ($(strip $(WS2812_DRIVER)), i2c)
QUANTUM_LIB_SRC += i2c_master.c
endif
endif

Expand Down Expand Up @@ -360,8 +407,12 @@ ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
OPT_DEFS += -DSPACE_CADET_ENABLE
endif


ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/dip_switch.c
OPT_DEFS += -DDIP_SWITCH_ENABLE
endif

ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
endif
4 changes: 0 additions & 4 deletions docs/LANGS.md

This file was deleted.

8 changes: 8 additions & 0 deletions docs/_langs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- Translations
- [:uk: English](/)
- [:cn: 中文](/zh-cn/)
- [:es: Español](/es/)
- [:fr: Français](/fr-fr/)
- [:he: עברית](/he-il/)
- [:ru: Русский](/ru-ru/)
- [:ja: 日本語](/ja/)
3 changes: 3 additions & 0 deletions docs/_summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
* [Keymap Overview](keymap.md)

* [Hardware](hardware.md)
* [Compatible Microcontrollers](compatible_microcontrollers.md)
* [AVR Processors](hardware_avr.md)
* [Drivers](hardware_drivers.md)

Expand Down Expand Up @@ -98,6 +99,7 @@
* [ISP Flashing Guide](isp_flashing_guide.md)
* [ARM Debugging Guide](arm_debugging.md)
* [I2C Driver](i2c_driver.md)
* [WS2812 Driver](ws2812_driver.md)
* [GPIO Controls](internals_gpio_control.md)
* [Proton C Conversion](proton_c_conversion.md)

Expand All @@ -109,6 +111,7 @@
* [Using Eclipse with QMK](other_eclipse.md)
* [Using VSCode with QMK](other_vscode.md)
* [Support](support.md)
* [How to add translations](translating.md)

* QMK Internals (In Progress)
* [Defines](internals_defines.md)
Expand Down
16 changes: 8 additions & 8 deletions docs/arm_debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ This guide is catered towards advance users and assumes you can compile an ARM c

## Installing the software

The main objective here is to get the MCU Eclipse IDE correcly installed on our machine. The necesarry instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide.
The main objective here is to get the MCU Eclipse IDE correctly installed on our machine. The necessary instructions are derived from [this](https://gnu-mcu-eclipse.github.io/install/) install guide.

### The xPack Manager

This tool is a software package manager and it is used to help us get the necesarry depencencies.
This tool is a software package manager and it is used to help us get the necessary dependencies.

XPM runs using Node.js so grab that form [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the instalation was successful.
XPM runs using Node.js so grab that from [here](https://nodejs.org/en/). After installation, open a terminal and type `npm -v`. A reply with the version number means that the installation was successful.

XPM instalation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version.
XPM installation instructions can be found [here](https://www.npmjs.com/package/xpm) and are OS specific. Entering `xpm --version` to your terminal should return the software version.

### The ARM Toolchain

Expand All @@ -26,10 +26,10 @@ If you are using windows you need to install this!

`xpm install --global @gnu-mcu-eclipse/windows-build-tools`

### Programer/Debugger Drivers
### Programmer/Debugger Drivers

Now its the time to install your programer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere.
If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufuturer of your tool.
Now it's time to install your programmer's drivers. This tutorial was made using an ST-Link v2 which you can get from almost anywhere.
If you have an ST-Link the drivers can be found [here](https://www.st.com/en/development-tools/stsw-link009.html) otherwise consult the manufacturer of your tool.

### OpenOCD

Expand Down Expand Up @@ -84,4 +84,4 @@ Reset your keyboard.
Press the bug icon and if all goes well you should soon find yourself in the debug perspective. Here the program counter will pause at the beginning of the main function and way for you to press Play. Most of the features of all debuggers work on ARM MCUs but for exact details google is your friend!


Happy debugging!
Happy debugging!
44 changes: 37 additions & 7 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ qmk setup # This will clone `qmk/qmk_firmware` and optionally set up your build
We are looking for people to create and maintain a `qmk` package for more operating systems. If you would like to create a package for your OS please follow these guidelines:

* Follow best practices for your OS when they conflict with these guidelines
* Documment why in a comment when you do deviate
* Document why in a comment when you do deviate
* Install using a virtualenv
* Instruct the user to set the environment variable `QMK_HOME` to have the firmware source checked out somewhere other than `~/qmk_firmware`.

Expand All @@ -69,6 +69,16 @@ There are some limitations to the local CLI compared to the global CLI:

# CLI Commands

## `qmk cformat`

This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.

**Usage**:

```
qmk cformat [file1] [file2] [...] [fileN]
```

## `qmk compile`

This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm> or compile keymaps in the repo.
Expand All @@ -85,24 +95,24 @@ qmk compile <configuratorExport.json>
qmk compile -kb <keyboard_name> -km <keymap_name>
```

## `qmk cformat`
## `qmk config`

This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files.
This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).

**Usage**:

```
qmk cformat [file1] [file2] [...] [fileN]
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
```

## `qmk config`
## `qmk docs`

This command lets you configure the behavior of QMK. For the full `qmk config` documentation see [CLI Configuration](cli_configuration.md).
This command starts a local HTTP server which you can use for browsing or improving the docs. Default port is 8936.

**Usage**:

```
qmk config [-ro] [config_token1] [config_token2] [...] [config_tokenN]
qmk docs [-p PORT]
```

## `qmk doctor`
Expand All @@ -115,6 +125,26 @@ This command examines your environment and alerts you to potential build or flas
qmk doctor
```

## `qmk json-keymap`

Creates a keymap.c from a QMK Configurator export.

**Usage**:

```
qmk json-keymap [-o OUTPUT] filename
```

## `qmk list-keyboards`

This command lists all the keyboards currently defined in `qmk_firmware`

**Usage**:

```
qmk list-keyboards
```

## `qmk new-keymap`

This command creates a new keymap based on a keyboard's existing default keymap.
Expand Down
14 changes: 7 additions & 7 deletions docs/coding_conventions_c.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ Here is an example for easy reference:
```c
/* Enums for foo */
enum foo_state {
FOO_BAR,
FOO_BAZ,
FOO_BAR,
FOO_BAZ,
};

/* Returns a value */
int foo(void) {
if (some_condition) {
return FOO_BAR;
} else {
return -1;
}
if (some_condition) {
return FOO_BAR;
} else {
return -1;
}
}
```
Expand Down
Loading

0 comments on commit dce8c6b

Please sign in to comment.