Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qmk/qmk_firmware
Browse files Browse the repository at this point in the history
* 'master' of https://github.com/qmk/qmk_firmware: (87 commits)
  [Keyboard] KBD67: enable bootmagic lite by default (qmk#4931)
  [Keymap] Adding keymap for Nyquist (qmk#4918)
  Optimize/Update the new_project script (qmk#4920)
  Remove lfkeyboards parent rules.mk as its only required for mini1800
  [Keyboard] Add BDN9 (qmk#4919)
  [Keyboard] Add KBD67 Hotswap Support (qmk#4916)
  Fixup the clueboard 66 info.json
  Clueboard refresh (qmk#4902)
  Give the keymap folder the proper name
  Fix layouts/default/66_iso keymap
  [Keyboard] Add DataHand keyboard support (qmk#4847)
  [Keymap] Add a compile-time provided macro and assign to _FL (qmk#4908)
  Added info.json for TGR Alice
  Always read two bytes from the endpoint if we have two bytes to read
  Rename i2c_slave functions so it can coexist with i2c_master (qmk#4875)
  Fix for ISO layout in tada68:rys (qmk#4906)
  [Keyboard] Added TGR Alice keyboard support (qmk#4896)
  handwired/retro_refit: refactor, Configurator support and readme update (qmk#4899)
  Initial fixes for vagrant (qmk#4900)
  Tidy up IS_{,HOST_}LED_{ON,OFF} macros (qmk#4894)
  ...
  • Loading branch information
Shinichi-Ohki committed Jan 24, 2019
2 parents 981cea7 + 5d1ea88 commit 11284ba
Show file tree
Hide file tree
Showing 785 changed files with 17,172 additions and 10,258 deletions.
31 changes: 18 additions & 13 deletions Vagrantfile
Expand Up @@ -2,8 +2,11 @@
# vi: set ft=ruby :

Vagrant.configure(2) do |config|
# VMware/Virtualbox 64 bit
config.vm.box = "phusion/ubuntu-14.04-amd64"
# define a name instead of just 'default'
config.vm.define "qmk_firmware"

# VMware/Virtualbox ( and also Hyperv/Parallels) 64 bit
config.vm.box = "bento/ubuntu-16.04"

# This section allows you to customize the Virtualbox VM
# settings, ie showing the GUI or upping the memory
Expand All @@ -15,13 +18,16 @@ Vagrant.configure(2) do |config|
# your Teensy via the VM rather than your host OS
#vb.customize ['modifyvm', :id, '--usb', 'on']
#vb.customize ['usbfilter', 'add', '0',
# '--target', :id,
# '--name', 'teensy',
# '--vendorid', '0x16c0',
# '--productid','0x0478'
# ]
# '--target', :id,
# '--name', 'teensy',
# '--vendorid', '0x16c0',
# '--productid','0x0478'
# ]
# Customize the amount of memory on the VM:
vb.memory = "512"
# Uncomment the below lines if you have time sync
# issues with make and incremental builds
#vb.customize [ "guestproperty", "set", :id, "/VirtualBox/GuestAdd/VBoxService/--timesync-set-threshold", 1000 ]
end

# This section allows you to customize the VMware VM
Expand Down Expand Up @@ -56,19 +62,18 @@ Vagrant.configure(2) do |config|
# This script ensures the required packages for AVR programming are installed
# It also ensures the system always gets the latest updates when powered on
# If this causes issues you can run a 'vagrant destroy' and then
# add a # before ,args: and run 'vagrant up' to get a working
# add a # before ,run: (or change "always" to "once") and run 'vagrant up' to get a working
# non-updated box and then attempt to troubleshoot or open a Github issue

config.vm.provision "shell", run: "always", path: "./util/qmk_install.sh", args: "-update"
config.vm.provision "shell", inline: "/bin/sh -c 'yes | /vagrant/util/qmk_install.sh'", run: "always"

config.vm.post_up_message = <<-EOT
Log into the VM using 'vagrant ssh'. QMK directory synchronized with host is
located at /vagrant
To compile the .hex files use make command inside this directory.
To compile the .hex files use make command inside this directory, e.g.
cd /vagrant
make <keyboard>:default
QMK's make format recently changed to use folder locations and colons:
make project_folder:keymap[:target]
Examples:
make planck/rev4:default:dfu
make planck:default
Expand Down
87 changes: 54 additions & 33 deletions build_keyboard.mk
Expand Up @@ -16,6 +16,7 @@ include common.mk
KEYBOARD_FILESAFE := $(subst /,_,$(KEYBOARD))
TARGET ?= $(KEYBOARD_FILESAFE)_$(KEYMAP)
KEYBOARD_OUTPUT := $(BUILD_DIR)/obj_$(KEYBOARD_FILESAFE)
STM32_PATH := quantum/stm32

# Force expansion
TARGET := $(TARGET)
Expand Down Expand Up @@ -72,6 +73,7 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/)","")
KEYBOARD_PATHS += $(KEYBOARD_PATH_1)
endif


# Pull in rules.mk files from all our subfolders
ifneq ("$(wildcard $(KEYBOARD_PATH_5)/rules.mk)","")
include $(KEYBOARD_PATH_5)/rules.mk
Expand All @@ -89,6 +91,58 @@ ifneq ("$(wildcard $(KEYBOARD_PATH_1)/rules.mk)","")
include $(KEYBOARD_PATH_1)/rules.mk
endif


MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)

ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
else ifneq ($(LAYOUTS),)
include build_layout.mk
else
$(error Could not find keymap)
# this state should never be reached
endif

ifeq ($(strip $(CTPC)), yes)
CONVERT_TO_PROTON_C=yes
endif

ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
TARGET := $(TARGET)_proton_c
include $(STM32_PATH)/proton_c.mk
OPT_DEFS += -DCONVERT_TO_PROTON_C
endif

include quantum/mcu_selection.mk

ifdef MCU_FAMILY
OPT_DEFS += -DQMK_STM32
KEYBOARD_PATHS += $(STM32_PATH)
endif


# Find all the C source files to be compiled in subfolders.
KEYBOARD_SRC :=

Expand Down Expand Up @@ -227,39 +281,6 @@ PROJECT_DEFS := $(OPT_DEFS)
PROJECT_INC := $(VPATH) $(EXTRAINCDIRS) $(KEYBOARD_PATHS)
PROJECT_CONFIG := $(CONFIG_H)

MAIN_KEYMAP_PATH_1 := $(KEYBOARD_PATH_1)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_2 := $(KEYBOARD_PATH_2)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_3 := $(KEYBOARD_PATH_3)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_4 := $(KEYBOARD_PATH_4)/keymaps/$(KEYMAP)
MAIN_KEYMAP_PATH_5 := $(KEYBOARD_PATH_5)/keymaps/$(KEYMAP)

ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_5)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_5)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_5)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_5)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_4)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_4)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_4)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_4)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_3)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_3)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_3)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_3)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_2)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_2)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_2)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_2)
else ifneq ("$(wildcard $(MAIN_KEYMAP_PATH_1)/keymap.c)","")
-include $(MAIN_KEYMAP_PATH_1)/rules.mk
KEYMAP_C := $(MAIN_KEYMAP_PATH_1)/keymap.c
KEYMAP_PATH := $(MAIN_KEYMAP_PATH_1)
else ifneq ($(LAYOUTS),)
include build_layout.mk
else
$(error Could not find keymap)
# this state should never be reached
endif

