summaryrefslogtreecommitdiffstats
path: root/tmk_core/common
AgeCommit message (Collapse)AuthorFilesLines
2018-11-14Backlight status functions (#4259)Phillip Tennen2-6/+49
* 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-06command.h include was not set correctlyDrashna Jaelre1-4/+1
2018-11-06Fix Terminal feature on ChibiOSDrashna Jaelre1-0/+2
2018-11-02USB Suspend for arm_atsam protocolpatrickmt1-11/+79
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-02Move disable JTAG code from `keyboard_init` to `keyboard_setup`Danny Nguyen2-5/+11
This way all split keyboards are using that code instead of just those using split_common with the fix
2018-10-29Fix undefined reference to `console_printf` for CTRL and ALT keyboardspatrickmt1-2/+2
Fix undefined reference to `console_printf` for CTRL and ALT keyboards when enabling CONSOLE_ENABLE
2018-10-21Keyboard: bminiex : Working backlight (#4171)a-chol1-4/+1
* bminiex : Working backlight * bminiex keyboard with fixes * bminiex keyboard more fixes
2018-10-19stm32f1xx EEPROM emulation (#3914)Takuya Urakawa5-19/+33
* * 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-10Massdrop keyboards console device support for hid_listenpatrickmt2-2/+71
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-04Add mousekey_send to (un)register_codeDrashna Jaelre1-0/+2
2018-10-02Add tap_code function (#3784)Drashna Jaelre1-0/+1
* Add tap_code * formatting * Doc clarification * Rename variable to make more consistent
2018-10-02Add Function level EECONFIG code for EEPROM (#3084)Drashna Jaelre2-40/+107
* 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-01Add user level to default_layer_state_setDrashna Jaelre2-1/+12
2018-09-29CTRL keyboard bootloader_jump supportpatrickmt1-15/+17
Adds support for CTRL keyboards to enter bootloader via bootloader_jump()
2018-09-29Massdrop keyboard updates for SEND_STRING, syscalls, stdio, debug prints, ↵patrickmt2-2/+2
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-17Make `PREVENT_STUCK_MODIFIERS` the default (#3107)Joe Wasson4-5/+5
* 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-13Zeal60/Zeal65/M60-A implementation (#3879)Wilba65821-16/+21
* 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-13rgblight.[ch] more configurable (#3582)Takeshi ISHII1-0/+1
* 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-11Fix RG Sleep issues for Teensy ControllersDrashna Jaelre1-0/+3
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-05CTRL and ALT updatespatrickmt1-1/+31
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-04fix mousekey callJack Humbert1-6/+11
2018-09-04Enable mouse keys in register_code and unregister_codeSteven Liu1-0/+6
This allows for macros to be assigned to press two mouse directions at same time, which allows for one key diagonals.
2018-08-31Fix emulated EEPROM start address on STM32F303 (#3819)ishtob1-1/+1
MCU has 254 flash, changed 250 to 254. tested working on a planck rev6
2018-08-29STM32 EEPROM Emulation (#3741)yiancar7-0/+1022
* STM32 EEPROM Emulation - Added EEPROM emulation libaries from libmaple and Arduino_STM32. https://github.com/rogerclarkmelbourne/Arduino_STM32 and https://github.com/leaflabs/libmaple. - Renamed teensy EEPROM library and added conditional selection of library. - Remapped EEPROM memory map for 16 byte blocks (as is with STM32f3xx MCUs). - Added EEPROM initialization in main.c of Chibios. - Added EEPROM format to clear the emulated pages when EEPROM is marked as invalid. * Fixed ifdef
2018-08-29Massdrop keyboard support (#3780)patrickmt7-1/+235
* Massdrop SAMD51 Massdrop SAMD51 keyboards initial project upload * Removing relocated files Removing files that were relocated and not deleted from previous location * LED queue fix and cleaning Cleaned some white space or comments. Fix for LED I2C command queue. Cleaned up interrupts. Added debug function for printing numbers to scope through m15 line. * Factory programmed serial usage Ability to use factory programmed serial in hub and keyboard usb descriptors * USB serial number and bugfix Added support for factory programmed serial and usage. Incorporated bootloader's conditional compiling to align project closer. Fixed issue when USB device attempted to send before enabled. General white space and comment cleanup. * Project cleanup Cleaned up project in terms of white space, commented code, and unecessary files. NKRO keyboard is now using correct setreport although KBD was fine to use. Fixed broken linkage to __xprintf for serial debug statements. * Fix for extra keys Fixed possible USB hang on extra keys report set missing * I2C cleanup I2C cleanup and file renames necessary for master branch merge * Boot tracing and clocks cleanup Added optional boot debug trace mode through debug LED codes. General clock code cleanup. * Relocate ARM/Atmel headers Moved ARM/Atmel header folder from drivers to lib and made necessary makefile changes. * Pull request changes Pull request changes * Keymap and compile flag fix Keymap fix for momentary layer. Potential compile flag fix for Travis CI failure. * va_list include fix Fix for va_list compile failure * Include file case fixes Fixes for include files with incorrect case * ctrl and alt67 keyboard readme Added ctrl and alt67 keyboard readme files
2018-08-29Removed "debounce_algo = manual" in all keyboards with CUSTOM_MATRIX = yes.Alex Ong6-16/+260
2018-08-16Tidy up keycode.h (#3666)fauxpark1-397/+412
* Tidy up keycode.h * Fix spacing here * Add back this comma
2018-07-21add col type definesJack Humbert1-0/+10
2018-07-15Integrating Peter Fleury's HD44780 LCD library (#3209)Max Audron1-0/+3
* integrated Peter Fleury's LCD library for HD44780 LCDs * fixed typo * cleanup finished * add documentation * added HD44780 documentation * removed keyboard from .gitmodules * resolved merge conflict * removed edit of kira75s rules.mk made by merge * moved hd44780 to drivers/avr * Added licence info to hd44780 files * Added link to hd44780 docs.
2018-06-29Diagonal micro move fixEvgeniy Petukhov1-0/+2
2018-06-29Make sure that both RGBLIGHT_ENABLE is defined, for RGBLIGHT_SLEEPDrashna Jaelre1-3/+3
2018-06-28Disable JTAG in keyboard initDrashna Jaelre1-1/+6
So that all boards, present and future will have JTAG disabled, even if using a custom matrix
2018-06-28Make sure the timer wraps around correctly independent of the os tick frequencyFred Sundvik1-14/+28
2018-06-03Add Suspend functions (#3112)Drashna Jaelre3-0/+71
* Add suspend functions * Disable RGB code if it's disabled * Add suspend code to ChibiOS for future compatibility * Add keyboard_init functions * Change where references so it will compile * Wrong command chained in wake up kb function * Fix non-feature file changes * Add documentation * Re-add matrix init docs * add rgblight code to example * Remove keyboard init stuff for separate PR
2018-05-29Add and fix _noeeprom functions to many of the RGB Underglow functions (#3070)Drashna Jaelre1-2/+2
* And and fix _noeeprom functions to many of the RGB Underglow functions * Many functions are unnecessarily calling the eeprom write code. The toggle/enable is command is especially guilty of this, as it writes to EEPROM 3 times. But rgb mode writes twice, every time it's called. And init resets the rgb eeprom range and then writes back to it twice! * Fixed the rgblight_sethsv_noeeprom to work as expected, by moving a lot of the code to a helper function. * Added a noeeprom function for mode, enable, disable, and toggle functions. (didn't bother for increase/decrease stuff, and didn't add new keycodes) * Add to predefined colors list * Add new functions to manual/docs * Update RGB Sleep feature to use _noeeprom Because that's exactly what it should be doing, actually!
2018-05-26Fix dead link to USB keycodes doc (#3050)Leo Wzukw1-1/+2
* Fix dead link to USB keycodes doc Link was dead and the fresher version I could find on usb.org is still older than this one. Thus, WaybackMachine seems the best option. * Fix dead link to USB keycodes doc, with 2 options Give the WaybackMachine link (fresher and for reference of the content of the original link) and the usb.org one (older)
2018-05-21Fix compile issues for atmega328pDrashna Jaelre1-4/+4
2018-05-14Allow one-shot modifiers to be chainedGergely Nagy1-3/+3
Many a times one would want to use multiple modifiers with the same key, preferably without having to hold anything, like `Ctrl+Shift+C` or `Ctrl+Shift+V` to copy/paste in GNOME Terminal. To make this possible, we need to be able to chain one-shot modifiers, so that we can have multiple of them active at the same time. The easiest way to accomplish this is that whenever we activate a one-shot modifier, we apply it on top of the existing set, instead of re-setting the state. When deactivating, either due to an interrupt, or due to a timeout, we deactivate all oneshots anyway, so the clearing part is covered. When we turn the one-shot modifier into a toggle, that will also clear all one-shot modifiers first, so we covered that case too. Fixes #2796, #1580, and #856. Signed-off-by: Gergely Nagy <qmk@gergo.csillger.hu>
2018-05-09enable eeprom for rgb matrixJack Humbert1-1/+1
2018-03-28Fix RGB Sleep codeU-LANDSRAAD\drashna1-1/+1
2018-03-22Generate API docs from source code comments (#2491)skullydazed23-64/+616
* Generate api docs from source code * Add a bunch of doxygen comments * more doxygen comments * Add the in-progress api docs * script to generate docs from travis * Add doc generation to the travis job * make travis_docs.sh commit the work it does * make sure the docs script exits cleanly
2018-03-20[Proposal?] Allow RGB Underglow to turn off when host is idle/asleep (#2104)Drashna Jaelre1-1/+15
* Add RGB Underglow Sleeping * Add RGBLIGHT_SLEEP to toggle/control RGB light behavior * Update rgb docs * Update for RGB disable command
2018-03-16Add CMD and WIN aliases for KC_GUI, GUI(kc), GUI_T(kc), etc.fauxpark1-0/+5
2018-03-16Fix swap-hands tapping.Joe Wasson4-9/+50
This is an inelegant hack for #2522 but makes things work. Basically we give `action.c` a chance to handle the hold event early so that we can swap the keyboard for later keys. Later, to allow the hold to happen again quickly we nuke the key record so that tapping is reset. I tried to find a cleaner way, honestly.
2018-03-16Rename ONEHAND_ENABLE to SWAP_HANDS_ENABLE for consistencyJoe Wasson2-4/+4
2018-02-10Fix reset for STM32 devicesFred Sundvik1-17/+17
2018-02-08Merge ChibiOS and LUFA descriptor support (#2362)fredizzimo3-21/+21
* Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude
2018-01-21Revert back to normal sleeping wait behaviour for STM32Fred Sundvik1-7/+2
2018-01-18Backlighting for JJ40 and underglow initialisation code (#2260)Kenneth Aloysius1-1/+1
* Cleanup Mechmini keymap. Once the custom RGB function is defined, there is no need to manually handle RGB code. * Change default to KEYMAP_MIT, not KEYMAP_OFFSET * Add custom RGB code for JJ40 * Reset Mechmini advertised power draw to 500. Will have to test actual maximum power draw later. * RGB working on JJ40. * Fix: saturation increase/decrease flipped * Add new directory for my custom keymap with RGB keycodes * Swap LAlt and LGUI * Update JJ40 max power draw with measured value * Update: fun40 rules.mk to enable underglow; earlier failed Travis CI * Fix: init RGB LEDs on boot. Also added HHKB-like keymap for XD60. * Super rudimentary backlight test, init RGB LEDs on boot * Backlighting works - stays on for now * Toggling working * Now can override backlight.c functions. Problem was functions in backlight.c weren't called before due to a lack of matrix_scan_quantum() in matrix.c * Timers not working * Delete global.h * Cleanup * Compiles * Good sign: LEDs stop working again * Handle timer1 overflow * Progress: fix: forgot to init * Backlighting fully working now except breathing. * Revert keymap to original keycodes * Update XD60 keymap README * Update JJ40 keymap with backlight toggles * Breathing working just fine. * Update references * Add backlight_set() call * Cleanup code to disable backlight * Fix: does not compile * Fix: missing call to rgblight_task. * Testing with BACKLIGHT_BREATHING * Cleanup * Cleanup comments * More commenting cleanup. * Do not enable BACKLIGHT_BREATHING by default
2018-01-01backlight breathing overhaul (#2187)Balz Guenat3-5/+14
* add breathing to bananasplit * backlight breathing overhaul * fix the backlight_tick thing. * fix for vision_division backlight * fix a few keymaps and probably break breathing for some weirdly set-up boards. * remove BL_x keycodes because they made unreasonable assumptions * some fixes for BL keycodes * integer cie lightness scaling * use cie lightness for non-breathing backlight and make breathing able to reach true max brightness