From 5987f67989c1b8f5fbd108d4dae21a227bc2f99c Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Wed, 26 Jul 2017 14:41:39 -0700 Subject: Add TX Bolt protocol support for Stenography Requires virtser; Allows QMK to speak the TX BOlt protocol used by stenography machines and software (such as Plover). The upside is that Plover can be configured to listen only to TX Bolt allow the keyboard to switch layers without need to enable/disable the Plover software, or to have a second non-Steno keyboard work concurrently. --- quantum/quantum.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'quantum/quantum.c') diff --git a/quantum/quantum.c b/quantum/quantum.c index b76a11418..1f8ce6c46 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -200,6 +200,9 @@ bool process_record_quantum(keyrecord_t *record) { #ifdef AUDIO_ENABLE process_audio(keycode, record) && #endif + #ifdef STENO_ENABLE + process_steno(keycode, record) && + #endif #if defined(AUDIO_ENABLE) || (defined(MIDI_ENABLE) && defined(MIDI_BASIC)) process_music(keycode, record) && #endif @@ -722,14 +725,14 @@ void backlight_set(uint8_t level) // _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); // #endif #endif - } + } #ifndef NO_BACKLIGHT_CLOCK else if ( level == BACKLIGHT_LEVELS ) { // Turn on PWM control of backlight pin TCCR1A |= _BV(COM1x1); // Set the brightness OCR1x = 0xFFFF; - } + } else { // Turn on PWM control of backlight pin TCCR1A |= _BV(COM1x1); @@ -747,7 +750,7 @@ uint8_t backlight_tick = 0; void backlight_task(void) { #ifdef NO_BACKLIGHT_CLOCK - if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { + if ((0xFFFF >> ((BACKLIGHT_LEVELS - backlight_config.level) * ((BACKLIGHT_LEVELS + 1) / 2))) & (1 << backlight_tick)) { #if BACKLIGHT_ON_STATE == 0 // PORTx &= ~n _SFR_IO8((backlight_pin >> 4) + 2) &= ~_BV(backlight_pin & 0xF); -- cgit v1.2.3-24-g4f1b