# Userspace setup and definitions
ifeq ("$(USER_NAME)","")
USER_NAME := $(KEYMAP)
Expand Down
21 changes: 18 additions & 3 deletions common_features.mk
Expand Up @@ -254,6 +254,7 @@ QUANTUM_SRC:= \
$(QUANTUM_DIR)/keymap_common.c \
$(QUANTUM_DIR)/keycode_config.c

# Include the standard or split matrix code if needed
ifneq ($(strip $(CUSTOM_MATRIX)), yes)
ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/matrix.c
Expand All @@ -262,11 +263,25 @@ ifneq ($(strip $(CUSTOM_MATRIX)), yes)
endif
endif

# Include the standard debounce code if needed
ifneq ($(strip $(CUSTOM_DEBOUNCE)), yes)
QUANTUM_SRC += $(QUANTUM_DIR)/debounce.c
endif

ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
OPT_DEFS += -DSPLIT_KEYBOARD

# Include files used by all split keyboards
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_flags.c \
$(QUANTUM_DIR)/split_common/split_util.c
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/serial.c
$(QUANTUM_DIR)/split_common/split_util.c

# Determine which (if any) transport files are required
ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c
# Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
# Unused functions are pruned away, which is why we can add both drivers here without bloat.
QUANTUM_LIB_SRC += $(QUANTUM_DIR)/split_common/i2c.c \
$(QUANTUM_DIR)/split_common/serial.c
endif
COMMON_VPATH += $(QUANTUM_PATH)/split_common
endif
100 changes: 0 additions & 100 deletions docs/_sidebar.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/_summary.md
Expand Up @@ -81,6 +81,8 @@
* [ISP Flashing Guide](isp_flashing_guide.md)
* [ARM Debugging Guide](arm_debugging.md)
* [I2C Driver](i2c_driver.md)
* [GPIO Controls](internals_gpio_control.md)
* [Proton C Conversion](proton_c_conversion.md)

