You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

747 lines
24 KiB

2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
Audio system overhaul (#11820) * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commits bundles the changes from the arm-dac-work branch focused on audio/audio_arm.* into one commit (leaving out the test-keyboard) f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both -> only the changes on audio_arm_.*, the keyboard related parts are split off to a separate commit bfe468ef1 start morphing wavetable 474d100b5 refined a bit 208bee10f play_notes working 3e6478b0b start in-place documentation of dac settings 3e1826a33 fixed blip (rounding error), other waves, added key selection (left/right) 73853d651 5 voices at 44.1khz dfb401b95 limit voices to working number 9632b3379 configuration for the ez 6241f3f3b notes working in a new way * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commit splits off the plank example keymap from commit f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both * refactoring: rename audio_ to reflect their supported hardware-platform and audio-generation method: avr vs arm, and pwm vs dac * refactoring: deducplicate ISR code to update the pwm duty-cycle and period in the avr-pwm-implementation pulls three copies of the same code into one function which should improve readability and maintainability :-) * refactoring: move common code of arm and avr implementation into a separate/new file * refactoring: audio_avr_pwm, renaming defines to decouple them from actually used timers, registers and ISRs * refactoring: audio_avr_pwm - replacing function defines with plain register defines aligns better with other existing qmk code (and the new audio_arm_pwm) doing similar pwm thing * add audio-arm-pwm since not all STM32 have a DAC onboard (STM32F2xx and STM32F3xx), pwm-audio is an alternative (STM32F1xx) this code works on a "BluePill" clone, with an STM32F103C8B * clang-format changes on quantum/audio/* only * audio_arm_dac: stopping the notes caused screeching when using the DAC audio paths * audio_arm_pwm: use pushpull on the pin; so that a piezzo can be hooked up direclty without additional components (opendrain would require an external pullup) * refactoring: remove unused file from/for atmel-avr chips * refactoring: remove unused (avr) wavetable file * audio_arm_dac: adapt dac_end callback to changed chibios DAC api the previous chibios (17.6.0) passed along a pointer into the buffer plus a sample_count (which are/already where included in the DACDrivre object) - the current chibios (19.1.0) only passes the driver object. this patch ports more or less exactly what the previous chibios ISR code did: either have the user-callback work the first or second half of the buffer (dacsample_t pointer, with half the DAC_BUFFER_SIZE samples) by adjusting the pointer and sample count * audio-arm-dac: show a compile-warning on undefined audio-pins Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio_arm_dac: switch from exemplary wavetable generation to sine only sine+triangle+squrare is exemplary, and not realy fit for "production" use 'stairs' are usefull for debugging (hardware, with an oscilloscope) * audio_arm_dac: enable output buffers in the STM32 to drive external loads without any additional ciruitry - external opamps and such * audio: prevent out-of-bounds array access * audio_arm_dac: add output-frequency correcting factor * audio_arm_pwm: get both the alternate-function and pm-callback variants back into working condition and do some code-cleanup, refine documentation, ... * audio_arm_pwm: increase pwm frequency for "higher fidelity" on the previous .frequency=100000 higher frequency musical notes came out wrong (frequency measured on a Tektronix TDS2014B) note | freq | arm-pwm C2 | 65.4 | 65.491 C5 | 523.25 | 523.93 C6 | 1046.5 | 1053.38 C7 | 2093 | 2129 C8 | 4186 | 4350.91 with .frequency = 500000 C8 | 4186 | 4204.6 * audio refactoring: remove unused variables * audio_arm_dac: calibrate note tempo: with a tempo of 60beats-per-second a whole-note should last for exactly one second * audio: allow feature selection in rules.mk so the user can switch the audio driver between DAC and PWM on STM32 boards which support both (STM32F2 and up) or select the "pin alternate" pwm mode, for example on STM32F103 * audio-refactoring: move codeblocks in audio.[ch] into more coherent groups and add some inline documentation * audio-refactoring: cleanup and streamline common code between audio_arm_[dac|pwm] untangeling the relation between audio.c and the two drivers and adding more documenting comments :-) * audio_avr_pwm: getting it back into working condition, and cleanup+refactor * audio-refactoring: documentation and typo fixes Co-Authored-By: Nick Brassel <nick@tzarc.org> * audio-refactoring: cleanup defines, inludes and remove debug-prints * audio_chibios_dac: define&use a minimal sampling rate, based on the available tone-range to ease up on the cpu-load, while still rendering the higher notes/tones sufficiently also reenable the lower tones, since with the new implementation there is no evidence of them still beeing 'bugged' * audio-refactoring: one common AUDIO_MAX_VOICES define for all audio-drivers * audio-chibios-pwm: pwm-pin-allternate: make the the timer, timer-channel and alternate function user-#definable * audio_chibios_dac: math.h has fmod for this * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback update Jack Humberts dac-example keymaps for the slight changes in the audio-dac interface * audio-refactoring: use a common AUDIO_PIN configuration switch instead of defines have the user select a pin by configuration in rules.mk instead of a define in config.h has the advantage of beeing in a common form/pattern across all audio-driver implementations * audio-refactoring: switch backlight_avr.c to the new AUDIO_PIN defines * audio-common: have advance_note return a boolean if the note changed, to the next one in the melody beeing played * audio-chibios-pwm: fix issue with ~130ms silence between note/frequency changes while playing a SONG through trial,error and a scope/logic analyzer figured out Chibios-PWMDriver (at least in the current version) misbehaves if the initial period is set to zero (or one; two seems to work); when thats the case subsequent calls to 'pwmChhangePeriod' + pwmEnableChannel took ~135ms of silence, before the PWM continued with the new frequency... * audio-refactoring: get 'play_note' working again with a limited number of available voices (say AUDIO_VOICES_MAX=1) allow new frequencies to be played, by discarding the oldest one in the 'frequencies' queue * audio: set the fallback driver to DAC for chibios and PWM for all others (==avr at the moment) * audio-refactoring: moore documentation and some cleanup * audio-avr-pwm: no fallback on unset AUDIO_PIN this seems to be the expected behaviour by some keyboards (looking at ckeys/handwire_101:default) which otherwise fail to build because the firmware-image ends up beeing too large for the atmega... so we fail silently instead to keep travis happy * audio-refactoring: untangling terminology: voice->tone the code actually was working on tones (combination of pitch/frequency, duration, timbre, intensity/volume) and not voices (characteristic sound of an instrument; think piano vs guitar, which can be played together, each having its own "track" = voice on a music sheet) * audio-pwm: allow freq=0 aka a pause/rest in a SONG continue processing, but do not enable pwm units, since freq=0 wouldn't produce any sound anyway (and lead to division by zero on that occasion) * audio-refactoring: audio_advance_note -> audio_advance_state since it does not only affect 'one note', but the internally kept state as a whole * audio-refactoring: untangling terminology: polyphony the feature om the "inherited" avr code has little to do with polyphony (see wikipedia), but is more a time-multiplexing feature, to work around hardware limitations - like only having one pwm channel, that could on its own only reproduce one voice/instrument at a time * audio-chibios-dac: add zero-crossing feature have tones only change/stop when the waveform approaches zero - to avoid audible clicks note that this also requires the samples to start at zero, since the internally kept index into the samples is reset to zero too * audio-refactoring: feature: time-multiplexing of tones on a single output channel this feature was in the original avr-pwm implementation misnomed as "polyphony" with polyphony_rate and so on; did the same thing though: time-multiplexing multiple active notes so that a single output channel could reproduce more than one note at a time (which is not the same as a polyphony - see wikipedia :-) ) * audio-avr-pwm: get music-mode working (again) on AVRs with both pwm channels, or either one of the two :-) play_notes worked already - but music_mode uses play_note * audio-refactoring: split define MAX_SIMULTANEOUS_TONES -> TONE_STACKSIZE since the two cases are independant from one another, the hardware might impose limitations on the number of simultaneously reproducable tones, but the audio state should be able to track an unrelated number of notes recently started by play_note * audio-arm-dac: per define selectable sample-luts plus generation script in ./util * audio-refactoring: heh, avr has a MIN... * audio-refactoring: add basic dac audio-driver based on the current/master implementation whereas current=d96380e65496912e0f68e6531565f4b45efd1623 which is the state of things before this whole audio-refactoring branch boiled down to interface with the refactored audio system = removing all redundant state-managing and frequency calculation * audio-refactoring: rename audio-drivers to driver_$PLATFORM_$DRIVER * audio-arm-pwm: split the software/hardware implementations into separate files which saves us partially from a 'define hell', with the tradeoff that now two somewhat similar chibios_pwm implementations have to be maintained * audio-refactoring: update documentation * audio-arm-dac: apply AUDIO_PIN defines to driver_chibios_dac_basic * audio-arm-dac: dac_additive: stop the hardware when the last sample completed the audio system calls for a driver_stop, which is delayed until the current sample conversion finishes * audio-refactoring: make function-namespace consistent - all (public) audio functions start with audio_ - also refactoring play*_notes/tones to play*_melody, to visually distance it a bit from play*_tone/_note * audio-refactoring: consistent define namespace: DAC_ -> AUDIO_DAC_ * audio-arm-dac: update (inline) documentation regarding MAX for sample values * audio-chibios-dac: remove zero-crossing feature didn't quite work as intended anyway, and stopping the hardware on close-to-zero seems to be enought anyway * audio-arm-dac: dac_basic: respect the configured sample-rate * audio-arm-pwm: have 'note_timbre' influence the pwm-duty cycle like it already does in the avr implementation * audio-refactoring: get VIBRATO working (again) with all drivers (verified with chibios_[dac|pwm]) * audio-arm-dac: zero-crossing feature (Mk II) wait for the generated waveform to approach 'zero' before either turning off the output+timer or switching to the current set of active_tones * audio-refactoring: re-add note-resting -> introduce short_rest inbetween - introduce a short pause/rest between two notes of the same frequency, to separate them audibly - also updating the refactoring comments * audio-refactoring: cleanup refactoring remnants remove the former avr-isr code block - since all its features are now refactored into the different parts of the current system also updates the TODOS * audio-refactoring: reserve negative numbers as unitialized frequencies to allow the valid tone/frequency f=0Hz == rest/pause * audio-refactoring: FIX: first note of melody was missing the first note was missing because 'goto_next_note'=false overrode a state_change=true of the initial play_tone and some code-indentations/cleanup of related parts * audio-arm-dac: fix hardware init-click due to wron .init= value * audio-refactoring: new conveniance function: audio_play_click which can be used to further refactor/remove fauxclicky (avr only) and/or the 'clicky' features * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: consecutive notes of the same frequency get a pause inserted inbetween by audio.c * audio-refactoring: use milliseconds instead of seconds for 'click' parameters clicks are supposed to be short, seconds make little sense * audio-refactoring: use timer ticks instead of counters local counters were used in the original (avr)ISR to advance an index into the lookup tables (for vibrato), and something similar was used for the tone-multiplexing feature decoupling these from the (possibly irregular) calls to advance_state made sesne, since those counters/lookups need to be in relation to a wall-time anyway * audio-refactoring: voices.c: drop 'envelope_index' counter in favour of timer ticks * audio-refactoring: move vibrato and timbre related parts from audio.c to voices.c also drops the now (globally) unused AUDIO_VIBRATO/AUDIO_ENABLE_VIBRATO defines * audio.c: use system-ticks instead of counters the drivers have to take care of for the internal state posision since there already is a system-tick with ms resolution, keeping count separatly with each driver implementation makes little sense; especially since they had to take special care to call audio_advance_state with the correct step/end parameters for the audio state to advance regularly and with the correct pace * audio.c: stop notes after new ones have been started avoids brief states of with no notes playing that would otherwise stop the hardware and might lead to clicks * audio.c: bugfix: actually play a pause instead of just idling/stopping which lead the pwm drivers to stop entirely... * audio-arm-pwm: pwm-software: add inverted output new define AUDIO_PIN_ALT_AS_NEGATIVE will generate an inverted signal on the alternate pin, which boosts the volume if a piezo is connected to both AUDIO_PIN and AUDIO_PIN_ALT * audio-arm-dac: basic: handle piezo configured&wired to both audio pins * audio-refactoring: docs: update for AUDIO_PIN_ALT_AS_NEGATIVE and piezo wiring * audio.c: bugfix: use timer_elapsed32 instad of keeping timestamps avoids running into issues when the uint32 of the timer overflows * audio-refactoring: add 'pragma once' and remove deprecated NOTE_REST * audio_arm_dac: basic: add missing bracket * audio.c: fix delta calculation was in the wrong place, needs to use the 'last_timestamp' before it was reset * audio-refactoring: buildfix: wrong legacy macro for set_timbre * audio.c: 16bit timerstamps suffice * audio-refactoring: separate includes for AVR and chibios * audio-refactoring: timbre: use uint8 instead of float * audio-refactoring: duration: use uint16 for internal per-tone/note state * audio-refactoring: tonemultiplexing: use uint16 instead of float * audio-arm-dac: additive: set second pin output-low used when a piezo is connected to AUDIO_PIN and AUDIO_PIN_ALT, with PIN_ALT_AS_NEGATIVE * audio-refactoring: move AUDIO_PIN selection from rules.mk to config.h to be consistent with how other features are handled in QMK * audio-refactoring: buildfix: wrong legacy macro for set_tempo * audio-arm-dac: additive: set second pin output-low -- FIXUP * audio.c: do duration<>ms conversion in uint instead of float on AVR, to save a couple of bytes in the firmware size * audio-refactoring: cleanup eeprom defines/usage for ARM, avr is handled automagically through the avr libc and common_features.mk Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio.h: throw an error if OFF is larger than MAX * audio-arm-dac: basic: actually stop the dac-conversion on a audio_driver_stop to put the output pin in a known state == AUDIO_DAC_OFF_VALUE, instead of just leaving them where the last conversion was... with AUDIO_PIN_ALT_AS_NEGATIVE this meant one output was left HIGH while the other was left LOW one CAVEAT: due to this change the opposing squarewave when using both A4 and A5 with AUDIO_PIN_ALT_AS_NEGATIVE show extra pulses at the beginning/end on one of the outputs, the two waveforms are in sync otherwise. the extra pusles probably matter little, since this is no high-fidelity sound generation :P * audio-arm-dac: additive: move zero-crossing code out of dac_value_generate which is/should be user-overridable == simple, and doing one thing: providing sample values state-transitions necessary for the zero crossing are better handled in the surrounding loop in the dac_end callback * audio-arm-dac: dac-additive: zero-crossing: ramping up or down after a start trigger ramp up: generate values until zero=OFF_VALUE is reached, then continue normally same in reverse for strop trigger: output values until zero is reached/crossed, then keep OFF_VALUE on the output * audio-arm-dac: dac-additive: BUGFIX: return OFF_VALUE when a pause is playing fixes a bug during SONG playback, which suddenly stopped when it encoutnered a pause * audio-arm-dac: set a sensible default for AUDIO_DAC_VALUE_OFF 1/2 MAX was probably exemplary, can't think of a setup where that would make sense :-P * audio-arm-dac: update synth_sample/_wavetable for new pin-defines * audio-arm-dac: default for AUDIO_DAC_VALUE_OFF turned out that zero or max are bad default choices: when multiple tones are played (>>5) and released at the same time (!), due to the complex waveform never reaching 'zero' the output can take quite a while to reach zero, and hence the zero-crossing code only "releases" the output waaay to late * audio-arm-dac: additive: use DAC for negative pin instead of PAL, which only allows the pin to be configured as output; LOW or HIGH * audio-arm-dac: more compile-time configuration checks * audio-refactoring: typo fixed * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: add defines for B-pin as primary/only speaker also updates documentation. * audio-refactoring: update documentation with proton-c config.h example * audio-refactoring: move glissando (TODO) to voices.c refactored/saved from the original glissando implementation in then upstream-master:audio_avr.c still needs some work though, as it is now the calculation *should* work, but the start-frequency needs to be tracked somewhere/somehow; not only during a SONG playback but also with user input? * audio-refactoring: cleanup: one round of aspell -c * audio-avr-pwm: back to AUDIO_PIN since config_common.h expands them to plain integers, the AUDIO_PIN define can directly be compared to e.g. B5 so there is no need to deal with separate defines like AUDIO_PIN_B5 * audio-refactoring: add technical documentation audio_driver.md which moves some in-code documentation there * audio-arm-dac: move AUDIO_PIN checks into c-code instead of doing everything with the preprocessor, since A4/A5 do not expand to simple integers, preprocessor int-comparison is not possible. but necessary to get a consistent configuration scheme going throughout the audio-code... solution: let c-code handle the different AUDIO_PIN configurations instead (and leave code/size optimizations to the compiler) * audio-arm-dac: compile-fix: set AUDIO_PIN if unset workaround to get the build going again, and be backwarts compatible to arm-keyboards which not yet set the AUDIO_PIN define. until the define is enforced through an '#error" * audio-refactoring: document tone-multiplexing feature * audio-refactoring: Apply suggestions from documentation review Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-refactoring: Update docs/audio_driver.md * audio-refactoring: docs: fix markdown newlines Terminating a line in Markdown with <space>-<space>-<linebreak> creates an HTML single-line break (<br>). Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-arm-dac: additive: fix AUDIO_PIN_ALT handling * audio-arm-pwm: align define naming with other drivers Co-authored-by: Joel Challis <git@zvecr.com> * audio-refactoring: set detault tempo to 120 and add documentation for the override * audio-refactoring: update backlight define checks to new AUDIO_PIN names * audio-refactoring: reworking PWM related defines to be more consistent with other QMK code Co-authored-by: Joel Challis <git@zvecr.com> * audio-arm: have the state-update-timer user configurable defaulting to GPTD6 or GPTD8 for stm32f2+ (=proton-c) stm32f1 might need to set this to GPTD4, since 6 and 8 are not available * audio-refactoring: PLAY_NOTE_ARRAY was already removed in master * Add prototype for startup * Update chibiOS dac basic to disable pins on stop * Add defaults for Proton C * avoid hanging audio if note is completely missed * Don't redefine pins if they're already defined * Define A4 and A5 for CTPC support * Add license headers to keymap files * Remove figlet? comments * Add DAC config to audio driver docs * Apply suggestions from code review Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Add license header to py files * correct license header * Add JohSchneider's name to modified files AKA credit where credit's due * Set executable permission and change interpeter * Add 'wave' to pip requirements * Improve documentation * Add some settings I missed * Strip AUDIO_DRIVER to parse the name correctly * fix depreciated * Update util/audio_generate_dac_lut.py Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Fix type in clueboard config * Apply suggestions from tzarc Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Johannes <you@example.com> Co-authored-by: JohSchneider <JohSchneider@googlemail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joshua Diamond <josh@windowoffire.com> Co-authored-by: Jack Humbert <jack.humb@gmail.com>
3 years ago
Audio system overhaul (#11820) * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commits bundles the changes from the arm-dac-work branch focused on audio/audio_arm.* into one commit (leaving out the test-keyboard) f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both -> only the changes on audio_arm_.*, the keyboard related parts are split off to a separate commit bfe468ef1 start morphing wavetable 474d100b5 refined a bit 208bee10f play_notes working 3e6478b0b start in-place documentation of dac settings 3e1826a33 fixed blip (rounding error), other waves, added key selection (left/right) 73853d651 5 voices at 44.1khz dfb401b95 limit voices to working number 9632b3379 configuration for the ez 6241f3f3b notes working in a new way * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commit splits off the plank example keymap from commit f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both * refactoring: rename audio_ to reflect their supported hardware-platform and audio-generation method: avr vs arm, and pwm vs dac * refactoring: deducplicate ISR code to update the pwm duty-cycle and period in the avr-pwm-implementation pulls three copies of the same code into one function which should improve readability and maintainability :-) * refactoring: move common code of arm and avr implementation into a separate/new file * refactoring: audio_avr_pwm, renaming defines to decouple them from actually used timers, registers and ISRs * refactoring: audio_avr_pwm - replacing function defines with plain register defines aligns better with other existing qmk code (and the new audio_arm_pwm) doing similar pwm thing * add audio-arm-pwm since not all STM32 have a DAC onboard (STM32F2xx and STM32F3xx), pwm-audio is an alternative (STM32F1xx) this code works on a "BluePill" clone, with an STM32F103C8B * clang-format changes on quantum/audio/* only * audio_arm_dac: stopping the notes caused screeching when using the DAC audio paths * audio_arm_pwm: use pushpull on the pin; so that a piezzo can be hooked up direclty without additional components (opendrain would require an external pullup) * refactoring: remove unused file from/for atmel-avr chips * refactoring: remove unused (avr) wavetable file * audio_arm_dac: adapt dac_end callback to changed chibios DAC api the previous chibios (17.6.0) passed along a pointer into the buffer plus a sample_count (which are/already where included in the DACDrivre object) - the current chibios (19.1.0) only passes the driver object. this patch ports more or less exactly what the previous chibios ISR code did: either have the user-callback work the first or second half of the buffer (dacsample_t pointer, with half the DAC_BUFFER_SIZE samples) by adjusting the pointer and sample count * audio-arm-dac: show a compile-warning on undefined audio-pins Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio_arm_dac: switch from exemplary wavetable generation to sine only sine+triangle+squrare is exemplary, and not realy fit for "production" use 'stairs' are usefull for debugging (hardware, with an oscilloscope) * audio_arm_dac: enable output buffers in the STM32 to drive external loads without any additional ciruitry - external opamps and such * audio: prevent out-of-bounds array access * audio_arm_dac: add output-frequency correcting factor * audio_arm_pwm: get both the alternate-function and pm-callback variants back into working condition and do some code-cleanup, refine documentation, ... * audio_arm_pwm: increase pwm frequency for "higher fidelity" on the previous .frequency=100000 higher frequency musical notes came out wrong (frequency measured on a Tektronix TDS2014B) note | freq | arm-pwm C2 | 65.4 | 65.491 C5 | 523.25 | 523.93 C6 | 1046.5 | 1053.38 C7 | 2093 | 2129 C8 | 4186 | 4350.91 with .frequency = 500000 C8 | 4186 | 4204.6 * audio refactoring: remove unused variables * audio_arm_dac: calibrate note tempo: with a tempo of 60beats-per-second a whole-note should last for exactly one second * audio: allow feature selection in rules.mk so the user can switch the audio driver between DAC and PWM on STM32 boards which support both (STM32F2 and up) or select the "pin alternate" pwm mode, for example on STM32F103 * audio-refactoring: move codeblocks in audio.[ch] into more coherent groups and add some inline documentation * audio-refactoring: cleanup and streamline common code between audio_arm_[dac|pwm] untangeling the relation between audio.c and the two drivers and adding more documenting comments :-) * audio_avr_pwm: getting it back into working condition, and cleanup+refactor * audio-refactoring: documentation and typo fixes Co-Authored-By: Nick Brassel <nick@tzarc.org> * audio-refactoring: cleanup defines, inludes and remove debug-prints * audio_chibios_dac: define&use a minimal sampling rate, based on the available tone-range to ease up on the cpu-load, while still rendering the higher notes/tones sufficiently also reenable the lower tones, since with the new implementation there is no evidence of them still beeing 'bugged' * audio-refactoring: one common AUDIO_MAX_VOICES define for all audio-drivers * audio-chibios-pwm: pwm-pin-allternate: make the the timer, timer-channel and alternate function user-#definable * audio_chibios_dac: math.h has fmod for this * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback update Jack Humberts dac-example keymaps for the slight changes in the audio-dac interface * audio-refactoring: use a common AUDIO_PIN configuration switch instead of defines have the user select a pin by configuration in rules.mk instead of a define in config.h has the advantage of beeing in a common form/pattern across all audio-driver implementations * audio-refactoring: switch backlight_avr.c to the new AUDIO_PIN defines * audio-common: have advance_note return a boolean if the note changed, to the next one in the melody beeing played * audio-chibios-pwm: fix issue with ~130ms silence between note/frequency changes while playing a SONG through trial,error and a scope/logic analyzer figured out Chibios-PWMDriver (at least in the current version) misbehaves if the initial period is set to zero (or one; two seems to work); when thats the case subsequent calls to 'pwmChhangePeriod' + pwmEnableChannel took ~135ms of silence, before the PWM continued with the new frequency... * audio-refactoring: get 'play_note' working again with a limited number of available voices (say AUDIO_VOICES_MAX=1) allow new frequencies to be played, by discarding the oldest one in the 'frequencies' queue * audio: set the fallback driver to DAC for chibios and PWM for all others (==avr at the moment) * audio-refactoring: moore documentation and some cleanup * audio-avr-pwm: no fallback on unset AUDIO_PIN this seems to be the expected behaviour by some keyboards (looking at ckeys/handwire_101:default) which otherwise fail to build because the firmware-image ends up beeing too large for the atmega... so we fail silently instead to keep travis happy * audio-refactoring: untangling terminology: voice->tone the code actually was working on tones (combination of pitch/frequency, duration, timbre, intensity/volume) and not voices (characteristic sound of an instrument; think piano vs guitar, which can be played together, each having its own "track" = voice on a music sheet) * audio-pwm: allow freq=0 aka a pause/rest in a SONG continue processing, but do not enable pwm units, since freq=0 wouldn't produce any sound anyway (and lead to division by zero on that occasion) * audio-refactoring: audio_advance_note -> audio_advance_state since it does not only affect 'one note', but the internally kept state as a whole * audio-refactoring: untangling terminology: polyphony the feature om the "inherited" avr code has little to do with polyphony (see wikipedia), but is more a time-multiplexing feature, to work around hardware limitations - like only having one pwm channel, that could on its own only reproduce one voice/instrument at a time * audio-chibios-dac: add zero-crossing feature have tones only change/stop when the waveform approaches zero - to avoid audible clicks note that this also requires the samples to start at zero, since the internally kept index into the samples is reset to zero too * audio-refactoring: feature: time-multiplexing of tones on a single output channel this feature was in the original avr-pwm implementation misnomed as "polyphony" with polyphony_rate and so on; did the same thing though: time-multiplexing multiple active notes so that a single output channel could reproduce more than one note at a time (which is not the same as a polyphony - see wikipedia :-) ) * audio-avr-pwm: get music-mode working (again) on AVRs with both pwm channels, or either one of the two :-) play_notes worked already - but music_mode uses play_note * audio-refactoring: split define MAX_SIMULTANEOUS_TONES -> TONE_STACKSIZE since the two cases are independant from one another, the hardware might impose limitations on the number of simultaneously reproducable tones, but the audio state should be able to track an unrelated number of notes recently started by play_note * audio-arm-dac: per define selectable sample-luts plus generation script in ./util * audio-refactoring: heh, avr has a MIN... * audio-refactoring: add basic dac audio-driver based on the current/master implementation whereas current=d96380e65496912e0f68e6531565f4b45efd1623 which is the state of things before this whole audio-refactoring branch boiled down to interface with the refactored audio system = removing all redundant state-managing and frequency calculation * audio-refactoring: rename audio-drivers to driver_$PLATFORM_$DRIVER * audio-arm-pwm: split the software/hardware implementations into separate files which saves us partially from a 'define hell', with the tradeoff that now two somewhat similar chibios_pwm implementations have to be maintained * audio-refactoring: update documentation * audio-arm-dac: apply AUDIO_PIN defines to driver_chibios_dac_basic * audio-arm-dac: dac_additive: stop the hardware when the last sample completed the audio system calls for a driver_stop, which is delayed until the current sample conversion finishes * audio-refactoring: make function-namespace consistent - all (public) audio functions start with audio_ - also refactoring play*_notes/tones to play*_melody, to visually distance it a bit from play*_tone/_note * audio-refactoring: consistent define namespace: DAC_ -> AUDIO_DAC_ * audio-arm-dac: update (inline) documentation regarding MAX for sample values * audio-chibios-dac: remove zero-crossing feature didn't quite work as intended anyway, and stopping the hardware on close-to-zero seems to be enought anyway * audio-arm-dac: dac_basic: respect the configured sample-rate * audio-arm-pwm: have 'note_timbre' influence the pwm-duty cycle like it already does in the avr implementation * audio-refactoring: get VIBRATO working (again) with all drivers (verified with chibios_[dac|pwm]) * audio-arm-dac: zero-crossing feature (Mk II) wait for the generated waveform to approach 'zero' before either turning off the output+timer or switching to the current set of active_tones * audio-refactoring: re-add note-resting -> introduce short_rest inbetween - introduce a short pause/rest between two notes of the same frequency, to separate them audibly - also updating the refactoring comments * audio-refactoring: cleanup refactoring remnants remove the former avr-isr code block - since all its features are now refactored into the different parts of the current system also updates the TODOS * audio-refactoring: reserve negative numbers as unitialized frequencies to allow the valid tone/frequency f=0Hz == rest/pause * audio-refactoring: FIX: first note of melody was missing the first note was missing because 'goto_next_note'=false overrode a state_change=true of the initial play_tone and some code-indentations/cleanup of related parts * audio-arm-dac: fix hardware init-click due to wron .init= value * audio-refactoring: new conveniance function: audio_play_click which can be used to further refactor/remove fauxclicky (avr only) and/or the 'clicky' features * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: consecutive notes of the same frequency get a pause inserted inbetween by audio.c * audio-refactoring: use milliseconds instead of seconds for 'click' parameters clicks are supposed to be short, seconds make little sense * audio-refactoring: use timer ticks instead of counters local counters were used in the original (avr)ISR to advance an index into the lookup tables (for vibrato), and something similar was used for the tone-multiplexing feature decoupling these from the (possibly irregular) calls to advance_state made sesne, since those counters/lookups need to be in relation to a wall-time anyway * audio-refactoring: voices.c: drop 'envelope_index' counter in favour of timer ticks * audio-refactoring: move vibrato and timbre related parts from audio.c to voices.c also drops the now (globally) unused AUDIO_VIBRATO/AUDIO_ENABLE_VIBRATO defines * audio.c: use system-ticks instead of counters the drivers have to take care of for the internal state posision since there already is a system-tick with ms resolution, keeping count separatly with each driver implementation makes little sense; especially since they had to take special care to call audio_advance_state with the correct step/end parameters for the audio state to advance regularly and with the correct pace * audio.c: stop notes after new ones have been started avoids brief states of with no notes playing that would otherwise stop the hardware and might lead to clicks * audio.c: bugfix: actually play a pause instead of just idling/stopping which lead the pwm drivers to stop entirely... * audio-arm-pwm: pwm-software: add inverted output new define AUDIO_PIN_ALT_AS_NEGATIVE will generate an inverted signal on the alternate pin, which boosts the volume if a piezo is connected to both AUDIO_PIN and AUDIO_PIN_ALT * audio-arm-dac: basic: handle piezo configured&wired to both audio pins * audio-refactoring: docs: update for AUDIO_PIN_ALT_AS_NEGATIVE and piezo wiring * audio.c: bugfix: use timer_elapsed32 instad of keeping timestamps avoids running into issues when the uint32 of the timer overflows * audio-refactoring: add 'pragma once' and remove deprecated NOTE_REST * audio_arm_dac: basic: add missing bracket * audio.c: fix delta calculation was in the wrong place, needs to use the 'last_timestamp' before it was reset * audio-refactoring: buildfix: wrong legacy macro for set_timbre * audio.c: 16bit timerstamps suffice * audio-refactoring: separate includes for AVR and chibios * audio-refactoring: timbre: use uint8 instead of float * audio-refactoring: duration: use uint16 for internal per-tone/note state * audio-refactoring: tonemultiplexing: use uint16 instead of float * audio-arm-dac: additive: set second pin output-low used when a piezo is connected to AUDIO_PIN and AUDIO_PIN_ALT, with PIN_ALT_AS_NEGATIVE * audio-refactoring: move AUDIO_PIN selection from rules.mk to config.h to be consistent with how other features are handled in QMK * audio-refactoring: buildfix: wrong legacy macro for set_tempo * audio-arm-dac: additive: set second pin output-low -- FIXUP * audio.c: do duration<>ms conversion in uint instead of float on AVR, to save a couple of bytes in the firmware size * audio-refactoring: cleanup eeprom defines/usage for ARM, avr is handled automagically through the avr libc and common_features.mk Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio.h: throw an error if OFF is larger than MAX * audio-arm-dac: basic: actually stop the dac-conversion on a audio_driver_stop to put the output pin in a known state == AUDIO_DAC_OFF_VALUE, instead of just leaving them where the last conversion was... with AUDIO_PIN_ALT_AS_NEGATIVE this meant one output was left HIGH while the other was left LOW one CAVEAT: due to this change the opposing squarewave when using both A4 and A5 with AUDIO_PIN_ALT_AS_NEGATIVE show extra pulses at the beginning/end on one of the outputs, the two waveforms are in sync otherwise. the extra pusles probably matter little, since this is no high-fidelity sound generation :P * audio-arm-dac: additive: move zero-crossing code out of dac_value_generate which is/should be user-overridable == simple, and doing one thing: providing sample values state-transitions necessary for the zero crossing are better handled in the surrounding loop in the dac_end callback * audio-arm-dac: dac-additive: zero-crossing: ramping up or down after a start trigger ramp up: generate values until zero=OFF_VALUE is reached, then continue normally same in reverse for strop trigger: output values until zero is reached/crossed, then keep OFF_VALUE on the output * audio-arm-dac: dac-additive: BUGFIX: return OFF_VALUE when a pause is playing fixes a bug during SONG playback, which suddenly stopped when it encoutnered a pause * audio-arm-dac: set a sensible default for AUDIO_DAC_VALUE_OFF 1/2 MAX was probably exemplary, can't think of a setup where that would make sense :-P * audio-arm-dac: update synth_sample/_wavetable for new pin-defines * audio-arm-dac: default for AUDIO_DAC_VALUE_OFF turned out that zero or max are bad default choices: when multiple tones are played (>>5) and released at the same time (!), due to the complex waveform never reaching 'zero' the output can take quite a while to reach zero, and hence the zero-crossing code only "releases" the output waaay to late * audio-arm-dac: additive: use DAC for negative pin instead of PAL, which only allows the pin to be configured as output; LOW or HIGH * audio-arm-dac: more compile-time configuration checks * audio-refactoring: typo fixed * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: add defines for B-pin as primary/only speaker also updates documentation. * audio-refactoring: update documentation with proton-c config.h example * audio-refactoring: move glissando (TODO) to voices.c refactored/saved from the original glissando implementation in then upstream-master:audio_avr.c still needs some work though, as it is now the calculation *should* work, but the start-frequency needs to be tracked somewhere/somehow; not only during a SONG playback but also with user input? * audio-refactoring: cleanup: one round of aspell -c * audio-avr-pwm: back to AUDIO_PIN since config_common.h expands them to plain integers, the AUDIO_PIN define can directly be compared to e.g. B5 so there is no need to deal with separate defines like AUDIO_PIN_B5 * audio-refactoring: add technical documentation audio_driver.md which moves some in-code documentation there * audio-arm-dac: move AUDIO_PIN checks into c-code instead of doing everything with the preprocessor, since A4/A5 do not expand to simple integers, preprocessor int-comparison is not possible. but necessary to get a consistent configuration scheme going throughout the audio-code... solution: let c-code handle the different AUDIO_PIN configurations instead (and leave code/size optimizations to the compiler) * audio-arm-dac: compile-fix: set AUDIO_PIN if unset workaround to get the build going again, and be backwarts compatible to arm-keyboards which not yet set the AUDIO_PIN define. until the define is enforced through an '#error" * audio-refactoring: document tone-multiplexing feature * audio-refactoring: Apply suggestions from documentation review Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-refactoring: Update docs/audio_driver.md * audio-refactoring: docs: fix markdown newlines Terminating a line in Markdown with <space>-<space>-<linebreak> creates an HTML single-line break (<br>). Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-arm-dac: additive: fix AUDIO_PIN_ALT handling * audio-arm-pwm: align define naming with other drivers Co-authored-by: Joel Challis <git@zvecr.com> * audio-refactoring: set detault tempo to 120 and add documentation for the override * audio-refactoring: update backlight define checks to new AUDIO_PIN names * audio-refactoring: reworking PWM related defines to be more consistent with other QMK code Co-authored-by: Joel Challis <git@zvecr.com> * audio-arm: have the state-update-timer user configurable defaulting to GPTD6 or GPTD8 for stm32f2+ (=proton-c) stm32f1 might need to set this to GPTD4, since 6 and 8 are not available * audio-refactoring: PLAY_NOTE_ARRAY was already removed in master * Add prototype for startup * Update chibiOS dac basic to disable pins on stop * Add defaults for Proton C * avoid hanging audio if note is completely missed * Don't redefine pins if they're already defined * Define A4 and A5 for CTPC support * Add license headers to keymap files * Remove figlet? comments * Add DAC config to audio driver docs * Apply suggestions from code review Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Add license header to py files * correct license header * Add JohSchneider's name to modified files AKA credit where credit's due * Set executable permission and change interpeter * Add 'wave' to pip requirements * Improve documentation * Add some settings I missed * Strip AUDIO_DRIVER to parse the name correctly * fix depreciated * Update util/audio_generate_dac_lut.py Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Fix type in clueboard config * Apply suggestions from tzarc Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Johannes <you@example.com> Co-authored-by: JohSchneider <JohSchneider@googlemail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joshua Diamond <josh@windowoffire.com> Co-authored-by: Jack Humbert <jack.humb@gmail.com>
3 years ago
Audio system overhaul (#11820) * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commits bundles the changes from the arm-dac-work branch focused on audio/audio_arm.* into one commit (leaving out the test-keyboard) f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both -> only the changes on audio_arm_.*, the keyboard related parts are split off to a separate commit bfe468ef1 start morphing wavetable 474d100b5 refined a bit 208bee10f play_notes working 3e6478b0b start in-place documentation of dac settings 3e1826a33 fixed blip (rounding error), other waves, added key selection (left/right) 73853d651 5 voices at 44.1khz dfb401b95 limit voices to working number 9632b3379 configuration for the ez 6241f3f3b notes working in a new way * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback changes by Jack Humbert on an implementation for DAC audio on arm/chibios platforms this commit splits off the plank example keymap from commit f52faeb5d (origin/arm-dac-work) add sample and wavetable examples, parsers for both * refactoring: rename audio_ to reflect their supported hardware-platform and audio-generation method: avr vs arm, and pwm vs dac * refactoring: deducplicate ISR code to update the pwm duty-cycle and period in the avr-pwm-implementation pulls three copies of the same code into one function which should improve readability and maintainability :-) * refactoring: move common code of arm and avr implementation into a separate/new file * refactoring: audio_avr_pwm, renaming defines to decouple them from actually used timers, registers and ISRs * refactoring: audio_avr_pwm - replacing function defines with plain register defines aligns better with other existing qmk code (and the new audio_arm_pwm) doing similar pwm thing * add audio-arm-pwm since not all STM32 have a DAC onboard (STM32F2xx and STM32F3xx), pwm-audio is an alternative (STM32F1xx) this code works on a "BluePill" clone, with an STM32F103C8B * clang-format changes on quantum/audio/* only * audio_arm_dac: stopping the notes caused screeching when using the DAC audio paths * audio_arm_pwm: use pushpull on the pin; so that a piezzo can be hooked up direclty without additional components (opendrain would require an external pullup) * refactoring: remove unused file from/for atmel-avr chips * refactoring: remove unused (avr) wavetable file * audio_arm_dac: adapt dac_end callback to changed chibios DAC api the previous chibios (17.6.0) passed along a pointer into the buffer plus a sample_count (which are/already where included in the DACDrivre object) - the current chibios (19.1.0) only passes the driver object. this patch ports more or less exactly what the previous chibios ISR code did: either have the user-callback work the first or second half of the buffer (dacsample_t pointer, with half the DAC_BUFFER_SIZE samples) by adjusting the pointer and sample count * audio-arm-dac: show a compile-warning on undefined audio-pins Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio_arm_dac: switch from exemplary wavetable generation to sine only sine+triangle+squrare is exemplary, and not realy fit for "production" use 'stairs' are usefull for debugging (hardware, with an oscilloscope) * audio_arm_dac: enable output buffers in the STM32 to drive external loads without any additional ciruitry - external opamps and such * audio: prevent out-of-bounds array access * audio_arm_dac: add output-frequency correcting factor * audio_arm_pwm: get both the alternate-function and pm-callback variants back into working condition and do some code-cleanup, refine documentation, ... * audio_arm_pwm: increase pwm frequency for "higher fidelity" on the previous .frequency=100000 higher frequency musical notes came out wrong (frequency measured on a Tektronix TDS2014B) note | freq | arm-pwm C2 | 65.4 | 65.491 C5 | 523.25 | 523.93 C6 | 1046.5 | 1053.38 C7 | 2093 | 2129 C8 | 4186 | 4350.91 with .frequency = 500000 C8 | 4186 | 4204.6 * audio refactoring: remove unused variables * audio_arm_dac: calibrate note tempo: with a tempo of 60beats-per-second a whole-note should last for exactly one second * audio: allow feature selection in rules.mk so the user can switch the audio driver between DAC and PWM on STM32 boards which support both (STM32F2 and up) or select the "pin alternate" pwm mode, for example on STM32F103 * audio-refactoring: move codeblocks in audio.[ch] into more coherent groups and add some inline documentation * audio-refactoring: cleanup and streamline common code between audio_arm_[dac|pwm] untangeling the relation between audio.c and the two drivers and adding more documenting comments :-) * audio_avr_pwm: getting it back into working condition, and cleanup+refactor * audio-refactoring: documentation and typo fixes Co-Authored-By: Nick Brassel <nick@tzarc.org> * audio-refactoring: cleanup defines, inludes and remove debug-prints * audio_chibios_dac: define&use a minimal sampling rate, based on the available tone-range to ease up on the cpu-load, while still rendering the higher notes/tones sufficiently also reenable the lower tones, since with the new implementation there is no evidence of them still beeing 'bugged' * audio-refactoring: one common AUDIO_MAX_VOICES define for all audio-drivers * audio-chibios-pwm: pwm-pin-allternate: make the the timer, timer-channel and alternate function user-#definable * audio_chibios_dac: math.h has fmod for this * Redo Arm DAC implementation for additive, wavetable synthesis, sample playback update Jack Humberts dac-example keymaps for the slight changes in the audio-dac interface * audio-refactoring: use a common AUDIO_PIN configuration switch instead of defines have the user select a pin by configuration in rules.mk instead of a define in config.h has the advantage of beeing in a common form/pattern across all audio-driver implementations * audio-refactoring: switch backlight_avr.c to the new AUDIO_PIN defines * audio-common: have advance_note return a boolean if the note changed, to the next one in the melody beeing played * audio-chibios-pwm: fix issue with ~130ms silence between note/frequency changes while playing a SONG through trial,error and a scope/logic analyzer figured out Chibios-PWMDriver (at least in the current version) misbehaves if the initial period is set to zero (or one; two seems to work); when thats the case subsequent calls to 'pwmChhangePeriod' + pwmEnableChannel took ~135ms of silence, before the PWM continued with the new frequency... * audio-refactoring: get 'play_note' working again with a limited number of available voices (say AUDIO_VOICES_MAX=1) allow new frequencies to be played, by discarding the oldest one in the 'frequencies' queue * audio: set the fallback driver to DAC for chibios and PWM for all others (==avr at the moment) * audio-refactoring: moore documentation and some cleanup * audio-avr-pwm: no fallback on unset AUDIO_PIN this seems to be the expected behaviour by some keyboards (looking at ckeys/handwire_101:default) which otherwise fail to build because the firmware-image ends up beeing too large for the atmega... so we fail silently instead to keep travis happy * audio-refactoring: untangling terminology: voice->tone the code actually was working on tones (combination of pitch/frequency, duration, timbre, intensity/volume) and not voices (characteristic sound of an instrument; think piano vs guitar, which can be played together, each having its own "track" = voice on a music sheet) * audio-pwm: allow freq=0 aka a pause/rest in a SONG continue processing, but do not enable pwm units, since freq=0 wouldn't produce any sound anyway (and lead to division by zero on that occasion) * audio-refactoring: audio_advance_note -> audio_advance_state since it does not only affect 'one note', but the internally kept state as a whole * audio-refactoring: untangling terminology: polyphony the feature om the "inherited" avr code has little to do with polyphony (see wikipedia), but is more a time-multiplexing feature, to work around hardware limitations - like only having one pwm channel, that could on its own only reproduce one voice/instrument at a time * audio-chibios-dac: add zero-crossing feature have tones only change/stop when the waveform approaches zero - to avoid audible clicks note that this also requires the samples to start at zero, since the internally kept index into the samples is reset to zero too * audio-refactoring: feature: time-multiplexing of tones on a single output channel this feature was in the original avr-pwm implementation misnomed as "polyphony" with polyphony_rate and so on; did the same thing though: time-multiplexing multiple active notes so that a single output channel could reproduce more than one note at a time (which is not the same as a polyphony - see wikipedia :-) ) * audio-avr-pwm: get music-mode working (again) on AVRs with both pwm channels, or either one of the two :-) play_notes worked already - but music_mode uses play_note * audio-refactoring: split define MAX_SIMULTANEOUS_TONES -> TONE_STACKSIZE since the two cases are independant from one another, the hardware might impose limitations on the number of simultaneously reproducable tones, but the audio state should be able to track an unrelated number of notes recently started by play_note * audio-arm-dac: per define selectable sample-luts plus generation script in ./util * audio-refactoring: heh, avr has a MIN... * audio-refactoring: add basic dac audio-driver based on the current/master implementation whereas current=d96380e65496912e0f68e6531565f4b45efd1623 which is the state of things before this whole audio-refactoring branch boiled down to interface with the refactored audio system = removing all redundant state-managing and frequency calculation * audio-refactoring: rename audio-drivers to driver_$PLATFORM_$DRIVER * audio-arm-pwm: split the software/hardware implementations into separate files which saves us partially from a 'define hell', with the tradeoff that now two somewhat similar chibios_pwm implementations have to be maintained * audio-refactoring: update documentation * audio-arm-dac: apply AUDIO_PIN defines to driver_chibios_dac_basic * audio-arm-dac: dac_additive: stop the hardware when the last sample completed the audio system calls for a driver_stop, which is delayed until the current sample conversion finishes * audio-refactoring: make function-namespace consistent - all (public) audio functions start with audio_ - also refactoring play*_notes/tones to play*_melody, to visually distance it a bit from play*_tone/_note * audio-refactoring: consistent define namespace: DAC_ -> AUDIO_DAC_ * audio-arm-dac: update (inline) documentation regarding MAX for sample values * audio-chibios-dac: remove zero-crossing feature didn't quite work as intended anyway, and stopping the hardware on close-to-zero seems to be enought anyway * audio-arm-dac: dac_basic: respect the configured sample-rate * audio-arm-pwm: have 'note_timbre' influence the pwm-duty cycle like it already does in the avr implementation * audio-refactoring: get VIBRATO working (again) with all drivers (verified with chibios_[dac|pwm]) * audio-arm-dac: zero-crossing feature (Mk II) wait for the generated waveform to approach 'zero' before either turning off the output+timer or switching to the current set of active_tones * audio-refactoring: re-add note-resting -> introduce short_rest inbetween - introduce a short pause/rest between two notes of the same frequency, to separate them audibly - also updating the refactoring comments * audio-refactoring: cleanup refactoring remnants remove the former avr-isr code block - since all its features are now refactored into the different parts of the current system also updates the TODOS * audio-refactoring: reserve negative numbers as unitialized frequencies to allow the valid tone/frequency f=0Hz == rest/pause * audio-refactoring: FIX: first note of melody was missing the first note was missing because 'goto_next_note'=false overrode a state_change=true of the initial play_tone and some code-indentations/cleanup of related parts * audio-arm-dac: fix hardware init-click due to wron .init= value * audio-refactoring: new conveniance function: audio_play_click which can be used to further refactor/remove fauxclicky (avr only) and/or the 'clicky' features * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: consecutive notes of the same frequency get a pause inserted inbetween by audio.c * audio-refactoring: use milliseconds instead of seconds for 'click' parameters clicks are supposed to be short, seconds make little sense * audio-refactoring: use timer ticks instead of counters local counters were used in the original (avr)ISR to advance an index into the lookup tables (for vibrato), and something similar was used for the tone-multiplexing feature decoupling these from the (possibly irregular) calls to advance_state made sesne, since those counters/lookups need to be in relation to a wall-time anyway * audio-refactoring: voices.c: drop 'envelope_index' counter in favour of timer ticks * audio-refactoring: move vibrato and timbre related parts from audio.c to voices.c also drops the now (globally) unused AUDIO_VIBRATO/AUDIO_ENABLE_VIBRATO defines * audio.c: use system-ticks instead of counters the drivers have to take care of for the internal state posision since there already is a system-tick with ms resolution, keeping count separatly with each driver implementation makes little sense; especially since they had to take special care to call audio_advance_state with the correct step/end parameters for the audio state to advance regularly and with the correct pace * audio.c: stop notes after new ones have been started avoids brief states of with no notes playing that would otherwise stop the hardware and might lead to clicks * audio.c: bugfix: actually play a pause instead of just idling/stopping which lead the pwm drivers to stop entirely... * audio-arm-pwm: pwm-software: add inverted output new define AUDIO_PIN_ALT_AS_NEGATIVE will generate an inverted signal on the alternate pin, which boosts the volume if a piezo is connected to both AUDIO_PIN and AUDIO_PIN_ALT * audio-arm-dac: basic: handle piezo configured&wired to both audio pins * audio-refactoring: docs: update for AUDIO_PIN_ALT_AS_NEGATIVE and piezo wiring * audio.c: bugfix: use timer_elapsed32 instad of keeping timestamps avoids running into issues when the uint32 of the timer overflows * audio-refactoring: add 'pragma once' and remove deprecated NOTE_REST * audio_arm_dac: basic: add missing bracket * audio.c: fix delta calculation was in the wrong place, needs to use the 'last_timestamp' before it was reset * audio-refactoring: buildfix: wrong legacy macro for set_timbre * audio.c: 16bit timerstamps suffice * audio-refactoring: separate includes for AVR and chibios * audio-refactoring: timbre: use uint8 instead of float * audio-refactoring: duration: use uint16 for internal per-tone/note state * audio-refactoring: tonemultiplexing: use uint16 instead of float * audio-arm-dac: additive: set second pin output-low used when a piezo is connected to AUDIO_PIN and AUDIO_PIN_ALT, with PIN_ALT_AS_NEGATIVE * audio-refactoring: move AUDIO_PIN selection from rules.mk to config.h to be consistent with how other features are handled in QMK * audio-refactoring: buildfix: wrong legacy macro for set_tempo * audio-arm-dac: additive: set second pin output-low -- FIXUP * audio.c: do duration<>ms conversion in uint instead of float on AVR, to save a couple of bytes in the firmware size * audio-refactoring: cleanup eeprom defines/usage for ARM, avr is handled automagically through the avr libc and common_features.mk Co-Authored-By: Drashna Jaelre <drashna@live.com> * audio.h: throw an error if OFF is larger than MAX * audio-arm-dac: basic: actually stop the dac-conversion on a audio_driver_stop to put the output pin in a known state == AUDIO_DAC_OFF_VALUE, instead of just leaving them where the last conversion was... with AUDIO_PIN_ALT_AS_NEGATIVE this meant one output was left HIGH while the other was left LOW one CAVEAT: due to this change the opposing squarewave when using both A4 and A5 with AUDIO_PIN_ALT_AS_NEGATIVE show extra pulses at the beginning/end on one of the outputs, the two waveforms are in sync otherwise. the extra pusles probably matter little, since this is no high-fidelity sound generation :P * audio-arm-dac: additive: move zero-crossing code out of dac_value_generate which is/should be user-overridable == simple, and doing one thing: providing sample values state-transitions necessary for the zero crossing are better handled in the surrounding loop in the dac_end callback * audio-arm-dac: dac-additive: zero-crossing: ramping up or down after a start trigger ramp up: generate values until zero=OFF_VALUE is reached, then continue normally same in reverse for strop trigger: output values until zero is reached/crossed, then keep OFF_VALUE on the output * audio-arm-dac: dac-additive: BUGFIX: return OFF_VALUE when a pause is playing fixes a bug during SONG playback, which suddenly stopped when it encoutnered a pause * audio-arm-dac: set a sensible default for AUDIO_DAC_VALUE_OFF 1/2 MAX was probably exemplary, can't think of a setup where that would make sense :-P * audio-arm-dac: update synth_sample/_wavetable for new pin-defines * audio-arm-dac: default for AUDIO_DAC_VALUE_OFF turned out that zero or max are bad default choices: when multiple tones are played (>>5) and released at the same time (!), due to the complex waveform never reaching 'zero' the output can take quite a while to reach zero, and hence the zero-crossing code only "releases" the output waaay to late * audio-arm-dac: additive: use DAC for negative pin instead of PAL, which only allows the pin to be configured as output; LOW or HIGH * audio-arm-dac: more compile-time configuration checks * audio-refactoring: typo fixed * audio-refactoring: clang-format on quantum/audio/* * audio-avr-pwm: add defines for B-pin as primary/only speaker also updates documentation. * audio-refactoring: update documentation with proton-c config.h example * audio-refactoring: move glissando (TODO) to voices.c refactored/saved from the original glissando implementation in then upstream-master:audio_avr.c still needs some work though, as it is now the calculation *should* work, but the start-frequency needs to be tracked somewhere/somehow; not only during a SONG playback but also with user input? * audio-refactoring: cleanup: one round of aspell -c * audio-avr-pwm: back to AUDIO_PIN since config_common.h expands them to plain integers, the AUDIO_PIN define can directly be compared to e.g. B5 so there is no need to deal with separate defines like AUDIO_PIN_B5 * audio-refactoring: add technical documentation audio_driver.md which moves some in-code documentation there * audio-arm-dac: move AUDIO_PIN checks into c-code instead of doing everything with the preprocessor, since A4/A5 do not expand to simple integers, preprocessor int-comparison is not possible. but necessary to get a consistent configuration scheme going throughout the audio-code... solution: let c-code handle the different AUDIO_PIN configurations instead (and leave code/size optimizations to the compiler) * audio-arm-dac: compile-fix: set AUDIO_PIN if unset workaround to get the build going again, and be backwarts compatible to arm-keyboards which not yet set the AUDIO_PIN define. until the define is enforced through an '#error" * audio-refactoring: document tone-multiplexing feature * audio-refactoring: Apply suggestions from documentation review Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-refactoring: Update docs/audio_driver.md * audio-refactoring: docs: fix markdown newlines Terminating a line in Markdown with <space>-<space>-<linebreak> creates an HTML single-line break (<br>). Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> * audio-arm-dac: additive: fix AUDIO_PIN_ALT handling * audio-arm-pwm: align define naming with other drivers Co-authored-by: Joel Challis <git@zvecr.com> * audio-refactoring: set detault tempo to 120 and add documentation for the override * audio-refactoring: update backlight define checks to new AUDIO_PIN names * audio-refactoring: reworking PWM related defines to be more consistent with other QMK code Co-authored-by: Joel Challis <git@zvecr.com> * audio-arm: have the state-update-timer user configurable defaulting to GPTD6 or GPTD8 for stm32f2+ (=proton-c) stm32f1 might need to set this to GPTD4, since 6 and 8 are not available * audio-refactoring: PLAY_NOTE_ARRAY was already removed in master * Add prototype for startup * Update chibiOS dac basic to disable pins on stop * Add defaults for Proton C * avoid hanging audio if note is completely missed * Don't redefine pins if they're already defined * Define A4 and A5 for CTPC support * Add license headers to keymap files * Remove figlet? comments * Add DAC config to audio driver docs * Apply suggestions from code review Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Add license header to py files * correct license header * Add JohSchneider's name to modified files AKA credit where credit's due * Set executable permission and change interpeter * Add 'wave' to pip requirements * Improve documentation * Add some settings I missed * Strip AUDIO_DRIVER to parse the name correctly * fix depreciated * Update util/audio_generate_dac_lut.py Co-authored-by: Jack Humbert <jack.humb@gmail.com> * Fix type in clueboard config * Apply suggestions from tzarc Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Johannes <you@example.com> Co-authored-by: JohSchneider <JohSchneider@googlemail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com> Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joshua Diamond <josh@windowoffire.com> Co-authored-by: Jack Humbert <jack.humb@gmail.com>
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
Velocikey: Match RGB animation speed to typing speed (#3754) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Experimental LED support (untested) * Draft commit of typing speed RGB control * More information in the readme * Support all RGB animation modes (Fixes #1) * Added support for all RGB light modes to use typing speed Except christmas lights because that is seizure-inducing at high speeds! * Introduced a value range specific to each RGB mode Because some modes are a little too much when running at full speed! * Update readme.md * Update readme.md * Re-arrange typing_speed definitions (Fixes #5) (#6) * Re-arrange variable definitions to avoid including quantum.h from rgblight.c * Fix a compilation error when trying to run make test:all * Tweaks to the typing speed decay rate * Renamed to momentum; moved implementation into dedicated files * Groundwork for toggling momentum on/off (currently always on) * Add EEPROM toggle for momentum-matching * Moved momentum out of RGBLIGHT_ENABLE toggles so it's more generic * Move momentum decay task out of rgblight_task() * Fix missing momentum.h in lufa.c * Added documentation * Renamed feature to velocikey * Reverted readme to original state * Correct the readme title * Updated feature name in the docs * Update EECONFIG name * Add compile-time toggles for velocikey * Update feature documentation * Revert "Merge branch 'led-support' into master" This reverts commit e123ff5febf61639b9a9020748e1c2e2313460ff, reversing changes made to df111a55b9d4929182e16108b1c0ead15b16df97. * Move velocikey EECONFIG definition to depend on VELOCIKEY_ENABLE * Rename decay_task function to decelerate * Apply suggestions from code review Co-Authored-By: chrislewisdev <chris@chrislewisdev.com> * Re-order eeconfig definitions * Apply coding conventions * Apply #ifdef check in lufa.c * Refactored interval time checks into one functionc * Small rename * Fix unused function error for layouts not using all rgb effects * Only update EEPROM if Velocikey is enabled * Incorporate code review feedback * Small adjustment to top-end decay rate * Add Velocikey documentation to table of contents * Bring tetris:default keymap size down by disabling audio
5 years ago
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
5 years ago
Remove Full Bootmagic (#13846) * disambiguate Bootmagic rules in keymaps The files edited by this commit were added at a point in time where `BOOTMAGIC_ENABLE = yes` enabled full Bootmagic. This commit edits the files to specify that full Bootmagic is intended. * remove BOOTMAGIC_ENABLE=full setting * unify commented BOOTMAGIC_ENABLE rules in keyboards Explicitly sets `BOOTMAGIC_ENABLE = no` in keyboards where the rule was commented out. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-zA-Z]\+\).*;\1 = no # Virtual DIP switch configuration;g' {} + ``` * remove commented Bootmagic rules from keymap/user level Command: ``` find keyboards/ layouts/ users/ -type f -name 'rules.mk' -exec sed -i -e '/#.*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*/d' {} + ``` * update keyboard BOOTMAGIC_ENABLE rule formatting Sets the formatting of BOOTMAGIC_ENABLE rules to `BOOTMAGIC_ENABLE = [value]`, without the inline comments (which will be replaced later). Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + ``` * update keyboards' BOOTMAGIC_ENABLE settings Updates keyboard `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = \)full;\1lite;g' '{}' + ``` * update keymap/user BOOTMAGIC_ENABLE settings Updates keymap/user `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + ``` * remove and replace inline comments in keyboards and keymap/user files Removes and replaces the inline comments, which have been updated to read `Enable Bootmagic Lite`. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = lite\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = yes\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = no\);\1 # Enable Bootmagic Lite;g' '{}' + ``` * rename improperly named makefiles Some files intended to be used as makefiles had improper names causing them to not be used as intended when building. This commit corrects the filenames of the affected files. * update renamed file with new rule formatting * update QMK's template files Updates QMK's `rules.mk` templates to use the new inline comment. * update QMK Docs - remove documentation of full Bootmagic - update links to Bootmagic Lite doc - add doc for Magic Keycodes * rules.mk patch for coarse/ixora and coarse/vinta
2 years ago
Remove Full Bootmagic (#13846) * disambiguate Bootmagic rules in keymaps The files edited by this commit were added at a point in time where `BOOTMAGIC_ENABLE = yes` enabled full Bootmagic. This commit edits the files to specify that full Bootmagic is intended. * remove BOOTMAGIC_ENABLE=full setting * unify commented BOOTMAGIC_ENABLE rules in keyboards Explicitly sets `BOOTMAGIC_ENABLE = no` in keyboards where the rule was commented out. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;#[ \t]*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-zA-Z]\+\).*;\1 = no # Virtual DIP switch configuration;g' {} + ``` * remove commented Bootmagic rules from keymap/user level Command: ``` find keyboards/ layouts/ users/ -type f -name 'rules.mk' -exec sed -i -e '/#.*\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*/d' {} + ``` * update keyboard BOOTMAGIC_ENABLE rule formatting Sets the formatting of BOOTMAGIC_ENABLE rules to `BOOTMAGIC_ENABLE = [value]`, without the inline comments (which will be replaced later). Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + ``` * update keyboards' BOOTMAGIC_ENABLE settings Updates keyboard `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Command: ``` find keyboards/ -type f -name 'rules.mk' -and -not -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = \)full;\1lite;g' '{}' + ``` * update keymap/user BOOTMAGIC_ENABLE settings Updates keymap/user `rules.mk` files to use `BOOTMAGIC_ENABLE = lite` where `BOOTMAGIC_ENABLE = full` was being used. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE[ \t=]\+\)full;\1lite;g' '{}' + ``` * remove and replace inline comments in keyboards and keymap/user files Removes and replaces the inline comments, which have been updated to read `Enable Bootmagic Lite`. Commands: ``` find keyboards/ -type f -name 'rules.mk' -and -path '*/keymaps/*' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE\)[ \t=]\+\([a-z]\+\).*;\1 = \2;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = lite\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = yes\);\1 # Enable Bootmagic Lite;g' '{}' + find keyboards/ layouts/community/ users/ -type f -name 'rules.mk' -exec sed -i -e 's;\(BOOTMAGIC_ENABLE = no\);\1 # Enable Bootmagic Lite;g' '{}' + ``` * rename improperly named makefiles Some files intended to be used as makefiles had improper names causing them to not be used as intended when building. This commit corrects the filenames of the affected files. * update renamed file with new rule formatting * update QMK's template files Updates QMK's `rules.mk` templates to use the new inline comment. * update QMK Docs - remove documentation of full Bootmagic - update links to Bootmagic Lite doc - add doc for Magic Keycodes * rules.mk patch for coarse/ixora and coarse/vinta
2 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Change split_common to use RGBLIGHT_SPLIT (#5509) * add I2C_slave_buffer_t to quantum/split_common/transport.c Improvements to ease the maintenance of the I2C slave buffer layout. And this commit does not change the compilation results. * add temporary pdhelix(Patched Helix) code * temporary cherry-pick from #5020 add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * add post_config.h support to build_keyboard.mk * add quantum/rgblight_post_config.h, quantum/split_common/post_config.h Add quantum/rgblight_post_config.h and quantum/split_common/post_config.h using POST_CONFIG_H variable of build_keyboard.mk. quantum/rgblight_post_config.h additionally defines RGBLIGHT_SPLIT if RGBLED_SPIT is defined. quantum/split_common/post_config.h defines RGBLIGHT_SPLIT additionally when master-slave communication is I2C. * Change split_common's transport.c I2C to use the synchronization feature of rgblight.c * Change split_common's transport.c serial to use the synchronization feature of rgblight.c * test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix * Test End Revert "test RGBLIGHT_SPLIT on keyboards/handwired/pdhelix" This reverts commit 80118a6bbd3d9fc4c7797fef0c34bc67aa73aa98. [x] make RGBLIGHT_TEST=1 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/i2c:default (same RGBLIGHT_TEST=3) [x] make RGBLIGHT_TEST=3 handwired/pdhelix/i2c:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2:default [x] make RGBLIGHT_TEST=1 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=2 handwired/pdhelix/pd2_2oled:default [x] make RGBLIGHT_TEST=3 handwired/pdhelix/pd2_2oled:default * Test End, Revert "temporary cherry-pick from #5020" This reverts commit d35069f68bda0c50370442a5c7aae60c2f4ce5c0. * Test End, Revert "add temporary pdhelix(Patched Helix) code" This reverts commit aebddfc1a879796afae297ef0723a4fe73af3660. * temporarily cherry-pick from #5020 to see if it passes the travis-ci test. add new version(#5020) quantum/rgblight.[ch], quantum/rgblight_modes.h * Passed the travis-ci test. Revert "temporarily cherry-pick from #5020 to see if it passes the travis-ci test." This reverts commit 647c0a9755eb6a05f76d09b2d59bce67b85a841f. * update docs/config_options.md * update split_common/transport.c, improves maintainability of serial transaction IDs. No change in build result. * temporary cherry-pick from #5020 * fix build fail keebio/iris/rev3:default * fix build fail lets_split_eh/eh:default * Revert "temporary cherry-pick from #5020" This reverts commit be48ca1b4515366a097af8dd1cd7b28b7ee09947. * temporary cherry-pick from #5020 (0.6.336) * Revert "temporary cherry-pick from #5020 (0.6.336)" This reverts commit 978d26a8b3cf0acc485838a7d76d6128b77c630c. * temporary cherry-pick from #5020 (0.6.336)
5 years ago
Lets split eh (#3120) * Line ending stuff again * Added Let's Split Eh? Files and updated #USE_IC2 checks to also include th EH revision (can only be used in I2C) * Added personal keymap, updated some of the EH files * Created new keyboard file for testing "lets_split_eh" will merge into lets_split once fully functional * Added split code from lets_split, removed pro micro imports and LED code THIS IS WORKING CODE, WITHOUT RGB AND BACKLIGHT * Took back original Lets Slit files for the lets_split keyboard, working in the lets_split_eh folder for now * Updated eh.c * More rework of the I2C code, added global flags for split boards. * Introduced RGB over I2C, having weird edge case issues at the moment though * Fixed weird I2C edgecase with RGB, although still would like to track down route cause.. * Changed RGB keycodes (static ones) to activate on key-up instead of key-down to elimate weird ghosting issue over I2C * Lots of changes, mainly externalized the Split keyboard code and added logic for only including when needed. - Added makefile option "SPLIT_KEYBOARD" that when = yes will include the split keyboard files and custom matrix - Split keyboard files placed into quantum/split_common/ - Added define option for config files "SPLIT_HAND_PIN" FOr using high/low pin to determine handedness, low = right hand, high = left hand - Cleaned up split logic for RGB and Backlight so it is only exectuted / included when needed * Updated documentation for the new makefile options and #defines specific to split keyboards * Added a bit more info to docs, so people aren't confused * Modifed Let's Split to use externalized code, also added left and right hand eeprom files to the split_common folder * Removed some debugging from eh.c * Small changes to keyboard configs. Also added a default keymap (just a copy of my that_canadian keymap). * Added a README file to the Let's Split Eh? * Changed it so RGB static updates are done on key-up ONLY for split boards rather than all boards. Also fixed leftover un-used variable in rgblight.c * Updated default keymap and my keymap for Let's Split Eh? Updated the comments so it reflects RGB control, and removed audio functions. * Fixed lets_split_eh not having a default version * Removed "eh" references from lets_split folder for now * Took lets_split folder from master to fix travis build errors, weird my local was overriding. * Changed LAYOUT_ortho_4x12_kc -> LAYOUT_kc_ortho_4x12 to match bakingpy and others * Removed rules.mk from my lets_split keymap, not needed * Updated the config_options doc to better explain the usage of "#define SPLIT_HAND_PIN"
5 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
2020 November 28 Breaking Changes Update (#11053) * Branch point for 2020 November 28 Breaking Change * Remove matrix_col_t to allow MATRIX_ROWS > 32 (#10183) * Add support for soft serial to ATmega32U2 (#10204) * Change MIDI velocity implementation to allow direct control of velocity value (#9940) * Add ability to build a subset of all keyboards based on platform. * Actually use eeprom_driver_init(). * Make bootloader_jump weak for ChibiOS. (#10417) * Joystick 16-bit support (#10439) * Per-encoder resolutions (#10259) * Share button state from mousekey to pointing_device (#10179) * Add hotfix for chibios keyboards not wake (#10088) * Add advanced/efficient RGB Matrix Indicators (#8564) * Naming change. * Support for STM32 GPIOF,G,H,I,J,K (#10206) * Add milc as a dependency and remove the installed milc (#10563) * ChibiOS upgrade: early init conversions (#10214) * ChibiOS upgrade: configuration file migrator (#9952) * Haptic and solenoid cleanup (#9700) * XD75 cleanup (#10524) * OLED display update interval support (#10388) * Add definition based on currently-selected serial driver. (#10716) * New feature: Retro Tapping per key (#10622) * Allow for modification of output RGB values when using rgblight/rgb_matrix. (#10638) * Add housekeeping task callbacks so that keyboards/keymaps are capable of executing code for each main loop iteration. (#10530) * Rescale both ChibiOS and AVR backlighting. * Reduce Helix keyboard build variation (#8669) * Minor change to behavior allowing display updates to continue between task ticks (#10750) * Some GPIO manipulations in matrix.c change to atomic. (#10491) * qmk cformat (#10767) * [Keyboard] Update the Speedo firmware for v3.0 (#10657) * Maartenwut/Maarten namechange to evyd13/Evy (#10274) * [quantum] combine repeated lines of code (#10837) * Add step sequencer feature (#9703) * aeboards/ext65 refactor (#10820) * Refactor xelus/dawn60 for Rev2 later (#10584) * add DEBUG_MATRIX_SCAN_RATE_ENABLE to common_features.mk (#10824) * [Core] Added `add_oneshot_mods` & `del_oneshot_mods` (#10549) * update chibios os usb for the otg driver (#8893) * Remove HD44780 References, Part 4 (#10735) * [Keyboard] Add Valor FRL TKL (+refactor) (#10512) * Fix cursor position bug in oled_write_raw functions (#10800) * Fixup version.h writing when using SKIP_VERSION=yes (#10972) * Allow for certain code in the codebase assuming length of string. (#10974) * Add AT90USB support for serial.c (#10706) * Auto shift: support repeats and early registration (#9826) * Rename ledmatrix.h to match .c file (#7949) * Split RGB_MATRIX_ENABLE into _ENABLE and _DRIVER (#10231) * Split LED_MATRIX_ENABLE into _ENABLE and _DRIVER (#10840) * Merge point for 2020 Nov 28 Breaking Change
3 years ago
Simplify split_common Code significantly (#4772) * Eliminate separate slave loop Both master and slave run the standard keyboard_task main loop now. * Refactor i2c/serial specific code Simplify some of the preprocessor mess by using common function names. * Fix missing #endif * Move direct pin mapping support from miniaxe to split_common For boards with more pins than sense--sorry, switches. * Reordering and reformatting only * Don't run matrix_scan_quantum on slave side * Clean up the offset/slaveOffset calculations * Cut undebounced matrix size in half * Refactor debouncing * Minor fixups * Split split_common transport and debounce code into their own files Can now be replaced with custom versions per keyboard using CUSTOM_TRANSPORT = yes and CUSTOM_DEBOUNCE = yes * Refactor debounce for non-split keyboards too * Update handwired/xealous to build using new split_common * Fix debounce breaking basic test * Dodgy method to allow a split kb to only include one of i2c/serial SPLIT_TRANSPORT = serial or SPLIT_TRANSPORT = i2c will include only that driver code in the binary. SPLIT_TRANSPORT = custom (or anything else) will include neither, the keyboard must supply it's own code if SPLIT_TRANSPORT is not defined then the original behaviour (include both avr i2c and serial code) is maintained. This could be better but it would require explicitly updating all the existing split keyboards. * Enable LTO to get lets_split/sockets under the line * Add docs for SPLIT_TRANSPORT, CUSTOM_MATRIX, CUSTOM_DEBOUNCE * Remove avr-specific sei() from split matrix_setup Not needed now that slave doesn't have a separate main loop. Both sides (on avr) call sei() in lufa's main() after exiting keyboard_setup(). * Fix QUANTUM_LIB_SRC references and simplify SPLIT_TRANSPORT. * Add comments and fix formatting.
5 years ago
Hid joystick interface (#4226) * add support for hid gamepad interface add documentation for HID joystick Add joystick_task to read analog axes values even when no key is pressed or release. update doc Update docs/feature_joystick.md Manage pin setup and read to maintain matrix scan after analog read * Incorporates patches and changes to HID reporting There are some patches provided by @a-chol incorporated on this commit, and also some changes I made to the HID Report structure. The most interesting is the one dealing with number of buttons: Linux doesn't seem to care, but Windows requires the HID structure to be byte aligned (that's in the spec). So if one declares 8/16/32... buttons they should not have any issues, but this is what happens when you have 9 buttons: ``` bits |0|1|2|3|4|5|6|7| |*|*|*|*|*|*|*|*| axis 0 (report size 8) |*|*|*|*|*|*|*|*| ... |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| axis 6 |*|*|*|*|*|*|*|*| first 8 buttons (report size 1) |*| | | | | | | | last of 9 buttons, not aligned ``` So for that I added a conditonal that will add a number of reports with size 1 to make sure it aligns to the next multiple of 8. Those reports send dummy inputs that don't do anything aside from aligning the data. Tested on Linux, Windows 10 and Street Fighter (where the joystick is recognized as direct-input) * Add save and restore of each pin used in reading joystick (AVR). Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc instead of an output pin from the MCU. Fix joystick report id Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes) Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis. Documentation fixes * Fix port addressing for joystick analog read * The other required set of changes As per the PR, the changes still holding it up. Add onekey for testing. Fix ARM builds. Fix device descriptor when either axes or buttons is zero. Add compile-time check for at least one axis or button. Move definition to try to fix conflict. PR review comments. qmk cformat * avoid float functions to compute range mapping for axis adc reading * Remove V-USB support for now. Updated docs accordingly. * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios * Fix HID joystick report sending for ChibiOS. Add one analog axis to the onekey:joystick keymap. Fix pin state save and restore during joystick analog read for STM32 MCUs. * Update tmk_core/protocol/chibios/usb_main.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Add missing mcuconf.h and halconf.h to onekey:joystick keymap. Add suggested fixes from PR. * Switch saveState and restoreState signature to use pin_t type. onekey:joystick : add a second axis, virtual and programmatically animated. * Update docs/feature_joystick.md Co-Authored-By: Ryan <fauxpark@gmail.com> * Update docs/feature_joystick.md Co-Authored-By: Ryan <fauxpark@gmail.com> * Add PR corrections * Remove halconf.h and mcuconf.h from onekey keymaps * Change ADC_PIN to A0 Co-authored-by: achol <allecooll@hotmail.com> Co-authored-by: José Júnior <jose.junior@gmail.com> Co-authored-by: a-chol <achol@notamail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Ryan <fauxpark@gmail.com>
3 years ago
Hid joystick interface (#4226) * add support for hid gamepad interface add documentation for HID joystick Add joystick_task to read analog axes values even when no key is pressed or release. update doc Update docs/feature_joystick.md Manage pin setup and read to maintain matrix scan after analog read * Incorporates patches and changes to HID reporting There are some patches provided by @a-chol incorporated on this commit, and also some changes I made to the HID Report structure. The most interesting is the one dealing with number of buttons: Linux doesn't seem to care, but Windows requires the HID structure to be byte aligned (that's in the spec). So if one declares 8/16/32... buttons they should not have any issues, but this is what happens when you have 9 buttons: ``` bits |0|1|2|3|4|5|6|7| |*|*|*|*|*|*|*|*| axis 0 (report size 8) |*|*|*|*|*|*|*|*| ... |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| |*|*|*|*|*|*|*|*| axis 6 |*|*|*|*|*|*|*|*| first 8 buttons (report size 1) |*| | | | | | | | last of 9 buttons, not aligned ``` So for that I added a conditonal that will add a number of reports with size 1 to make sure it aligns to the next multiple of 8. Those reports send dummy inputs that don't do anything aside from aligning the data. Tested on Linux, Windows 10 and Street Fighter (where the joystick is recognized as direct-input) * Add save and restore of each pin used in reading joystick (AVR). Allow output pin to be JS_VIRTUAL_AXIS if the axis is connected to Vcc instead of an output pin from the MCU. Fix joystick report id Fix broken v-usb hid joystick interface. Make it more resilient to unusual settings (none multiple of eight button count, 0 buttons or 0 axes) Correct adc reading for multiple axes. Piecewise range conversion for uncentered raw value range. Input, output and ground pin configuration per axis. Documentation fixes * Fix port addressing for joystick analog read * The other required set of changes As per the PR, the changes still holding it up. Add onekey for testing. Fix ARM builds. Fix device descriptor when either axes or buttons is zero. Add compile-time check for at least one axis or button. Move definition to try to fix conflict. PR review comments. qmk cformat * avoid float functions to compute range mapping for axis adc reading * Remove V-USB support for now. Updated docs accordingly. * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/usb_descriptor.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Add support for joystick adc reading for stm32 MCUs. Fix joystick hid report sending for chibios * Fix HID joystick report sending for ChibiOS. Add one analog axis to the onekey:joystick keymap. Fix pin state save and restore during joystick analog read for STM32 MCUs. * Update tmk_core/protocol/chibios/usb_main.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Update tmk_core/protocol/lufa/lufa.c Co-Authored-By: Ryan <fauxpark@gmail.com> * Add missing mcuconf.h and halconf.h to onekey:joystick keymap. Add suggested fixes from PR. * Switch saveState and restoreState signature to use pin_t type. onekey:joystick : add a second axis, virtual and programmatically animated. * Update docs/feature_joystick.md Co-Authored-By: Ryan <fauxpark@gmail.com> * Update docs/feature_joystick.md Co-Authored-By: Ryan <fauxpark@gmail.com> * Add PR corrections * Remove halconf.h and mcuconf.h from onekey keymaps * Change ADC_PIN to A0 Co-authored-by: achol <allecooll@hotmail.com> Co-authored-by: José Júnior <jose.junior@gmail.com> Co-authored-by: a-chol <achol@notamail.com> Co-authored-by: Nick Brassel <nick@tzarc.org> Co-authored-by: Ryan <fauxpark@gmail.com>
3 years ago
  1. # Copyright 2017 Fred Sundvik
  2. #
  3. # This program is free software: you can redistribute it and/or modify
  4. # it under the terms of the GNU General Public License as published by
  5. # the Free Software Foundation, either version 2 of the License, or
  6. # (at your option) any later version.
  7. #
  8. # This program is distributed in the hope that it will be useful,
  9. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. # GNU General Public License for more details.
  12. #
  13. # You should have received a copy of the GNU General Public License
  14. # along with this program. If not, see <http://www.gnu.org/licenses/>.
  15. SERIAL_PATH := $(QUANTUM_PATH)/serial_link
  16. QUANTUM_SRC += \
  17. $(QUANTUM_DIR)/quantum.c \
  18. $(QUANTUM_DIR)/send_string.c \
  19. $(QUANTUM_DIR)/bitwise.c \
  20. $(QUANTUM_DIR)/led.c \
  21. $(QUANTUM_DIR)/action.c \
  22. $(QUANTUM_DIR)/action_layer.c \
  23. $(QUANTUM_DIR)/action_macro.c \
  24. $(QUANTUM_DIR)/action_tapping.c \
  25. $(QUANTUM_DIR)/action_util.c \
  26. $(QUANTUM_DIR)/eeconfig.c \
  27. $(QUANTUM_DIR)/keyboard.c \
  28. $(QUANTUM_DIR)/keymap_common.c \
  29. $(QUANTUM_DIR)/keycode_config.c \
  30. $(QUANTUM_DIR)/logging/debug.c \
  31. $(QUANTUM_DIR)/logging/sendchar.c \
  32. VPATH += $(QUANTUM_DIR)/logging
  33. # Fall back to lib/printf if there is no platform provided print
  34. ifeq ("$(wildcard $(TMK_PATH)/common/$(PLATFORM_KEY)/printf.mk)","")
  35. include $(QUANTUM_PATH)/logging/print.mk
  36. endif
  37. ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), yes)
  38. OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
  39. CONSOLE_ENABLE = yes
  40. else ifeq ($(strip $(DEBUG_MATRIX_SCAN_RATE_ENABLE)), api)
  41. OPT_DEFS += -DDEBUG_MATRIX_SCAN_RATE
  42. endif
  43. ifeq ($(strip $(API_SYSEX_ENABLE)), yes)
  44. OPT_DEFS += -DAPI_SYSEX_ENABLE
  45. OPT_DEFS += -DAPI_ENABLE
  46. MIDI_ENABLE=yes
  47. SRC += $(QUANTUM_DIR)/api/api_sysex.c
  48. SRC += $(QUANTUM_DIR)/api.c
  49. endif
  50. ifeq ($(strip $(COMMAND_ENABLE)), yes)
  51. SRC += $(QUANTUM_DIR)/command.c
  52. OPT_DEFS += -DCOMMAND_ENABLE
  53. endif
  54. AUDIO_ENABLE ?= no
  55. ifeq ($(strip $(AUDIO_ENABLE)), yes)
  56. ifeq ($(PLATFORM),CHIBIOS)
  57. AUDIO_DRIVER ?= dac_basic
  58. ifeq ($(strip $(AUDIO_DRIVER)), dac_basic)
  59. OPT_DEFS += -DAUDIO_DRIVER_DAC
  60. else ifeq ($(strip $(AUDIO_DRIVER)), dac_additive)
  61. OPT_DEFS += -DAUDIO_DRIVER_DAC
  62. ## stm32f2 and above have a usable DAC unit, f1 do not, and need to use pwm instead
  63. else ifeq ($(strip $(AUDIO_DRIVER)), pwm_software)
  64. OPT_DEFS += -DAUDIO_DRIVER_PWM
  65. else ifeq ($(strip $(AUDIO_DRIVER)), pwm_hardware)
  66. OPT_DEFS += -DAUDIO_DRIVER_PWM
  67. endif
  68. else
  69. # fallback for all other platforms is pwm
  70. AUDIO_DRIVER ?= pwm_hardware
  71. OPT_DEFS += -DAUDIO_DRIVER_PWM
  72. endif
  73. OPT_DEFS += -DAUDIO_ENABLE
  74. MUSIC_ENABLE = yes
  75. SRC += $(QUANTUM_DIR)/process_keycode/process_audio.c
  76. SRC += $(QUANTUM_DIR)/process_keycode/process_clicky.c
  77. SRC += $(QUANTUM_DIR)/audio/audio.c ## common audio code, hardware agnostic
  78. SRC += $(QUANTUM_DIR)/audio/driver_$(PLATFORM_KEY)_$(strip $(AUDIO_DRIVER)).c
  79. SRC += $(QUANTUM_DIR)/audio/voices.c
  80. SRC += $(QUANTUM_DIR)/audio/luts.c
  81. endif
  82. ifeq ($(strip $(SEQUENCER_ENABLE)), yes)
  83. OPT_DEFS += -DSEQUENCER_ENABLE
  84. MUSIC_ENABLE = yes
  85. SRC += $(QUANTUM_DIR)/sequencer/sequencer.c
  86. SRC += $(QUANTUM_DIR)/process_keycode/process_sequencer.c
  87. endif
  88. ifeq ($(strip $(MIDI_ENABLE)), yes)
  89. OPT_DEFS += -DMIDI_ENABLE
  90. MUSIC_ENABLE = yes
  91. SRC += $(QUANTUM_DIR)/process_keycode/process_midi.c
  92. endif
  93. MUSIC_ENABLE ?= no
  94. ifeq ($(MUSIC_ENABLE), yes)
  95. SRC += $(QUANTUM_DIR)/process_keycode/process_music.c
  96. endif
  97. ifeq ($(strip $(STENO_ENABLE)), yes)
  98. OPT_DEFS += -DSTENO_ENABLE
  99. VIRTSER_ENABLE ?= yes
  100. SRC += $(QUANTUM_DIR)/process_keycode/process_steno.c
  101. endif
  102. ifeq ($(strip $(VIRTSER_ENABLE)), yes)
  103. OPT_DEFS += -DVIRTSER_ENABLE
  104. endif
  105. ifeq ($(strip $(MOUSEKEY_ENABLE)), yes)
  106. OPT_DEFS += -DMOUSEKEY_ENABLE
  107. MOUSE_ENABLE := yes
  108. SRC += $(QUANTUM_DIR)/mousekey.c
  109. endif
  110. ifeq ($(strip $(POINTING_DEVICE_ENABLE)), yes)
  111. OPT_DEFS += -DPOINTING_DEVICE_ENABLE
  112. MOUSE_ENABLE := yes
  113. SRC += $(QUANTUM_DIR)/pointing_device.c
  114. endif
  115. VALID_EEPROM_DRIVER_TYPES := vendor custom transient i2c spi
  116. EEPROM_DRIVER ?= vendor
  117. ifeq ($(filter $(EEPROM_DRIVER),$(VALID_EEPROM_DRIVER_TYPES)),)
  118. $(error EEPROM_DRIVER="$(EEPROM_DRIVER)" is not a valid EEPROM driver)
  119. else
  120. OPT_DEFS += -DEEPROM_ENABLE
  121. ifeq ($(strip $(EEPROM_DRIVER)), custom)
  122. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_CUSTOM
  123. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  124. SRC += eeprom_driver.c
  125. else ifeq ($(strip $(EEPROM_DRIVER)), i2c)
  126. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_I2C
  127. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  128. QUANTUM_LIB_SRC += i2c_master.c
  129. SRC += eeprom_driver.c eeprom_i2c.c
  130. else ifeq ($(strip $(EEPROM_DRIVER)), spi)
  131. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_SPI
  132. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  133. QUANTUM_LIB_SRC += spi_master.c
  134. SRC += eeprom_driver.c eeprom_spi.c
  135. else ifeq ($(strip $(EEPROM_DRIVER)), transient)
  136. OPT_DEFS += -DEEPROM_DRIVER -DEEPROM_TRANSIENT
  137. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  138. SRC += eeprom_driver.c eeprom_transient.c
  139. else ifeq ($(strip $(EEPROM_DRIVER)), vendor)
  140. OPT_DEFS += -DEEPROM_VENDOR
  141. ifeq ($(PLATFORM),AVR)
  142. # Automatically provided by avr-libc, nothing required
  143. else ifeq ($(PLATFORM),CHIBIOS)
  144. ifeq ($(MCU_SERIES), STM32F3xx)
  145. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  146. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  147. OPT_DEFS += -DEEPROM_EMU_STM32F303xC
  148. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  149. else ifeq ($(MCU_SERIES), STM32F1xx)
  150. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  151. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  152. OPT_DEFS += -DEEPROM_EMU_STM32F103xB
  153. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  154. else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F072xB)
  155. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  156. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  157. OPT_DEFS += -DEEPROM_EMU_STM32F072xB
  158. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  159. else ifeq ($(MCU_SERIES)_$(MCU_LDSCRIPT), STM32F0xx_STM32F042x6)
  160. # Stack sizes: Since this chip has limited RAM capacity, the stack area needs to be reduced.
  161. # This ensures that the EEPROM page buffer fits into RAM
  162. USE_PROCESS_STACKSIZE = 0x600
  163. USE_EXCEPTIONS_STACKSIZE = 0x300
  164. SRC += $(PLATFORM_COMMON_DIR)/eeprom_stm32.c
  165. SRC += $(PLATFORM_COMMON_DIR)/flash_stm32.c
  166. OPT_DEFS += -DEEPROM_EMU_STM32F042x6
  167. OPT_DEFS += -DSTM32_EEPROM_ENABLE
  168. else ifneq ($(filter $(MCU_SERIES),STM32L0xx STM32L1xx),)
  169. OPT_DEFS += -DEEPROM_DRIVER
  170. COMMON_VPATH += $(DRIVER_PATH)/eeprom
  171. COMMON_VPATH += $(PLATFORM_PATH)/$(PLATFORM_KEY)/$(DRIVER_DIR)/eeprom
  172. SRC += eeprom_driver.c eeprom_stm32_L0_L1.c
  173. else
  174. # This will effectively work the same as "transient" if not supported by the chip
  175. SRC += $(PLATFORM_COMMON_DIR)/eeprom_teensy.c
  176. endif
  177. else ifeq ($(PLATFORM),ARM_ATSAM)
  178. SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
  179. else ifeq ($(PLATFORM),TEST)
  180. SRC += $(PLATFORM_COMMON_DIR)/eeprom.c
  181. endif
  182. endif
  183. endif
  184. RGBLIGHT_ENABLE ?= no
  185. VALID_RGBLIGHT_TYPES := WS2812 APA102 custom
  186. ifeq ($(strip $(RGBLIGHT_CUSTOM_DRIVER)), yes)
  187. RGBLIGHT_DRIVER ?= custom
  188. endif
  189. ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
  190. RGBLIGHT_DRIVER ?= WS2812
  191. ifeq ($(filter $(RGBLIGHT_DRIVER),$(VALID_RGBLIGHT_TYPES)),)
  192. $(error RGBLIGHT_DRIVER="$(RGBLIGHT_DRIVER)" is not a valid RGB type)
  193. else
  194. COMMON_VPATH += $(QUANTUM_DIR)/rgblight
  195. POST_CONFIG_H += $(QUANTUM_DIR)/rgblight/rgblight_post_config.h
  196. OPT_DEFS += -DRGBLIGHT_ENABLE
  197. SRC += $(QUANTUM_DIR)/color.c
  198. SRC += $(QUANTUM_DIR)/rgblight/rgblight.c
  199. CIE1931_CURVE := yes
  200. RGB_KEYCODES_ENABLE := yes
  201. endif
  202. ifeq ($(strip $(RGBLIGHT_DRIVER)), WS2812)
  203. WS2812_DRIVER_REQUIRED := yes
  204. endif
  205. ifeq ($(strip $(RGBLIGHT_DRIVER)), APA102)
  206. APA102_DRIVER_REQUIRED := yes
  207. endif
  208. ifeq ($(strip $(RGBLIGHT_DRIVER)), custom)
  209. OPT_DEFS += -DRGBLIGHT_CUSTOM_DRIVER
  210. endif
  211. endif
  212. LED_MATRIX_ENABLE ?= no
  213. VALID_LED_MATRIX_TYPES := IS31FL3731 custom
  214. # TODO: IS31FL3733 IS31FL3737 IS31FL3741
  215. ifeq ($(strip $(LED_MATRIX_ENABLE)), yes)
  216. ifeq ($(filter $(LED_MATRIX_DRIVER),$(VALID_LED_MATRIX_TYPES)),)
  217. $(error "$(LED_MATRIX_DRIVER)" is not a valid matrix type)
  218. endif
  219. OPT_DEFS += -DLED_MATRIX_ENABLE
  220. ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
  221. # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
  222. OPT_DEFS += -DLIB8_ATTINY
  223. endif
  224. COMMON_VPATH += $(QUANTUM_DIR)/led_matrix
  225. COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations
  226. COMMON_VPATH += $(QUANTUM_DIR)/led_matrix/animations/runners
  227. SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
  228. SRC += $(QUANTUM_DIR)/led_matrix/led_matrix.c
  229. SRC += $(QUANTUM_DIR)/led_matrix/led_matrix_drivers.c
  230. SRC += $(LIB_PATH)/lib8tion/lib8tion.c
  231. CIE1931_CURVE := yes
  232. ifeq ($(strip $(LED_MATRIX_DRIVER)), IS31FL3731)
  233. OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  234. COMMON_VPATH += $(DRIVER_PATH)/led/issi
  235. SRC += is31fl3731-simple.c
  236. QUANTUM_LIB_SRC += i2c_master.c
  237. endif
  238. endif
  239. RGB_MATRIX_ENABLE ?= no
  240. VALID_RGB_MATRIX_TYPES := AW20216 IS31FL3731 IS31FL3733 IS31FL3737 IS31FL3741 WS2812 custom
  241. ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
  242. ifeq ($(filter $(RGB_MATRIX_DRIVER),$(VALID_RGB_MATRIX_TYPES)),)
  243. $(error "$(RGB_MATRIX_DRIVER)" is not a valid matrix type)
  244. endif
  245. OPT_DEFS += -DRGB_MATRIX_ENABLE
  246. ifneq (,$(filter $(MCU), atmega16u2 atmega32u2 at90usb162))
  247. # ATmegaxxU2 does not have hardware MUL instruction - lib8tion must be told to use software multiplication routines
  248. OPT_DEFS += -DLIB8_ATTINY
  249. endif
  250. COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix
  251. COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations
  252. COMMON_VPATH += $(QUANTUM_DIR)/rgb_matrix/animations/runners
  253. SRC += $(QUANTUM_DIR)/color.c
  254. SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix.c
  255. SRC += $(QUANTUM_DIR)/rgb_matrix/rgb_matrix_drivers.c
  256. SRC += $(LIB_PATH)/lib8tion/lib8tion.c
  257. CIE1931_CURVE := yes
  258. RGB_KEYCODES_ENABLE := yes
  259. ifeq ($(strip $(RGB_MATRIX_DRIVER)), AW20216)
  260. OPT_DEFS += -DAW20216 -DSTM32_SPI -DHAL_USE_SPI=TRUE
  261. COMMON_VPATH += $(DRIVER_PATH)/led
  262. SRC += aw20216.c
  263. QUANTUM_LIB_SRC += spi_master.c
  264. endif
  265. ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3731)
  266. OPT_DEFS += -DIS31FL3731 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  267. COMMON_VPATH += $(DRIVER_PATH)/led/issi
  268. SRC += is31fl3731.c
  269. QUANTUM_LIB_SRC += i2c_master.c
  270. endif
  271. ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3733)
  272. OPT_DEFS += -DIS31FL3733 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  273. COMMON_VPATH += $(DRIVER_PATH)/led/issi
  274. SRC += is31fl3733.c
  275. QUANTUM_LIB_SRC += i2c_master.c
  276. endif
  277. ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3737)
  278. OPT_DEFS += -DIS31FL3737 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  279. COMMON_VPATH += $(DRIVER_PATH)/led/issi
  280. SRC += is31fl3737.c
  281. QUANTUM_LIB_SRC += i2c_master.c
  282. endif
  283. ifeq ($(strip $(RGB_MATRIX_DRIVER)), IS31FL3741)
  284. OPT_DEFS += -DIS31FL3741 -DSTM32_I2C -DHAL_USE_I2C=TRUE
  285. COMMON_VPATH += $(DRIVER_PATH)/led/issi
  286. SRC += is31fl3741.c
  287. QUANTUM_LIB_SRC += i2c_master.c
  288. endif
  289. ifeq ($(strip $(RGB_MATRIX_DRIVER)), WS2812)
  290. OPT_DEFS += -DWS2812
  291. WS2812_DRIVER_REQUIRED := yes
  292. endif
  293. ifeq ($(strip $(RGB_MATRIX_DRIVER)), APA102)
  294. OPT_DEFS += -DAPA102
  295. APA102_DRIVER_REQUIRED := yes
  296. endif
  297. ifeq ($(strip $(RGB_MATRIX_CUSTOM_KB)), yes)
  298. OPT_DEFS += -DRGB_MATRIX_CUSTOM_KB
  299. endif
  300. ifeq ($(strip $(RGB_MATRIX_CUSTOM_USER)), yes)
  301. OPT_DEFS += -DRGB_MATRIX_CUSTOM_USER
  302. endif
  303. endif
  304. ifeq ($(strip $(RGB_KEYCODES_ENABLE)), yes)
  305. SRC += $(QUANTUM_DIR)/process_keycode/process_rgb.c
  306. endif
  307. ifeq ($(strip $(PRINTING_ENABLE)), yes)
  308. OPT_DEFS += -DPRINTING_ENABLE
  309. SRC += $(QUANTUM_DIR)/process_keycode/process_printer.c
  310. SRC += $(TMK_DIR)/protocol/serial_uart.c
  311. endif
  312. ifeq ($(strip $(SERIAL_LINK_ENABLE)), yes)
  313. SERIAL_SRC := $(wildcard $(SERIAL_PATH)/protocol/*.c)
  314. SERIAL_SRC += $(wildcard $(SERIAL_PATH)/system/*.c)
  315. SERIAL_DEFS += -DSERIAL_LINK_ENABLE
  316. COMMON_VPATH += $(SERIAL_PATH)
  317. SRC += $(patsubst $(QUANTUM_PATH)/%,%,$(SERIAL_SRC))
  318. OPT_DEFS += $(SERIAL_DEFS)
  319. VAPTH += $(SERIAL_PATH)
  320. endif
  321. VARIABLE_TRACE ?= no
  322. ifneq ($(strip $(VARIABLE_TRACE)),no)
  323. SRC += $(QUANTUM_DIR)/variable_trace.c
  324. OPT_DEFS += -DNUM_TRACED_VARIABLES=$(strip $(VARIABLE_TRACE))
  325. ifneq ($(strip $(MAX_VARIABLE_TRACE_SIZE)),)
  326. OPT_DEFS += -DMAX_VARIABLE_TRACE_SIZE=$(strip $(MAX_VARIABLE_TRACE_SIZE))
  327. endif
  328. endif
  329. ifeq ($(strip $(LCD_ENABLE)), yes)
  330. CIE1931_CURVE := yes
  331. endif
  332. VALID_BACKLIGHT_TYPES := pwm timer software custom
  333. BACKLIGHT_ENABLE ?= no
  334. ifeq ($(strip $(CONVERT_TO_PROTON_C)), yes)
  335. BACKLIGHT_DRIVER ?= software
  336. else
  337. BACKLIGHT_DRIVER ?= pwm
  338. endif
  339. ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
  340. ifeq ($(filter $(BACKLIGHT_DRIVER),$(VALID_BACKLIGHT_TYPES)),)
  341. $(error BACKLIGHT_DRIVER="$(BACKLIGHT_DRIVER)" is not a valid backlight type)
  342. endif
  343. COMMON_VPATH += $(QUANTUM_DIR)/backlight
  344. SRC += $(QUANTUM_DIR)/backlight/backlight.c
  345. SRC += $(QUANTUM_DIR)/process_keycode/process_backlight.c
  346. OPT_DEFS += -DBACKLIGHT_ENABLE
  347. ifeq ($(strip $(BACKLIGHT_DRIVER)), custom)
  348. OPT_DEFS += -DBACKLIGHT_CUSTOM_DRIVER
  349. else
  350. SRC += $(QUANTUM_DIR)/backlight/backlight_driver_common.c
  351. ifeq ($(strip $(BACKLIGHT_DRIVER)), pwm)
  352. SRC += $(QUANTUM_DIR)/backlight/backlight_$(PLATFORM_KEY).c
  353. else
  354. SRC += $(QUANTUM_DIR)/backlight/backlight_$(strip $(BACKLIGHT_DRIVER)).c
  355. endif
  356. endif
  357. endif
  358. VALID_WS2812_DRIVER_TYPES := bitbang pwm spi i2c
  359. WS2812_DRIVER ?= bitbang
  360. ifeq ($(strip $(WS2812_DRIVER_REQUIRED)), yes)
  361. ifeq ($(filter $(WS2812_DRIVER),$(VALID_WS2812_DRIVER_TYPES)),)
  362. $(error WS2812_DRIVER="$(WS2812_DRIVER)" is not a valid WS2812 driver)
  363. endif
  364. OPT_DEFS += -DWS2812_DRIVER_$(strip $(shell echo $(WS2812_DRIVER) | tr '[:lower:]' '[:upper:]'))
  365. ifeq ($(strip $(WS2812_DRIVER)), bitbang)
  366. SRC += ws2812.c
  367. else
  368. SRC += ws2812_$(strip $(WS2812_DRIVER)).c
  369. ifeq ($(strip $(PLATFORM)), CHIBIOS)
  370. ifeq ($(strip $(WS2812_DRIVER)), pwm)
  371. OPT_DEFS += -DSTM32_DMA_REQUIRED=TRUE
  372. endif
  373. endif
  374. endif
  375. # add extra deps
  376. ifeq ($(strip $(WS2812_DRIVER)), i2c)
  377. QUANTUM_LIB_SRC += i2c_master.c
  378. endif
  379. endif
  380. ifeq ($(strip $(APA102_DRIVER_REQUIRED)), yes)
  381. COMMON_VPATH += $(DRIVER_PATH)/led
  382. SRC += apa102.c
  383. endif
  384. ifeq ($(strip $(VISUALIZER_ENABLE)), yes)
  385. CIE1931_CURVE := yes
  386. endif
  387. ifeq ($(strip $(CIE1931_CURVE)), yes)
  388. OPT_DEFS += -DUSE_CIE1931_CURVE
  389. LED_TABLES := yes
  390. endif
  391. ifeq ($(strip $(LED_TABLES)), yes)
  392. SRC += $(QUANTUM_DIR)/led_tables.c
  393. endif
  394. ifeq ($(strip $(TERMINAL_ENABLE)), yes)
  395. SRC += $(QUANTUM_DIR)/process_keycode/process_terminal.c
  396. OPT_DEFS += -DTERMINAL_ENABLE
  397. OPT_DEFS += -DUSER_PRINT
  398. endif
  399. ifeq ($(strip $(WPM_ENABLE)), yes)
  400. SRC += $(QUANTUM_DIR)/wpm.c
  401. OPT_DEFS += -DWPM_ENABLE
  402. endif
  403. ifeq ($(strip $(ENCODER_ENABLE)), yes)
  404. SRC += $(QUANTUM_DIR)/encoder.c
  405. OPT_DEFS += -DENCODER_ENABLE
  406. endif
  407. ifeq ($(strip $(VELOCIKEY_ENABLE)), yes)
  408. OPT_DEFS += -DVELOCIKEY_ENABLE
  409. SRC += $(QUANTUM_DIR)/velocikey.c
  410. endif
  411. ifeq ($(strip $(VIA_ENABLE)), yes)
  412. DYNAMIC_KEYMAP_ENABLE := yes
  413. RAW_ENABLE := yes
  414. BOOTMAGIC_ENABLE := lite
  415. SRC += $(QUANTUM_DIR)/via.c
  416. OPT_DEFS += -DVIA_ENABLE
  417. endif
  418. ifeq ($(strip $(DYNAMIC_KEYMAP_ENABLE)), yes)
  419. OPT_DEFS += -DDYNAMIC_KEYMAP_ENABLE
  420. SRC += $(QUANTUM_DIR)/dynamic_keymap.c
  421. endif
  422. ifeq ($(strip $(DIP_SWITCH_ENABLE)), yes)
  423. OPT_DEFS += -DDIP_SWITCH_ENABLE
  424. SRC += $(QUANTUM_DIR)/dip_switch.c
  425. endif
  426. VALID_MAGIC_TYPES := yes lite
  427. BOOTMAGIC_ENABLE ?= no
  428. ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
  429. ifeq ($(filter $(BOOTMAGIC_ENABLE),$(VALID_MAGIC_TYPES)),)
  430. $(error BOOTMAGIC_ENABLE="$(BOOTMAGIC_ENABLE)" is not a valid type of magic)
  431. endif
  432. ifneq ($(strip $(BOOTMAGIC_ENABLE)), no)
  433. OPT_DEFS += -DBOOTMAGIC_LITE
  434. QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/bootmagic_lite.c
  435. endif
  436. endif
  437. COMMON_VPATH += $(QUANTUM_DIR)/bootmagic
  438. QUANTUM_SRC += $(QUANTUM_DIR)/bootmagic/magic.c
  439. VALID_CUSTOM_MATRIX_TYPES:= yes lite no
  440. CUSTOM_MATRIX ?= no
  441. ifneq ($(strip $(CUSTOM_MATRIX)), yes)
  442. ifeq ($(filter $(CUSTOM_MATRIX),$(VALID_CUSTOM_MATRIX_TYPES)),)
  443. $(error CUSTOM_MATRIX="$(CUSTOM_MATRIX)" is not a valid custom matrix type)
  444. endif
  445. # Include common stuff for all non custom matrix users
  446. QUANTUM_SRC += $(QUANTUM_DIR)/matrix_common.c
  447. # if 'lite' then skip the actual matrix implementation
  448. ifneq ($(strip $(CUSTOM_MATRIX)), lite)
  449. # Include the standard or split matrix code if needed
  450. QUANTUM_SRC += $(QUANTUM_DIR)/matrix.c
  451. endif
  452. endif
  453. # Debounce Modules. Set DEBOUNCE_TYPE=custom if including one manually.
  454. DEBOUNCE_TYPE ?= sym_defer_g
  455. ifneq ($(strip $(DEBOUNCE_TYPE)), custom)
  456. QUANTUM_SRC += $(QUANTUM_DIR)/debounce/$(strip $(DEBOUNCE_TYPE)).c
  457. endif
  458. ifeq ($(strip $(SPLIT_KEYBOARD)), yes)
  459. POST_CONFIG_H += $(QUANTUM_DIR)/split_common/post_config.h
  460. OPT_DEFS += -DSPLIT_KEYBOARD
  461. CRC_ENABLE := yes
  462. # Include files used by all split keyboards
  463. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/split_util.c
  464. # Determine which (if any) transport files are required
  465. ifneq ($(strip $(SPLIT_TRANSPORT)), custom)
  466. QUANTUM_SRC += $(QUANTUM_DIR)/split_common/transport.c \
  467. $(QUANTUM_DIR)/split_common/transactions.c
  468. OPT_DEFS += -DSPLIT_COMMON_TRANSACTIONS
  469. # Functions added via QUANTUM_LIB_SRC are only included in the final binary if they're called.
  470. # Unused functions are pruned away, which is why we can add multiple drivers here without bloat.
  471. ifeq ($(PLATFORM),AVR)
  472. ifneq ($(NO_I2C),yes)
  473. QUANTUM_LIB_SRC += i2c_master.c \
  474. i2c_slave.c
  475. endif
  476. endif
  477. SERIAL_DRIVER ?= bitbang
  478. OPT_DEFS += -DSERIAL_DRIVER_$(strip $(shell echo $(SERIAL_DRIVER) | tr '[:lower:]' '[:upper:]'))
  479. ifeq ($(strip $(SERIAL_DRIVER)), bitbang)
  480. QUANTUM_LIB_SRC += serial.c
  481. else
  482. QUANTUM_LIB_SRC += serial_$(strip $(SERIAL_DRIVER)).c
  483. endif
  484. endif
  485. COMMON_VPATH += $(QUANTUM_PATH)/split_common
  486. endif
  487. ifeq ($(strip $(CRC_ENABLE)), yes)
  488. OPT_DEFS += -DCRC_ENABLE
  489. SRC += crc.c
  490. endif
  491. HAPTIC_ENABLE ?= no
  492. ifneq ($(strip $(HAPTIC_ENABLE)),no)
  493. COMMON_VPATH += $(DRIVER_PATH)/haptic
  494. OPT_DEFS += -DHAPTIC_ENABLE
  495. SRC += $(QUANTUM_DIR)/haptic.c
  496. SRC += $(QUANTUM_DIR)/process_keycode/process_haptic.c
  497. endif
  498. ifneq ($(filter DRV2605L, $(HAPTIC_ENABLE)), )
  499. SRC += DRV2605L.c
  500. QUANTUM_LIB_SRC += i2c_master.c
  501. OPT_DEFS += -DDRV2605L
  502. endif
  503. ifneq ($(filter SOLENOID, $(HAPTIC_ENABLE)), )
  504. SRC += solenoid.c
  505. OPT_DEFS += -DSOLENOID_ENABLE
  506. endif
  507. ifeq ($(strip $(HD44780_ENABLE)), yes)
  508. SRC += platforms/avr/drivers/hd44780.c
  509. OPT_DEFS += -DHD44780_ENABLE
  510. endif
  511. VALID_OLED_DRIVER_TYPES := SSD1306 custom
  512. OLED_DRIVER ?= SSD1306
  513. ifeq ($(strip $(OLED_ENABLE)), yes)
  514. ifeq ($(filter $(OLED_DRIVER),$(VALID_OLED_DRIVER_TYPES)),)
  515. $(error OLED_DRIVER="$(OLED_DRIVER)" is not a valid OLED driver)
  516. else
  517. OPT_DEFS += -DOLED_ENABLE
  518. COMMON_VPATH += $(DRIVER_PATH)/oled
  519. OPT_DEFS += -DOLED_DRIVER_$(strip $(shell echo $(OLED_DRIVER) | tr '[:lower:]' '[:upper:]'))
  520. ifeq ($(strip $(OLED_DRIVER)), SSD1306)
  521. SRC += ssd1306_sh1106.c
  522. QUANTUM_LIB_SRC += i2c_master.c
  523. endif
  524. endif
  525. endif
  526. ifeq ($(strip $(ST7565_ENABLE)), yes)
  527. OPT_DEFS += -DST7565_ENABLE
  528. COMMON_VPATH += $(DRIVER_PATH)/oled # For glcdfont.h
  529. COMMON_VPATH += $(DRIVER_PATH)/lcd
  530. QUANTUM_LIB_SRC += spi_master.c
  531. SRC += st7565.c
  532. endif
  533. include $(DRIVER_PATH)/qwiic/qwiic.mk
  534. ifeq ($(strip $(UCIS_ENABLE)), yes)
  535. OPT_DEFS += -DUCIS_ENABLE
  536. UNICODE_COMMON := yes
  537. SRC += $(QUANTUM_DIR)/process_keycode/process_ucis.c
  538. endif
  539. ifeq ($(strip $(UNICODEMAP_ENABLE)), yes)
  540. OPT_DEFS += -DUNICODEMAP_ENABLE
  541. UNICODE_COMMON := yes
  542. SRC += $(QUANTUM_DIR)/process_keycode/process_unicodemap.c
  543. endif
  544. ifeq ($(strip $(UNICODE_ENABLE)), yes)
  545. OPT_DEFS += -DUNICODE_ENABLE
  546. UNICODE_COMMON := yes
  547. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode.c
  548. endif
  549. ifeq ($(strip $(UNICODE_COMMON)), yes)
  550. SRC += $(QUANTUM_DIR)/process_keycode/process_unicode_common.c
  551. endif
  552. SPACE_CADET_ENABLE ?= yes
  553. ifeq ($(strip $(SPACE_CADET_ENABLE)), yes)
  554. SRC += $(QUANTUM_DIR)/process_keycode/process_space_cadet.c
  555. OPT_DEFS += -DSPACE_CADET_ENABLE
  556. endif
  557. MAGIC_ENABLE ?= yes
  558. ifeq ($(strip $(MAGIC_ENABLE)), yes)
  559. SRC += $(QUANTUM_DIR)/process_keycode/process_magic.c
  560. OPT_DEFS += -DMAGIC_KEYCODE_ENABLE
  561. endif
  562. GRAVE_ESC_ENABLE ?= yes
  563. ifeq ($(strip $(GRAVE_ESC_ENABLE)), yes)
  564. SRC += $(QUANTUM_DIR)/process_keycode/process_grave_esc.c
  565. OPT_DEFS += -DGRAVE_ESC_ENABLE
  566. endif
  567. ifeq ($(strip $(DYNAMIC_MACRO_ENABLE)), yes)
  568. SRC += $(QUANTUM_DIR)/process_keycode/process_dynamic_macro.c
  569. OPT_DEFS += -DDYNAMIC_MACRO_ENABLE
  570. endif
  571. ifeq ($(strip $(COMBO_ENABLE)), yes)
  572. SRC += $(QUANTUM_DIR)/process_keycode/process_combo.c
  573. OPT_DEFS += -DCOMBO_ENABLE
  574. endif
  575. ifeq ($(strip $(KEY_OVERRIDE_ENABLE)), yes)
  576. SRC += $(QUANTUM_DIR)/process_keycode/process_key_override.c
  577. OPT_DEFS += -DKEY_OVERRIDE_ENABLE
  578. endif
  579. ifeq ($(strip $(TAP_DANCE_ENABLE)), yes)
  580. SRC += $(QUANTUM_DIR)/process_keycode/process_tap_dance.c
  581. OPT_DEFS += -DTAP_DANCE_ENABLE
  582. endif
  583. ifeq ($(strip $(KEY_LOCK_ENABLE)), yes)
  584. SRC += $(QUANTUM_DIR)/process_keycode/process_key_lock.c
  585. OPT_DEFS += -DKEY_LOCK_ENABLE
  586. endif
  587. ifeq ($(strip $(LEADER_ENABLE)), yes)
  588. SRC += $(QUANTUM_DIR)/process_keycode/process_leader.c
  589. OPT_DEFS += -DLEADER_ENABLE
  590. endif
  591. ifeq ($(strip $(AUTO_SHIFT_ENABLE)), yes)
  592. SRC += $(QUANTUM_DIR)/process_keycode/process_auto_shift.c
  593. OPT_DEFS += -DAUTO_SHIFT_ENABLE
  594. ifeq ($(strip $(AUTO_SHIFT_MODIFIERS)), yes)
  595. OPT_DEFS += -DAUTO_SHIFT_MODIFIERS
  596. endif
  597. endif
  598. JOYSTICK_ENABLE ?= no
  599. VALID_JOYSTICK_TYPES := analog digital
  600. JOYSTICK_DRIVER ?= analog
  601. ifeq ($(strip $(JOYSTICK_ENABLE)), yes)
  602. ifeq ($(filter $(JOYSTICK_DRIVER),$(VALID_JOYSTICK_TYPES)),)
  603. $(error "$(JOYSTICK_DRIVER)" is not a valid joystick driver)
  604. endif
  605. OPT_DEFS += -DJOYSTICK_ENABLE
  606. SRC += $(QUANTUM_DIR)/process_keycode/process_joystick.c
  607. SRC += $(QUANTUM_DIR)/joystick.c
  608. ifeq ($(strip $(JOYSTICK_DRIVER)), analog)
  609. OPT_DEFS += -DANALOG_JOYSTICK_ENABLE
  610. SRC += analog.c
  611. endif
  612. ifeq ($(strip $(JOYSTICK_DRIVER)), digital)
  613. OPT_DEFS += -DDIGITAL_JOYSTICK_ENABLE
  614. endif
  615. endif
  616. DIGITIZER_ENABLE ?= no
  617. ifneq ($(strip $(DIGITIZER_ENABLE)), no)
  618. SRC += $(QUANTUM_DIR)/digitizer.c
  619. endif
  620. USBPD_ENABLE ?= no
  621. VALID_USBPD_DRIVER_TYPES = custom vendor
  622. USBPD_DRIVER ?= vendor
  623. ifeq ($(strip $(USBPD_ENABLE)), yes)
  624. ifeq ($(filter $(strip $(USBPD_DRIVER)),$(VALID_USBPD_DRIVER_TYPES)),)
  625. $(error USBPD_DRIVER="$(USBPD_DRIVER)" is not a valid USBPD driver)
  626. else
  627. OPT_DEFS += -DUSBPD_ENABLE
  628. ifeq ($(strip $(USBPD_DRIVER)), vendor)
  629. # Vendor-specific implementations
  630. OPT_DEFS += -DUSBPD_VENDOR
  631. ifeq ($(strip $(MCU_SERIES)), STM32G4xx)
  632. OPT_DEFS += -DUSBPD_STM32G4
  633. SRC += usbpd_stm32g4.c
  634. else
  635. $(error There is no vendor-provided USBPD driver available)
  636. endif
  637. else ifeq ($(strip $(USBPD_DRIVER)), custom)
  638. OPT_DEFS += -DUSBPD_CUSTOM
  639. # Board designers can add their own driver to $(SRC)
  640. endif
  641. endif
  642. endif