Commit Graph

485 Commits (cb149650efd07cbdc3cacb1fe2eb58f17eee5965)

Author SHA1 Message Date
patrickmt 118d5cc03f Fix macro redefinition for GNUC compilers > 6
GNUC compilers greater than version 6 already have the macro __always_inline defined. This fix checks GNUC version before defining the macro itself.
2018-12-14 12:47:17 -08:00
Drashna Jaelre 02d44beb44 Fix up tap_code functionality (#4609)
* Add delay in Tap Code to avoid issues

I think a few people have reporting issues with it working properly, and it may be a timing issue.  The 'register_code' uses this sort of delay in some of the functions, and
this is probably why.

Adding the 100ms delay should hopefully fix any issues with it.

* Make tap_code delay configurable

* Update documentation

* Bring tap_code16 inline with changes

* Fix type for tap_code16

Bad copy-paste job

* Just use the value check for the define

* Clarify timing in docs

Co-Authored-By: drashna <drashna@live.com>

* Wordsmithing

Co-Authored-By: drashna <drashna@live.com>
2018-12-14 09:01:58 -08:00
Konstantin Đorđević 28fbf84cc5 Add standard definitions for ALGR and KC_ALGR (#4389)
* Add standard ALGR defition, remove (re)definitions from language files

* Use ALGR(kc) consistently in ALTGR(kc) aliases

* Non-Nordic keymaps should not use NO_ALGR

* Add standard KC_ALGR definition

* Update docs with ALGR and KC_ALGR

* Update SS_ALGR and ALGR_T aliases
2018-12-12 10:17:19 -08:00
patrickmt 4a5e68f4f2 Bringing Massdrop keyboard hardware configuration to keyboard level (#4593)
MCU Pins for debugging, LED, boot tracing, and shift registers are now configurable at keyboard level.
Macros led_* replaced by DBG_LED_*
Macros m15_* replaced by DBG_1_*
Macros m27_* replaced by DBG_2_*
Macros m28_* replaced by DBG_3_*
For CTRL and ALT keyboards, debug boot tracing pin default now set to pad M27 instead of M28 since although M28 is not being used, it is technically a signal for USB port detection.
m15_print(...) renamed to dbg_print(...) to get away from hard coded port names.
dbg_print function now follows similar pattern to debug led output.
2018-12-10 11:28:06 -08:00
Ian O'Dea 21bc230dfd Vertical animation support for arm_atsam led_matrix (#4538)
* Add initial support for vertically-oriented animations

* DRY up vertical animation support

* Fix animation code for arm_atsam led_matrix to work in all directions

* Adjust py calculation to base off bottom rather than top
2018-12-06 08:58:58 -08:00
fauxpark d6b7ca04f2 Only try to read the report ID from SetReport when the keyboard is part of the shared EP
Fixes #4471
Fixes #4517
2018-12-05 08:50:29 -08:00
ishtob 4099536c0e adding Hadron v3 keyboard, QWIIC devices support, haptic feedback support (#4462)
* add initial support for hadron ver3

* add initial support for hadron ver3

* pull qwiic support for micro_led to be modified for use in hadron's 64x24 ssd1306 oled display

* initial work on OLED using qwiic driver

* early work to get 128x32 oled working by redefining qwiic micro oled parameters. Currently working, but would affect qwiic's micro oled functionality

* moved oled defines to config.h and added ifndef to micro_oled driver

* WORKING :D - note, still work in progress to get the start location correct on the 128x32 display.

* added equation to automatically calculate display offset based on screen width

* adding time-out timer to oled display

* changed read lock staus via read_led_state

* lock indications fixes

* Added scroll lock indication to oled

* add support for DRV2605 haptic driver

* Improve readabiity of DRV2605 driver.
-added typedef for waveform library
-added unions for registers

* Update keyboards/hadron/ver2/keymaps/default/config.h

Co-Authored-By: ishtob <ishtob@gmail.com>

* Update keyboards/hadron/ver2/keymaps/default/config.h

Co-Authored-By: ishtob <ishtob@gmail.com>

* Update keyboards/hadron/ver2/keymaps/default/config.h

Co-Authored-By: ishtob <ishtob@gmail.com>

* Update keyboards/hadron/ver2/keymaps/default/config.h

Co-Authored-By: ishtob <ishtob@gmail.com>

* Fixes for PR

* PR fixes

* fix old persistent layer function to use new set_single_persistent_default_layer

* fix issues with changing makefile defines that broken per-key haptic pulse

* Comment fixes

* Add definable parameter and auto-calibration based on motor choice
2018-12-04 08:04:57 -08:00
Giuseppe Rota 8b85ec2a98 Add Extrakey support for Brightness up/down (#4477) 2018-11-28 08:19:07 -08:00
Christon DeWan 55c3214877 fixed misplaced paranthesis in arm usb mouse send function (#4478)
bug was causing lots of dropped events for me.
2018-11-27 15:20:17 -08:00
mtei 90f9fb4eee Fixed docs/newbs_testing_debugging.md and tmk_core/common/print.h 2018-11-27 14:40:19 -05:00
yiancar 87f06e7297 Fix raw hid define for chibios (#4460) 2018-11-21 15:12:40 -08:00
James Laird-Wah 39bd760faf Use a single endpoint for HID reports (#3951)
* Unify multiple HID interfaces into one

This reduces the number of USB endpoints required, which frees them up
for other things.

NKRO and EXTRAKEY always use the shared endpoint.

By default, MOUSEKEY also uses it. This means it won't work as a Boot
Procotol mouse in some BIOSes, etc. If you really think your
keyboard needs to work as a mouse in your BIOS, set
MOUSE_SHARED_EP = no in your rules.mk.

By default, the core keyboard does not use the shared endpoint, as not
all BIOSes are standards compliant and that's one place you don't want
to find out your keyboard doesn't work.. If you are really confident,
you can set KEYBOARD_SHARED_EP = yes to use the shared endpoint here
too.

* unify endpoints: ChibiOS protocol implementation

* fixup: missing #ifdef EXTRAKEY_ENABLEs

broke build on AVR with EXTRAKEY disabled

* endpoints: restore error when too many endpoints required

* lufa: wait up to 10ms to send keyboard input

This avoids packets being dropped when two reports are sent in quick
succession (eg. releasing a dual role key).

* endpoints: fix compile on ARM_ATSAM

* endpoint: ARM_ATSAM fixes

No longer use wrong or unexpected endpoint IDs

* endpoints: accommodate VUSB protocol

V-USB has its own, understandably simple ideas about the report formats.
It already blasts the mouse and extrakeys through one endpoint with
report IDs. We just stay out of its way.

* endpoints: document new endpoint configuration options

* endpoints: respect keyboard_report->mods in NKRO

The caller(s) of host_keyboard_send expect to be able to just drop
modifiers in the mods field and not worry about whether NKRO is in use.
This is a good thing. So we just shift it over if needs be.

* endpoints: report.c: update for new keyboard_report format
2018-11-15 22:22:05 -08:00
Phillip Tennen 0cda2f43e2 Backlight status functions (#4259)
* add functions to set specific backlight state

* add function to query backlight state

* update documentation with new backlight functions

* Update tmk_core/common/backlight.c

Co-Authored-By: codyd51 <phillip.ennen@gmail.com>

* Update tmk_core/common/backlight.h

Co-Authored-By: codyd51 <phillip.ennen@gmail.com>

* update docs for is_backlight_enabled() name change
2018-11-14 07:45:46 -08:00
Sean Dwyer 63e212c0b7 Add localized LED flash effect on keypress to Massdrop ALT (#4340) 2018-11-06 11:54:53 -08:00
Drashna Jaelre 388df5359b Fix Spacing issue in makefile that breaks Terminal config 2018-11-06 11:31:40 -05:00
Drashna Jaelre 73e634482e command.h include was not set correctly 2018-11-06 00:40:30 -05:00
Drashna Jaelre 40313cfa3b Fix Terminal feature on ChibiOS 2018-11-06 00:40:02 -05:00
patrickmt cec203ea80 USB Suspend for arm_atsam protocol
Rewrote USB state tracking for implementation of suspend state.
Updated suspend.c in entirety.
Main subtasks (generally hardware related) are now run prior to keyboard task.
2018-11-02 14:33:07 -07:00
patrickmt 563fe23e53 Fix CTRL/ALT keyboard does not wake computer from sleep
Fix for Massdrop CTRL and ALT keyboards not waking computer from sleep
2018-11-02 14:33:07 -07:00
Danny Nguyen a5fa75fcb3 Move disable JTAG code from `keyboard_init` to `keyboard_setup`
This way all split keyboards are using that code instead of just those using split_common with the fix
2018-11-02 14:31:29 -07:00
Jack Humbert 15f6278aa6
Add support for Atmega32A to pin declarations and universal matrix (#4015)
* add computed pins from mcu type

* update for atmega32a

* doc typo

* add atmega16 chips, link to references

* remove avr include from config

* exclude assembler in config.h includes

* consolodate options, add 646

* fix typo in pindef
2018-11-02 12:31:40 -04:00
patrickmt cd23984afc Fix undefined reference to `console_printf` for CTRL and ALT keyboards
Fix undefined reference to `console_printf` for CTRL and ALT keyboards when enabling CONSOLE_ENABLE
2018-10-29 10:26:30 -07:00
Drashna Jaelre 4ffcacd920 Add Bootmagic Lite to QMK (#4215)
* Preliminary additon of bootmagic lite functionality

* Cleanup code

* Clean up bootmagic code

* Add documentation and clean up code

* Make 'lite' an option for BOOTMAGIC_ENABLE

* Update Templates with note about Bootmagic Lite option

* Detect Debounce variable

* Make sure debounce is a non-zero number

* Capitalize Bootmagic

* Capitalize bootmagic

* Update wording

* Re-add EEPROM reset, by popular demand

And add eeprom-less version to drashna userspace for his sanity

* Fix spacing

* Set BOOTMAGIC_ENABLE to use full/lite/off

And default yes to "full" for compatibility

* Add Bootmagic lite info to templates

* Remove text from makefiles

* Cleanup of makefile

* mention yes in bootmagic docs

* Wordsmitthing the docs

* Fix white spaces

* Readd default bootmagic setting, because it's necessary
2018-10-27 14:53:50 -04:00
Drashna Jaelre f16b5cc92b Add delayed flashing option for DFU Util (#4225)
* Add delayed flashing option for DFU Util

* Use a loop to make code cleaner

* Make delay configurable but default to 10

* Better formatting of check
2018-10-27 00:21:43 -04:00
Drashna Jaelre b1bf0879ad Fix mouse_send() on chibiOS so it won't lock up the firmware 2018-10-27 00:17:25 -04:00
Ajax b0a021c07a Made a userspace that allows you to use your keyboard as an order of operations based calculator (#2864)
* Made DZ60 layout with calculator

* Cleaned up and commented, preparing to fix bug with negative in front of open parenthesis as first character

* Fixed bug where negative sign infront of parenthesis as first character was parsed incorrectly

* Made a better solution for the bug from the previous commit

* Modularized and added a userfile so that this code can be used on various keyboards, found in doogle999

* Removed commented code from keymap

* Made the layer that is used for calculations a define so that it can be changed per keyboard

* Made the readme

* Made the readme in the correct place

* Revert "Made the readme in the correct place"

This reverts commit 7f8b59ed9e59c77401a48be3a7ac1e8fd8e84e32.

* Manually synced with qmk upstream

* Stopped repeat, made keys print character that they are defined as rather than what the keyboard wants them to do

* Added support for numpad, might make all keycodes custom so that there is no need to change doogle999.c if you want to change the keycode that is associated with a function, also made numpad automatically activating an option

* Fixed some bugs with backspacing, updated the readme

* Fixed some bugs with numlock turning on at the wrong times when a shift key was down

* Made the return to layer work automatically instead of just forcing it to layer 0

* fixes and style changes, 20% decreased binary size

* Fixed some bugs with double printing and compilation errors on my side

* Fixed bug with exceeding the buffer size

* Removed changes that added const-ness

* Made changes so that backspace does not repeat to remove backspace bugs, still some bugs with recalculating without having typed anything

* Fixed obo error with calc main loop

* Made includes more accurate in keymap for dz60

* Moved flags to user makefile
2018-10-23 12:44:48 -07:00
markspanbroek 6d7745a110 Keyboard: Port of TMK XT USB Converter (#3619)
* Converter: add XT USB converter from TMK

* Converter: port TMK code for USB converter to QMK

* Apply requested changes after code review by @drashna

- use "pragma once" instead of include guards
- use LAYOUT instead of KEYMAP
- allow customisation with matrix_init_user() and matrix_scan_user()
- set BOOTLOADER instead of BOOTLOADER_SIZE
- Add XT_ENABLE to OPT_DEFS

* Remove unnecessary lines
2018-10-22 12:37:03 -07:00
a-chol 8e3330bbf6 Keyboard: bminiex : Working backlight (#4171)
* bminiex : Working backlight

* bminiex keyboard with fixes

* bminiex keyboard more fixes
2018-10-21 09:20:24 -07:00
Takuya Urakawa f4094930a3 stm32f1xx EEPROM emulation (#3914)
* * Add stm32f1xx EEPROM emulation
* Fix eeprom update compare bug

Squashed commit of the following:

commit b8f248ae08cec0cd81ecbb8854d9b39221d4d573
Author: hsgw <urkwtky@gmail.com>
Date:   Sat Sep 15 19:13:48 2018 +0900

    fix EEPROM_update wrong compare

commit d4ed4e6ea864e967a3e17f7edee4b0c3b4a25541
Author: hsgw <urkwtky@gmail.com>
Date:   Sat Sep 15 17:43:47 2018 +0900

    eeprom fix initialization define

commit b61aa7c04d70c64df3416d63e5da08b73b6053af
Author: hsgw <urkwtky@gmail.com>
Date:   Sat Sep 15 16:33:40 2018 +0900

    maybe working

* Fix FLASH_KEY defines
2018-10-19 00:33:23 -04:00
patrickmt ab91e07753 Massdrop keyboards console device support for hid_listen
Added hid_listen USB device for arm_atsam USB protocol.
Debug printing is now done through the console device (CONSOLE_ENABLE = yes) rather than the virtser device, for viewing in hid_listen.
Function dpf(...) renamed to CDC_printf(...) and should now be called directly if intending to print to the virtual serial device.
2018-10-10 13:49:01 -04:00
Drashna Jaelre dad579c8f8 Add mousekey_send to (un)register_code 2018-10-04 10:44:28 -04:00
Drashna Jaelre 26f4e7031a Add tap_code function (#3784)
* Add tap_code

* formatting

* Doc clarification

* Rename variable to make more consistent
2018-10-01 20:53:47 -04:00
Drashna Jaelre e885c793bc Add Function level EECONFIG code for EEPROM (#3084)
* Add Function level EEPROM configuration

Add kb and user functions for EEPROM, and example of how to use it.

* Bug fixes and demo

* Additional cleanup

* Add EEPROM reset macro to example

* Forgot init function in list

* Move eeconfig_init_quantum function to quantum.c and actually set default layer

* See if removing weak quantum function fixes issue

* Fix travis compile error

* Remove ifdef blocks from EECONFIG so settings are always set

* Fix for ARM EEPROM updates

* Fix merge issues

* Fix potential STM32 EEPROM issues
2018-10-01 20:53:14 -04:00
Drashna Jaelre 4318797d19 Add user level to default_layer_state_set 2018-10-01 12:58:46 -04:00
patrickmt daf0cc60bf CTRL keyboard bootloader_jump support
Adds support for CTRL keyboards to enter bootloader via bootloader_jump()
2018-09-28 23:09:53 -04:00
patrickmt 239f02408e Massdrop keyboard updates for SEND_STRING, syscalls, stdio, debug prints, Auto Shift (#3973)
* Update for SEND_STRING usage

Update for SEND_STRING usage.
Sending keyboard reports (kbd, nkro) now obey the minimum polling time.
While attempting to send a keyboard report and waiting for a USB poll, other functions of the keyboard, including LED effects and power management, will continue to operate at their intended intervals.

* Updates for send string, syscalls, stdio, debug prints, auto shift

Now properly waiting for previous keys sent over USB to complete before sending new.
Added heap to linker and now compiling with syscalls support.
Removed custom string functions and now using stdio.
dprintf now works as intended through virtser device.

* CTRL and ALT keymap updates

CTRL mac keymap updated
ALT default and mac keymap updated
ALT rules.mk added Auto Shift with default no

* Code cleanup as per discussion with vomindoraan

Code cleanup as per discussion with vomindoraan
2018-09-28 21:32:15 -04:00
Takuya Urakawa e2dee054d0 add st-link_cli flashing (#3899)
* add st-link_cli support

* format names
2018-09-28 21:30:44 -04:00
Takeshi ISHII baebbc0967 add 'mavrdude' target into tmk_core/avr.mk (#3986)
* add 'mavrdude' target into tmk_core/avr.mk

I made it a little convenient when writing the same binary to multiple Pro Micro.

* rename target name 'mavrdude' to 'avrdude-loop'

* modify docs/flashing.md about avrdude-loop

* mdify docs/flashing.md again

* modifi docs/flashing.md 3rd
2018-09-27 22:02:12 -04:00
skullydazed 8ef747accf
Treat too-large firmwares as an error, not a warning (#3956)
* Treat too-large firmwares as an error, not a warning

* switch the order of printing

* I think I have it

* adjust the formatting some more
2018-09-27 13:32:01 -07:00
Joe Wasson 743449472e Make `PREVENT_STUCK_MODIFIERS` the default (#3107)
* Remove chording as it is not documented, not used, and needs work.

* Make Leader Key an optional feature.

* Switch from `PREVENT_STUCK_MODIFIERS` to `STRICT_LAYER_RELEASE`

* Remove `#define PREVENT_STUCK_MODIFIERS` from keymaps.
2018-09-17 13:48:02 -04:00
Wilba6582 48a992f1c0 Zeal60/Zeal65/M60-A implementation (#3879)
* Initial version of zeal60

* WIP

* Fixes issue #900

* Adding RGB underglow functionality.
Fixed a compile-time conflict caused by enabling RGB underglow functionality.

* Refactor RPC protocol

* Fix last merge

* README for RGB underglow updated.

* Additional README changes.

* Adding RGBW strip software-based current-limiting functionality.

* RGBW current-limiting functionality should be handled by RGBSTRIP_MAX_CURRENT_PER_LIGHT instead.

* Updated README to reflect implementation of built-in current limiting.

* Keymap readability improvements.

* Minor keymap improvements.

* Fixed LED driver init sequence, formatting

* Dimming implementation tested, working.

* Stab LEDs synced with spacebar hits in effects.

* RGB underglow tested and functional. Simplified README for RGB underglow.

* Undid accidental file deletion from previous merge conflict. Safer values for RGB underglow.

* Improved arrow key positions in keymap.

* Added functionality to correct uneven RGB underglow. Refactored related code.

* Reverted to safer values for underglow.

* Changes for v0.3

* Custom LED brightness scaling will take place after current adjustment in order to avoid being overridden.

* Create keymap.c

Added split backspace and split shift to ISO layout

* Create config.h

Turned on LEDs for new layout

* Fixed bug where left spacebar stabilizer LED (LC06) would adopt color of row above.

* Added hhkb_wilba keymap

* Update keymap.c

* Update keymap.c

* Update keymap.c

* Added indicators, full param setting via host

* Added "mousekey" layout

* Added Zeal65 support, factory test mode

* Keycode safe range changed, caused bugs

* Bumped EEPROM version due to change in QMK keycodes

* Disable HHKB "blocked" LEDs if KC_NO in keymap

* Added "disable_hhkb_blocker_leds"

* Required overridden function for keymaps in EEPROM

* Added polar coordinate mapping, effect speed

* Force Raw HID interface number to 1 always

* Fixed last merge from master

* Added effect speed to default keymaps

* add BACKLIGHT_ prefix to vars

* add BACKLIGHT_ prefix to vars

* Keymap speed effect; keymap improvements/fixes
Readme updated to match changes

* Refactored to use common IS31FL3731/I2C drivers

* Fixed make rules, backlight disabled feature

* Make split rightshift default for Zeal65

* Added M60-A as a "version" of Zeal60.

* Renamed IS31FL3731 driver functions

* Fix suspend_wakeup_init_kb() being defined twice

* First pass refactor dynamic keymaps

* Updated to changed I2C and ISSI drivers

* Refactor zeal_color.* usage to quantum/color.*

* Updated Zeal65, fixed dynamic_keymap

* Major refactoring of Zeal60 backlight and API

* Lots of little cleanups

* Added readme.md

* Added readme.md

* Added LAYOUT_60*() macros, refactored and cleaned up default keymaps

* Fix compile error in suspend.c

* Added Zeal65 LAYOUT macros, info.json

* Added rama/m60_a, deleted zeal60/keymaps/m60_a

* Fixed rama/m60_a/keymaps/proto

* Fixed compilation error for suspend.c

* Requested changes for PR

* Fixed readme.md images

* Another readme.md fix

* Added drashna's requested changes
2018-09-13 14:37:13 -04:00
Takeshi ISHII 6d6d91c834 rgblight.[ch] more configurable (#3582)
* add temporary test code rgblight-macro-test1.[ch]

* rgblight.h : mode auto numberring and auto generate mode name symbol

No change in build result.

* rgblight.c use RGBLIGHT_MODE_xxx symbols

No change in build result.

* quantum.c use RGBLIGHT_MODE_xxx symbols

No change in build result.

* fix build break. when RGB_MATRIX_ENABLE defined

* add temporary test code rgblight-macro-test2.[ch]

* modify rgblight_mode_eeprom_helper() and rgblight_sethsv_eeprom_helper()

* modify rgblight_task()

* configurable each effect compile on/off in config.h

* update docs/feature_rgblight.md

* fix conflict. docs/feature_rgblight.md

* remove temporary test code rgblight-macro-test*.[ch]

* fix comment typo.

* remove old mode number from comment

* update docs/feature_rgblight.md about effect mode

* Revert "update docs/feature_rgblight.md about effect mode"

This reverts commit 43890663fcc9dda1899df7a37d382fc38b1a6d6d.

* some change docs/feature_rgblight.md

* fix typo

* docs/feature_rgblight.md update: revise mode number table
2018-09-13 10:24:09 -07:00
patrickmt b8a0d3de3d Keyboard: ALT keymap update and LED driver brightness mismatch fix (#3890)
* ALT keymap update

Added additional End key on layer 1 to match key cap

* LED driver update addressing PR #3871

Update sync between IS31FL3733 drivers is causing varying behavior in keyboards including brightness mismatch and slight flicker at very low rgb values. Visually, disabling sync is not noticeable. Ref PR #3871 by guarnacciaa.
2018-09-13 09:17:26 -07:00
Drashna Jaelre 32ff7be266 Fix RG Sleep issues for Teensy Controllers
Appearenly, teensy controllers have some issues with waking up.  If the rgblight is called "too soon", it will cause the controller to lock up, intermittently. Adding a 10 ms
delay seems to fix this issue, as it lets it have enough time to handle things properly.

This has been tested extensively on my Ergodox EZ, and can be seen in the @drashna userspace, under the "suspend_wakeup_init_user" function.
2018-09-11 13:05:17 -07:00
patrickmt e5465e1c57 CTRL and ALT updates
Added support to enter bootloader from software (bootloader version must be newer than "v2.18Jun 22 2018 17:28:08" until workaround for older is created).
Updated CTRL and ALT keymaps for entering bootloader with Fn+b held for >500ms.
Added basic MacOS keymap for ALT.
USB sleep LED indicator now turns off after 1 second.
Slowed down debug LED code printing.
2018-09-05 11:14:31 -07:00
yiancar 73a3399d0e Add the ability to disable the USB startup check for Chibios
- Added support for NO_USB_STARTUP_CHECK. This allows the keyboard do function and not get stuck in a SUSPENDED state loop in case of no USB connection.
- Added support for WAIT_FOR_USB. In LUFA no keyboard has this flag enable therefor no keyboard waits for usb to be active.
- Added documentation for both configuration flags as they were missing.
2018-09-05 09:42:04 -04:00
Jack Humbert a14eb01883 fix mousekey call 2018-09-03 16:59:32 -07:00
Steven Liu fa1ee47cf2 Enable mouse keys in register_code and unregister_code
This allows for macros to be assigned to press two mouse directions at same time, which allows for one key diagonals.
2018-09-03 19:27:11 -04:00
patrickmt 2aa27f0c78 Keyboard: Rename alt67 to alt (#3824)
Renamed keyboard alt67 to alt and adjusted necessary files where alt67 appeared.
CTRL keymap fixed enum structure name.
usb2422 removed stray define no longer used.
2018-09-01 09:21:48 -07:00
ishtob 94f92cedef Fix emulated EEPROM start address on STM32F303 (#3819)
MCU has 254 flash, changed 250 to 254. tested working on a planck rev6
2018-08-31 07:37:13 -07:00