* For a Deeper Understanding
* [How Keyboards Work](how_keyboards_work.md)
Expand Down
15 changes: 11 additions & 4 deletions docs/config_options.md
Expand Up @@ -109,9 +109,9 @@ If you define these options you will disable the associated feature, which can s
* `#define NO_ACTION_ONESHOT`
* disable one-shot modifiers
* `#define NO_ACTION_MACRO`
* disable all macro handling
* disable old style macro handling: MACRO() & action_get_macro
* `#define NO_ACTION_FUNCTION`
* disable the action function (deprecated)
* disable calling of action_function() from the fn_actions array (deprecated)

## Features That Can Be Enabled

Expand Down Expand Up @@ -143,7 +143,7 @@ If you define these options you will enable the associated feature, which may in
* Breaks any Tap Toggle functionality (`TT` or the One Shot Tap Toggle)
* `#define LEADER_TIMEOUT 300`
* how long before the leader key times out
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
* If you're having issues finishing the sequence before it times out, you may need to increase the timeout setting. Or you may want to enable the `LEADER_PER_KEY_TIMING` option, which resets the timeout after each key is tapped.
* `#define LEADER_PER_KEY_TIMING`
* sets the timer for leader key chords to run on each key press rather than overall
* `#define LEADER_KEY_STRICT_KEY_PROCESSING`
Expand Down Expand Up @@ -197,6 +197,9 @@ If you define these options you will enable the associated feature, which may in

Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk

* `SPLIT_TRANSPORT = custom`
* Allows replacing the standard split communication routines with a custom one. ARM based split keyboards must use this at present.

### Setting Handedness

One thing to remember, the side that the USB port is plugged into is always the master half. The side not plugged into USB is the slave.
Expand All @@ -208,7 +211,7 @@ There are a few different ways to set handedness for split keyboards (listed in
3. Set `MASTER_RIGHT`: Half that is plugged into the USB port is determined to be the master and right half (inverse of the default)
4. Default: The side that is plugged into the USB port is the master half and is assumed to be the left half. The slave side is the right half

* `#define SPLIT_HAND_PIN B7`
* `#define SPLIT_HAND_PIN B7`
* For using high/low pin to determine handedness, low = right hand, high = left hand. Replace `B7` with the pin you are using. This is optional, and if you leave `SPLIT_HAND_PIN` undefined, then you can still use the EE_HANDS method or MASTER_LEFT / MASTER_RIGHT defines like the stock Let's Split uses.

* `#define EE_HANDS` (only works if `SPLIT_HAND_PIN` is not defined)
Expand Down Expand Up @@ -302,6 +305,10 @@ Use these to enable or disable building certain features. The more you have enab
* Current options are AdafruitEzKey, AdafruitBLE, RN42
* `SPLIT_KEYBOARD`
* Enables split keyboard support (dual MCU like the let's split and bakingpy's boards) and includes all necessary files located at quantum/split_common
* `CUSTOM_MATRIX`
* Allows replacing the standard matrix scanning routine with a custom one.
* `CUSTOM_DEBOUNCE`
* Allows replacing the standard key debouncing routine with a custom one.
* `WAIT_FOR_USB`
* Forces the keyboard to wait for a USB connection to be established before it starts up
* `NO_USB_STARTUP_CHECK`
Expand Down

0 comments on commit 11284ba

Please sign in to comment.